Commit 205179d0 authored by Chen Gang's avatar Chen Gang Committed by Greg Kroah-Hartman

staging: wlags49_h2: strncpy, need checking the memory length

HCF_MAX_NAME_LEN is 32, which may less than ''probe_rsp->rawData[1]'',
so need check the length when copy to ssid.
Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a85fd2c8
......@@ -3171,7 +3171,8 @@ void wl_process_mailbox( struct wl_private *lp )
memset( ssid, 0, sizeof( ssid ));
strncpy( ssid, &probe_rsp->rawData[2],
probe_rsp->rawData[1] );
min(probe_rsp->rawData[1],
HCF_MAX_NAME_LEN - 1));
DBG_TRACE( DbgInfo, "(%s) SSID : %s\n",
lp->dev->name, ssid );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment