check bound _before_ making access
This commit is contained in:
2
regex.c
2
regex.c
@@ -747,7 +747,7 @@ lc2c(longchar * x, int len)
|
|||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
char *r;
|
char *r;
|
||||||
|
|
||||||
while (x[j].type != RE_TYPE_END && j < len) {
|
while (j < len && x[j].type != RE_TYPE_END) {
|
||||||
if (x[j].type == RE_WHICH_RANGE)
|
if (x[j].type == RE_WHICH_RANGE)
|
||||||
y[i++] = '-';
|
y[i++] = '-';
|
||||||
#ifdef USE_M17N
|
#ifdef USE_M17N
|
||||||
|
Reference in New Issue
Block a user