Skip to content

Commit eb63efb

Browse files
tititiou36davem330
authored andcommitted
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>
1 parent 14437e3 commit eb63efb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/toshiba/ps3_gelic_wireless.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)
16221622
continue;
16231623

16241624
/* copy hw scan info */
1625-
memcpy(target->hwinfo, scan_info, scan_info->size);
1625+
memcpy(target->hwinfo, scan_info, be16_to_cpu(scan_info->size));
16261626
target->essid_len = strnlen(scan_info->essid,
16271627
sizeof(scan_info->essid));
16281628
target->rate_len = 0;

0 commit comments

Comments
 (0)