[netfilter-cvslog] r3431 - trunk/nfsim/core
rusty at netfilter.org
rusty at netfilter.org
Fri Dec 17 08:59:59 CET 2004
Author: rusty at netfilter.org
Date: 2004-12-17 08:59:58 +0100 (Fri, 17 Dec 2004)
New Revision: 3431
Modified:
trunk/nfsim/core/failtest.c
Log:
Check depth of forking and limit it.
Modified: trunk/nfsim/core/failtest.c
===================================================================
--- trunk/nfsim/core/failtest.c 2004-12-17 06:47:47 UTC (rev 3430)
+++ trunk/nfsim/core/failtest.c 2004-12-17 07:59:58 UTC (rev 3431)
@@ -28,6 +28,7 @@
static bool failtest = false;
bool suppress_failtest;
+static int generations = 0;
/* Failures pattern so far. */
static char *faillist;
@@ -136,6 +137,9 @@
* point, but should not crash. */
if (child == 0) {
faillist = talloc_asprintf_append(faillist, "[%s]F", func);
+ if (++generations > 128)
+ barf("Too deep recursion on failure path:\n%s",
+ faillist);
return true;
}
More information about the netfilter-cvslog
mailing list