[802.11] Remember to NUL-terminate SSID before printing it in a DBGC() call
authorJoshua Oreman <oremanj@xenon.get-linux.org>
Mon, 15 Jun 2009 21:31:56 +0000 (14:31 -0700)
committerJoshua Oreman <oremanj@xenon.get-linux.org>
Mon, 15 Jun 2009 21:31:56 +0000 (14:31 -0700)
src/net/net80211.c

index 5ae0e2b..d9d1dd3 100644 (file)
@@ -1197,6 +1197,7 @@ struct net80211_wlan * net80211_probe ( struct net80211_device *dev,
                        DBGP ( "802.11 %p first good beacon:\n", dev );
                        DBGP_HD ( iob->data, iob_len ( iob ) );
                } else if ( signal < wlan->signal ) {
+                       ie->ssid[ie->len] = 0;
                        DBGC2 ( dev, "802.11 %p probe: beacon for %s (%s) with "
                                "weaker signal %d\n", dev, ie->ssid,
                                eth_ntoa ( hdr->addr3 ), signal );