aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/options.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-25 03:15:24 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-25 03:15:24 +0000
commit72e76044cfda377486a5199a0d35d71edf669a42 (patch)
tree69e3f0f81955aae4e82d4073b8067b9bc3f9bd44 /networking/udhcp/options.c
parenta8875efa8506e52ffb24db833e32ab8cfb9bceef (diff)
downloadbusybox-w32-72e76044cfda377486a5199a0d35d71edf669a42.tar.gz
busybox-w32-72e76044cfda377486a5199a0d35d71edf669a42.tar.bz2
busybox-w32-72e76044cfda377486a5199a0d35d71edf669a42.zip
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.c2
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)
145 int end = end_option(optionptr); 145 int end = end_option(optionptr);
146 146
147 /* end position + string length + option code/length + end option */ 147 /* end position + string length + option code/length + end option */
148 if (end + string[OPT_LEN] + 2 + 1 >= 308) { 148 if (end + string[OPT_LEN] + 2 + 1 >= DHCP_OPTIONS_BUFSIZE) {
149 bb_error_msg("option 0x%02x did not fit into the packet", 149 bb_error_msg("option 0x%02x did not fit into the packet",
150 string[OPT_CODE]); 150 string[OPT_CODE]);
151 return 0; 151 return 0;