зеркало из https://github.com/mozilla/gecko-dev.git
Fix off-by-one error while parsing control escape sequences. bug 334158, patch by Andreas <mqmq87@web.de>, r=mrbkap
This commit is contained in:
Родитель
6e2d4ebc6e
Коммит
e343a97818
|
@ -1254,7 +1254,7 @@ ParseTerm(CompilerState *state)
|
|||
goto doFlat;
|
||||
/* Control letter */
|
||||
case 'c':
|
||||
if (state->cp + 1 < state->cpend && RE_IS_LETTER(state->cp[1])) {
|
||||
if (state->cp < state->cpend && RE_IS_LETTER(*state->cp)) {
|
||||
c = (jschar) (*state->cp++ & 0x1F);
|
||||
} else {
|
||||
/* back off to accepting the original '\' as a literal */
|
||||
|
|
Загрузка…
Ссылка в новой задаче