Bug 11184 - posix/regex_internal.c (re_dfa_add_node): correct overflow detection
Summary: posix/regex_internal.c (re_dfa_add_node): correct overflow detection
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: regex (show other bugs)
Version: 2.12
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-19 11:23 UTC by jim@meyering.net
Modified: 2010-01-22 17:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
regex_internal.c: correct re_realloc overflow detection (749 bytes, patch)
2010-01-19 11:27 UTC, jim@meyering.net
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jim@meyering.net 2010-01-19 11:23:51 UTC
Patch attached:

	regex_internal.c: correct re_realloc overflow detection
	* posix/regex_internal.c (re_dfa_add_node): Correct the overflow
	detection test.  Patch by Paul Eggert.
Comment 1 jim@meyering.net 2010-01-19 11:27:39 UTC
Created attachment 4530 [details]
regex_internal.c: correct re_realloc overflow detection

2010-01-19  Jim Meyering  <meyering@redhat.com>

	[BZ #11184]
	regex_internal.c: correct re_realloc overflow detection
	* posix/regex_internal.c (re_dfa_add_node): Correct the overflow
	detection test.  Patch by Paul Eggert.

Note that the "sizeof(int)" makes it slightly more convenient to keep in sync
with gnulib's "sizeof(Idx)".
Comment 2 Ulrich Drepper 2010-01-22 17:49:49 UTC
I checked in a slightly changed version of the patch.