Module Name: src
Committed By: christos
Date: Tue Nov 8 19:25:45 UTC 2011
Modified Files:
src/lib/libc/regex: regcomp.c
Log Message:
if we don't have any sets yet, don't try to look in them.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/regex/regcomp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/regex/regcomp.c
diff -u src/lib/libc/regex/regcomp.c:1.31 src/lib/libc/regex/regcomp.c:1.32
--- src/lib/libc/regex/regcomp.c:1.31 Sun Oct 9 18:14:17 2011
+++ src/lib/libc/regex/regcomp.c Tue Nov 8 14:25:45 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: regcomp.c,v 1.31 2011/10/09 22:14:17 christos Exp $ */
+/* $NetBSD: regcomp.c,v 1.32 2011/11/08 19:25:45 christos Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -76,7 +76,7 @@
#if 0
static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
#else
-__RCSID("$NetBSD: regcomp.c,v 1.31 2011/10/09 22:14:17 christos Exp $");
+__RCSID("$NetBSD: regcomp.c,v 1.32 2011/11/08 19:25:45 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -761,7 +761,6 @@ p_bracket(
{
cset *cs;
int invert = 0;
-
_DIAGASSERT(p != NULL);
cs = allocset(p);
@@ -1562,6 +1561,9 @@ isinsets(
_DIAGASSERT(g != NULL);
+ if (g->setbits == NULL)
+ return 0;
+
ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)