summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/engine.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-08-13 14:52:49 +0000
committermillert <millert@openbsd.org>2004-08-13 14:52:49 +0000
commitcb95f7c662f60d18d09f62af96fb6c6c38c7fe1a (patch)
treee02862e0a981a7861b99d412831ba938c6f7bef0 /lib/libc/regex/engine.c
parentFix minor issues with IPv6 dumps and add a function for dumping the RIB table (diff)
downloadwireguard-openbsd-cb95f7c662f60d18d09f62af96fb6c6c38c7fe1a.tar.xz
wireguard-openbsd-cb95f7c662f60d18d09f62af96fb6c6c38c7fe1a.zip
Change an assert into a loop termination condition. Fixes a core
dump found by jmc@. OK otto@
Diffstat (limited to 'lib/libc/regex/engine.c')
-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 */