From: Roy Marples Date: Mon, 27 Mar 2017 14:56:34 +0000 (+0100) Subject: Fix a potential crash where the ARP state could be freed during processing. X-Git-Tag: v6.11.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a017eae146151a5ffeefe23757a1bc703ddbfdcc;p=thirdparty%2Fdhcpcd.git Fix a potential crash where the ARP state could be freed during processing. --- diff --git a/arp.c b/arp.c index 9943a212..bf1f4974 100644 --- a/arp.c +++ b/arp.c @@ -204,6 +204,9 @@ arp_read(void *arg) return; } arp_packet(ifp, buf, (size_t)bytes); + /* Check we still have a state after processing. */ + if ((state = ARP_CSTATE(ifp)) == NULL || state->fd == -1) + break; } }