From 294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jan 2004 01:45:37 +0000 Subject: Update. 2004-01-14 Jakub Jelinek * posix/regcomp.c (peek_token_bracket): Check remaining string length before re_string_peek_byte (x, 1). (parse_bracket_symbol): Likewise. * posix/regex_internal.h (re_string_is_single_byte_char): Return true at last byte in the string. * posix/bug-regex22.c (main): Add new test. --- posix/bug-regex22.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'posix/bug-regex22.c') diff --git a/posix/bug-regex22.c b/posix/bug-regex22.c index 4d8357c27b..1636202d36 100644 --- a/posix/bug-regex22.c +++ b/posix/bug-regex22.c @@ -95,6 +95,16 @@ main (void) regfree (&re); } + memset (&re, 0, sizeof (re)); + re.translate = trans; + s = re_compile_pattern ("[[:DIGIT:]]", 11, &re); + if (s == NULL) + { + printf ("compilation of \"[[:DIGIT:]]\" pattern unexpectedly succeeded: %s\n", + s); + result = 1; + } + memset (&re, 0, sizeof (re)); re.translate = trans; s = re_compile_pattern ("[[:DIGIT:]]", 2, &re); -- cgit 1.4.1