From: Ben Pfaff Date: Fri, 9 Jan 2009 01:20:34 +0000 (-0800) Subject: fatal-signal: Fix bug in call_hooks() recursion detection. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dcde6dcf38183548e53ae7540e9249f07052f28;p=openvswitch fatal-signal: Fix bug in call_hooks() recursion detection. Found by Chris Eagle via Fortify. --- diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index b05bd281..0bfa35bc 100644 --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -167,7 +167,7 @@ atexit_handler(void) static void call_hooks(int sig_nr) { - volatile sig_atomic_t recurse = 0; + static volatile sig_atomic_t recurse = 0; if (!recurse) { size_t i;