mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
regex: fix storage-exhaustion error
[BZ #18040] * posix/regexec.c (get_subexp): Do not continue if storage is exhausted.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2018-12-15 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
regex: fix storage-exhaustion error
|
||||||
|
[BZ #18040]
|
||||||
|
* posix/regexec.c (get_subexp):
|
||||||
|
Do not continue if storage is exhausted.
|
||||||
|
|
||||||
2018-12-15 Assaf Gordon <assafgordon@gmail.com>
|
2018-12-15 Assaf Gordon <assafgordon@gmail.com>
|
||||||
|
|
||||||
regex: fix heap-use-after-free error
|
regex: fix heap-use-after-free error
|
||||||
|
@@ -2786,6 +2786,8 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
|
|||||||
buf = (const char *) re_string_get_buffer (&mctx->input);
|
buf = (const char *) re_string_get_buffer (&mctx->input);
|
||||||
if (err == REG_NOMATCH)
|
if (err == REG_NOMATCH)
|
||||||
continue;
|
continue;
|
||||||
|
if (__glibc_unlikely (err != REG_NOERROR))
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return REG_NOERROR;
|
return REG_NOERROR;
|
||||||
|
Reference in New Issue
Block a user