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: v7.0.0-beta1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53aeb7b808e15209edb4cb6423648337755351ee;p=thirdparty%2Fdhcpcd.git Fix a potential crash where the ARP state could be freed during processing. --- diff --git a/src/arp.c b/src/arp.c index 9db5387f..fc1223e1 100644 --- a/src/arp.c +++ b/src/arp.c @@ -207,6 +207,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; } }