diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-25 03:15:24 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-25 03:15:24 +0000 |
commit | 72e76044cfda377486a5199a0d35d71edf669a42 (patch) | |
tree | 69e3f0f81955aae4e82d4073b8067b9bc3f9bd44 /networking/udhcp/options.c | |
parent | a8875efa8506e52ffb24db833e32ab8cfb9bceef (diff) |
dhcpc: cope with buggy DHCP servers which send oversized packets
(Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)
Diffstat (limited to 'networking/udhcp/options.c')
-rw-r--r-- | networking/udhcp/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c index 2b4f1644f..6744e2ad0 100644 --- a/networking/udhcp/options.c +++ b/networking/udhcp/options.c @@ -145,7 +145,7 @@ int add_option_string(uint8_t *optionptr, uint8_t *string) int end = end_option(optionptr); /* end position + string length + option code/length + end option */ - if (end + string[OPT_LEN] + 2 + 1 >= 308) { + if (end + string[OPT_LEN] + 2 + 1 >= DHCP_OPTIONS_BUFSIZE) { bb_error_msg("option 0x%02x did not fit into the packet", string[OPT_CODE]); return 0; |