diff options
| author | Roy Marples <roy@marples.name> | 2017-03-27 16:01:52 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-03-27 16:43:26 +0100 |
| commit | 229e6ce549bfc738c7d09a98dc3dc77a716dc18e (patch) | |
| tree | 4aa99dd2db5f4849e09e8fad32ec331e1b0a6b79 | |
| parent | a017eae146151a5ffeefe23757a1bc703ddbfdcc (diff) | |
| download | dhcpcd-229e6ce549bfc738c7d09a98dc3dc77a716dc18e.tar.xz | |
Fix a potential crash where the DHCP state could be freed during processing.
| -rw-r--r-- | dhcp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3223,6 +3223,9 @@ dhcp_readpacket(void *arg) return; } dhcp_handlepacket(ifp, buf, (size_t)bytes, flags); + /* Check we still have a state after processing. */ + if ((state = D_CSTATE(ifp)) == NULL || state->bpf_fd == -1) + break; } } |
