1998-11-19 Ulrich Drepper <drepper@cygnus.com>
* posix/regex.c (regex_compile): Handle extra long class names
correctly.
+1998-11-19 Ulrich Drepper <drepper@cygnus.com>
+
+ * posix/regex.c (regex_compile): Handle extra long class names
+ correctly.
+
1998-11-19 Geoff Keating <geoffk@ozemail.com.au>
* elf/rtld.c (_dl_start): Handle weak undefined symbols in ld.so
for (;;)
{
PATFETCH (c);
- if ((c == ':' && *p == ']') || p == pend
- || c1 == CHAR_CLASS_MAX_LENGTH)
+ if ((c == ':' && *p == ']') || p == pend)
break;
- str[c1++] = c;
+ if (c1 < CHAR_CLASS_MAX_LENGTH)
+ str[c1++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
}
str[c1] = '\0';