about summary refs log tree commit diff
path: root/posix/bug-regex22.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-14 01:45:37 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-14 01:45:37 +0000
commit294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca (patch)
tree0b9a617357049d60273de6ba5210ec4363c2b085 /posix/bug-regex22.c
parent81144a9c4e2ef74f2e935192db562684793a4da9 (diff)
downloadglibc-294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca.tar.gz
glibc-294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca.tar.xz
glibc-294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca.zip
Update.
2004-01-14  Jakub Jelinek  <jakub@redhat.com>

	* 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.
Diffstat (limited to 'posix/bug-regex22.c')
-rw-r--r--posix/bug-regex22.c10
1 files changed, 10 insertions, 0 deletions
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
@@ -97,6 +97,16 @@ main (void)
 
   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);
   if (s == NULL)
     {