]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ps3_gelic: fix memcpy parameter
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Tue, 26 Apr 2016 02:33:43 +0000 (04:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 20:37:56 +0000 (16:37 -0400)
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>
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c

index 13214a6492ac5b1eced4d39c21b7736f5dcf19d4..743b18266a7c2b2be2b33f2d3f7fea0f9b80e361 100644 (file)
@@ -1622,7 +1622,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)
                        continue;
 
                /* 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,
                                            sizeof(scan_info->essid));
                target->rate_len = 0;