* lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 1 Sep 2005 07:03:01 +0000 (07:03 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 1 Sep 2005 07:03:01 +0000 (07:03 +0000)
commitfec9ced8bc9928d00ea8afd3a2bc0e302d182c34
treeeef97bef3098f3b4659a17519c7f3d581a161502
parentea626b109404ea6c3a2e74938db386266dbda715
* lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
lengths fit in regoff_t; this isn't true if regoff_t is the same
width as size_t.
* lib/regex.c (re_search_internal): 5th arg is LAST_START
(= START + RANGE) instead of RANGE.  This avoids overflow
problems when regoff_t is the same width as size_t.
All callers changed.
(re_search_2_stub): Check for overflow when adding the
sizes of the two strings.
(re_search_stub): Check for overflow when adding START
to RANGE; if it occurs, substitute the extreme value.
* config/srclist.txt: Add glibc bug 1284.
config/ChangeLog
config/srclist.txt
lib/ChangeLog
lib/regex_internal.c
lib/regexec.c