summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/udhcp/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 589bcd6..1aaf525 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -268,7 +268,8 @@ uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code)
}
if (optionptr[OPT_CODE] == DHCP_OPTION_OVERLOAD) {
- overload |= optionptr[OPT_DATA];
+ if (len >= 3)
+ overload |= optionptr[OPT_DATA];
/* fall through */
}
optionptr += len;