diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-05-17 15:13:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-05-17 15:13:38 +0200 |
commit | c133fa66f37d69efb0d2e10ad2e068564933d92c (patch) | |
tree | 517e4ffd779eaa271bb34033f631c56328e37b56 /networking/udhcp | |
parent | 6db5f679a21342249e6a6eb06ec70a337bf0d0b0 (diff) | |
download | busybox-w32-c133fa66f37d69efb0d2e10ad2e068564933d92c.tar.gz busybox-w32-c133fa66f37d69efb0d2e10ad2e068564933d92c.tar.bz2 busybox-w32-c133fa66f37d69efb0d2e10ad2e068564933d92c.zip |
udhcpc: fix a problem with binary-encoded options #2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index ae0e0d306..9c27cd0ef 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -424,7 +424,7 @@ static NOINLINE void attach_option( | |||
424 | existing->data[OPT_DATA + old_len] = ' '; | 424 | existing->data[OPT_DATA + old_len] = ' '; |
425 | old_len++; | 425 | old_len++; |
426 | } | 426 | } |
427 | memcpy(existing->data + OPT_DATA + old_len, buffer, length); | 427 | memcpy(existing->data + OPT_DATA + old_len, (allocated ? allocated : buffer), length); |
428 | existing->data[OPT_LEN] = old_len + length; | 428 | existing->data[OPT_LEN] = old_len + length; |
429 | } /* else, ignore the data, we could put this in a second option in the future */ | 429 | } /* else, ignore the data, we could put this in a second option in the future */ |
430 | } /* else, ignore the new data */ | 430 | } /* else, ignore the new data */ |