Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267504
b: refs/heads/master
c: 49d468f
h: refs/heads/master
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent ee4fe0b commit d2eb46b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 183eeb985a2cdbf37c7850c5e8e99cc1cc26901f
refs/heads/master: 49d468f64d59016030c2835a423833e7b45ccce5
7 changes: 5 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6111,9 +6111,12 @@ _brcms_c_ioctl(struct brcms_c_info *wlc, int cmd, void *arg, int len,
/* default argument is generic integer */
pval = arg ? (int *)arg : NULL;

/* This will prevent the misaligned access */
/*
* This will prevent misaligned access. The (void *) cast prevents a
* memcpy alignment issue on e.g. Sparc64 platforms.
*/
if (pval && (u32) len >= sizeof(val))
memcpy(&val, pval, sizeof(val));
memcpy((void *)&val, (void *)pval, sizeof(val));
else
val = 0;

Expand Down

0 comments on commit d2eb46b

Please sign in to comment.