diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ping.c | 2 | ||||
-rw-r--r-- | networking/udhcp/common.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/networking/ping.c b/networking/ping.c index 3aba490..5fc80fe 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -394,7 +394,7 @@ static void sendping4(int junk UNUSED_PARAM) #if ENABLE_PING6 static void sendping6(int junk UNUSED_PARAM) { - struct icmp6_hdr *pkt = alloca(datalen + sizeof(struct icmp6_hdr) + 4); + struct icmp6_hdr *pkt = G.snd_packet; //memset(pkt, 0, datalen + sizeof(struct icmp6_hdr) + 4); pkt->icmp6_type = ICMP6_ECHO_REQUEST; diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 311f79e..0a60261 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c @@ -375,7 +375,7 @@ static NOINLINE void attach_option( new->data = xmalloc(length + OPT_DATA); new->data[OPT_CODE] = optflag->code; new->data[OPT_LEN] = length; - memcpy(new->data + OPT_DATA, buffer, length); + memcpy(new->data + OPT_DATA, (allocated ? allocated : buffer), length); curr = opt_list; while (*curr && (*curr)->data[OPT_CODE] < optflag->code) |