From 0 Mon Sep 17 00:00:00 2001 From: Mikhail Efremov Date: Thu, 25 Oct 2012 17:46:19 +0400 Subject: [PATCH 16] Fix segfault in case of NULL timeout. Handle cases in add_timeout() where the function is called with a NULL value for the 'when' parameter. Applied dhcp-4.2.0-add_timeout_when_NULL.patch from Fedora. See https://bugzilla.redhat.com/show_bug.cgi?id=506626. diff --git a/dhcp/common/dispatch.c b/dhcp/common/dispatch.c index defaced..defaced 100644 --- a/dhcp/common/dispatch.c +++ b/dhcp/common/dispatch.c @@ -209,6 +209,10 @@ void add_timeout (when, where, what, ref, unref) isc_interval_t interval; isc_time_t expires; + if (when == NULL) { + return; + } + /* See if this timeout supersedes an existing timeout. */ t = (struct timeout *)0; for (q = timeouts; q; q = q->next) {