mirror of https://github.com/mirror/busybox.git
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>1_19_stable
parent
281e7b8848
commit
fbea220560
|
@ -375,7 +375,7 @@ static NOINLINE void attach_option(
|
||||||
new->data = xmalloc(length + OPT_DATA);
|
new->data = xmalloc(length + OPT_DATA);
|
||||||
new->data[OPT_CODE] = optflag->code;
|
new->data[OPT_CODE] = optflag->code;
|
||||||
new->data[OPT_LEN] = length;
|
new->data[OPT_LEN] = length;
|
||||||
memcpy(new->data + OPT_DATA, buffer, length);
|
memcpy(new->data + OPT_DATA, (allocated ? allocated : buffer), length);
|
||||||
|
|
||||||
curr = opt_list;
|
curr = opt_list;
|
||||||
while (*curr && (*curr)->data[OPT_CODE] < optflag->code)
|
while (*curr && (*curr)->data[OPT_CODE] < optflag->code)
|
||||||
|
|
Loading…
Reference in New Issue