summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2013-05-17 15:13:38 +0200
committerDenys Vlasenko2013-05-17 15:13:38 +0200
commitc133fa66f37d69efb0d2e10ad2e068564933d92c (patch)
tree517e4ffd779eaa271bb34033f631c56328e37b56
parent6db5f679a21342249e6a6eb06ec70a337bf0d0b0 (diff)
downloadbusybox-c133fa66f37d69efb0d2e10ad2e068564933d92c.zip
busybox-c133fa66f37d69efb0d2e10ad2e068564933d92c.tar.gz
udhcpc: fix a problem with binary-encoded options #2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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 ae0e0d3..9c27cd0 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -424,7 +424,7 @@ static NOINLINE void attach_option(
existing->data[OPT_DATA + old_len] = ' ';
old_len++;
}
- memcpy(existing->data + OPT_DATA + old_len, buffer, length);
+ memcpy(existing->data + OPT_DATA + old_len, (allocated ? allocated : buffer), length);
existing->data[OPT_LEN] = old_len + length;
} /* else, ignore the data, we could put this in a second option in the future */
} /* else, ignore the new data */