summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-08-13 14:52:50 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-08-13 14:52:50 +0000
commitd6e931866e738b79af4534082f852bf3a0bfdf68 (patch)
tree285e14adc69f738f9814ad650b6503f17f0b8ca6 /lib
parente3c8d54a792ae8babd51739f377ebc34a8498a35 (diff)
Change an assert into a loop termination condition. Fixes a core
dump found by jmc@. OK otto@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/regex/engine.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index 9f24b201a2a..f2bab62a559 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.9 2004/04/02 18:34:33 otto Exp $ */
+/* $OpenBSD: engine.c,v 1.10 2004/08/13 14:52:49 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
@@ -36,7 +36,7 @@
*/
#if defined(SNAMES) && defined(LIBC_SCCS) && !defined(lint)
-static char enginercsid[] = "$OpenBSD: engine.c,v 1.9 2004/04/02 18:34:33 otto Exp $";
+static char enginercsid[] = "$OpenBSD: engine.c,v 1.10 2004/08/13 14:52:49 millert Exp $";
#endif /* SNAMES and LIBC_SCCS and not lint */
/*
@@ -273,8 +273,9 @@ int eflags;
/* despite initial appearances, there is no match here */
NOTE("false alarm");
+ if (m->coldp == stop)
+ break;
start = m->coldp + 1; /* recycle starting later */
- assert(start <= stop);
}
/* fill in the details if requested */