aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-02-06 18:00:58 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-02-06 18:00:58 +0100
commitfbea22056014a05a0c6619eb458d4955869b5e93 (patch)
treeb014af1203ce3bcfda9204014f7be9f8d440b2e3 /networking/udhcp
parent281e7b8848108f26253ffc466fc149c04665a2c2 (diff)
downloadbusybox-w32-fbea22056014a05a0c6619eb458d4955869b5e93.tar.gz
busybox-w32-fbea22056014a05a0c6619eb458d4955869b5e93.tar.bz2
busybox-w32-fbea22056014a05a0c6619eb458d4955869b5e93.zip
udhcpc: fix a problem with binary-encoded options
function old new delta attach_option 395 413 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 311f79e7e..0a60261ab 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -375,7 +375,7 @@ static NOINLINE void attach_option(
375 new->data = xmalloc(length + OPT_DATA); 375 new->data = xmalloc(length + OPT_DATA);
376 new->data[OPT_CODE] = optflag->code; 376 new->data[OPT_CODE] = optflag->code;
377 new->data[OPT_LEN] = length; 377 new->data[OPT_LEN] = length;
378 memcpy(new->data + OPT_DATA, buffer, length); 378 memcpy(new->data + OPT_DATA, (allocated ? allocated : buffer), length);
379 379
380 curr = opt_list; 380 curr = opt_list;
381 while (*curr && (*curr)->data[OPT_CODE] < optflag->code) 381 while (*curr && (*curr)->data[OPT_CODE] < optflag->code)