diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-02 13:13:45 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-02 13:15:10 -0800 |
commit | adc31c6bdcdb52c2bc0240982d3e8ce870af1fab (patch) | |
tree | 7019058dda25743b71ebc584351f6fd0e89bca0e /lib/regexec.c | |
parent | 6f52478e0c42f02cba940c21b18242f05e1ea2a1 (diff) | |
download | emacs-adc31c6bdcdb52c2bc0240982d3e8ce870af1fab.tar.gz |
Update from Gnulib
This incorporates:
2019-02-02 dtoastr, ftoastr, ldtoastr: port to c-strtod changes
2019-02-01 c-strtod, c-strtold: use the bug fixes
2019-01-30 strtold: New module
* doc/misc/texinfo.tex, lib/ftoastr.c, lib/regexec.c, lib/stdlib.in.h:
* m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/c-strtod.m4: Remove.
Diffstat (limited to 'lib/regexec.c')
-rw-r--r-- | lib/regexec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/regexec.c b/lib/regexec.c index 2f7cb5dcb1f..7fcd1a509ae 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); - if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, - naccepted) != 0) + if (mctx->input.valid_len - *pidx < naccepted + || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, + naccepted) + != 0)) return -1; } } |