diff options
| author | Roy Marples <roy@marples.name> | 2020-04-20 22:18:41 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-04-20 22:18:41 +0100 |
| commit | 1dc1fce7ae7b4c106a8eb631ed92ab1ed8e86bbc (patch) | |
| tree | 38d84e1058d3a411608731131b84e4dd7bd8a39e /src | |
| parent | 8d0925b0c2887e9fd83011cd3c99ee40f1ac2b0b (diff) | |
| download | dhcpcd-1dc1fce7ae7b4c106a8eb631ed92ab1ed8e86bbc.tar.xz | |
DHCP: Avoid mis-aligned BOOTP structure
This was caused by the recent change to pass back the frame header.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dhcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3494,8 +3494,9 @@ dhcp_packet(struct interface *ifp, uint8_t *data, size_t len) __func__, ifp->name); return; } - data += fl; len -= fl; + /* Move the data to avoid alignment errors. */ + memmove(data, data + fl, len); } /* Validate filter. */ |
