Skip to content

Commit

Permalink
brcmfmac: rework pointer trickery in brcmf_proto_bcdc_query_dcmd()
Browse files Browse the repository at this point in the history
The variable info is assigned to point to bcdc->msg[1], which is the
same as pointing to bcdc->buf. As that is what we want to access
make it clear by fixing the assignment. This also avoid out-of-bounds
errors from static analyzers are bcdc->msg[1] is not in the structure
definition.

Reviewed-by: Hante Meuleman <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Franky Lin <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
Arend Van Spriel authored and Kalle Valo committed Sep 26, 2016
1 parent b3589df commit 704d1c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ brcmf_proto_bcdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd,
}

/* Check info buffer */
info = (void *)&msg[1];
info = (void *)&bcdc->buf[0];

/* Copy info buffer */
if (buf) {
Expand Down

0 comments on commit 704d1c6

Please sign in to comment.