From: Christian Grothoff Date: Thu, 15 Mar 2012 12:57:47 +0000 (+0000) Subject: -ease life of static analysis tools X-Git-Tag: initial-import-from-subversion-38251~14243 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=11b82133f7d92497f4057f0231ea7c982af1b9ce;p=oweals%2Fgnunet.git -ease life of static analysis tools --- diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 03862cc1c..ebb4ac10f 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c @@ -1497,8 +1497,9 @@ stdin_send_hw (void *cls, const struct GNUNET_MessageHeader *hdr) rtheader.header.it_len = GNUNET_htole16 (sizeof (rtheader)); rtheader.rate = header->rate; memcpy (write_pout.buf, &rtheader, sizeof (rtheader)); + memcpy (&write_pout.buf[sizeof (rtheader)], &header->frame, sendsize); wlanheader = (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *) &write_pout.buf[sizeof (rtheader)]; - memcpy (wlanheader, &header->frame, sendsize); + /* payload contains MAC address, but we don't trust it, so we'll * overwrite it with OUR MAC address again to prevent mischief */ mac_set (wlanheader, dev);