diff options
-rw-r--r-- | networking/udhcp/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 99ecb7aa6..f2d6907ad 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -282,11 +282,11 @@ uint8_t* FAST_FUNC udhcp_scan_options(struct dhcp_packet *packet, struct dhcp_sc | |||
282 | * (this violates RFC 2132 section 3.14). | 282 | * (this violates RFC 2132 section 3.14). |
283 | */ | 283 | */ |
284 | if (len == 0) { | 284 | if (len == 0) { |
285 | scan_state->rem -= OPT_LEN; | 285 | scan_state->rem -= 2; |
286 | scan_state->optionptr += OPT_LEN; | 286 | scan_state->optionptr += 2; |
287 | continue; | 287 | continue; |
288 | } | 288 | } |
289 | len += OPT_LEN; | 289 | len += 2; |
290 | scan_state->rem -= len; | 290 | scan_state->rem -= len; |
291 | if (scan_state->rem < 0) /* option is longer than options field? */ | 291 | if (scan_state->rem < 0) /* option is longer than options field? */ |
292 | goto complain; /* yes, complain and return NULL */ | 292 | goto complain; /* yes, complain and return NULL */ |