瀏覽代碼

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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Christophe Jaillet 9 年之前
父節點
當前提交
eb63efb4f2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/toshiba/ps3_gelic_wireless.c

+ 1 - 1
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c

@@ -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;