提交 eb63efb4 编写于 作者: C Christophe Jaillet 提交者: David S. Miller

ps3_gelic: fix memcpy parameter

The size allocated for target->hwinfo and the number of bytes copied in it
should be consistent.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 14437e3f
...@@ -1622,7 +1622,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl) ...@@ -1622,7 +1622,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)
continue; continue;
/* copy hw scan info */ /* copy hw scan info */
memcpy(target->hwinfo, scan_info, scan_info->size); memcpy(target->hwinfo, scan_info, be16_to_cpu(scan_info->size));
target->essid_len = strnlen(scan_info->essid, target->essid_len = strnlen(scan_info->essid,
sizeof(scan_info->essid)); sizeof(scan_info->essid));
target->rate_len = 0; target->rate_len = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册