driver: bcm4329: initialize SSID variable properly
Mursalin Akon [Fri, 11 Jan 2013 17:41:14 +0000 (09:41 -0800)]
initialize SSID variable properly to ensure
no memory overrun.

Bug 1204024

Change-Id: I2485c13edcf6a0feeae3cd4b2e9e98910a771dd2
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/190684
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

drivers/net/wireless/bcm4329/wl_iw.c

index e71ab64..8cb0f3a 100644 (file)
@@ -4339,6 +4339,7 @@ wl_iw_get_essid(
        if (!extra)
                return -EINVAL;
 
+       memset(&ssid, 0, sizeof(ssid));
        if ((error = dev_wlc_ioctl(dev, WLC_GET_SSID, &ssid, sizeof(ssid)))) {
                WL_ERROR(("Error getting the SSID\n"));
                return error;