diff options
author | Arend Van Spriel <arend.vanspriel@broadcom.com> | 2016-09-19 14:09:52 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-09-26 20:35:52 +0300 |
commit | 704d1c6b56f4ee2ad6a5f012a72a278d17c1a223 (patch) | |
tree | e7678d19bdd0f2559c9dfe2004d753ef37bd495a /drivers/net/wireless/broadcom | |
parent | b3589dfe02123a0d0ea82076a9f8ef84a46852c0 (diff) | |
download | linux-704d1c6b56f4ee2ad6a5f012a72a278d17c1a223.tar.xz |
brcmfmac: rework pointer trickery in brcmf_proto_bcdc_query_dcmd()
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 <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c index d1bc51f92686..038a960c5104 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c @@ -194,7 +194,7 @@ retry: } /* Check info buffer */ - info = (void *)&msg[1]; + info = (void *)&bcdc->buf[0]; /* Copy info buffer */ if (buf) { |