Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-modules-rtl8723au: Commit

external/modules/rtl8723au


Commit MetaInfo

Revisioneb298868662de5a1c4bd1bea93ecdd5a21d04e9e (tree)
Time2014-01-10 06:56:59
AuthorLarry Finger <Larry.Finger@lwfi...>
CommiterLarry Finger

Log Message

rtl8723au: Fix Smatch warnings in hal/rtl8723a_bt-coexist.c

Smatch lists the following:

CHECK /home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c

/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:1875 bthci_BuildLogicalLink() warn: buffer overflow 'pHciCmd->Data' 2 <= 17
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:2626 bthci_CmdEnhancedFlush() error: buffer overflow 'pHciCmd->Data' 2 <= 2
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:2879 bthci_CmdWriteLocationData() error: buffer overflow 'pHciCmd->Data' 2 <= 3
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:2880 bthci_CmdWriteLocationData() error: buffer overflow 'pHciCmd->Data' 2 <= 4
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:3897 bthci_CmdFlowSpecModify() warn: buffer overflow 'pHciCmd->Data' 2 <= 2
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:3899 bthci_CmdFlowSpecModify() warn: buffer overflow 'pHciCmd->Data' 2 <= 18
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:4151 bthci_CmdSetRSSIValue() error: buffer overflow 'pHciCmd->Data' 2 <= 2
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:4151 bthci_CmdSetRSSIValue() error: buffer overflow 'pHciCmd->Data' 2 <= 2
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:5758 bthci_UseFakeData() warn: buffer overflow 'pHciCmd->Data' 2 <= 17
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:5764 bthci_UseFakeData() warn: buffer overflow 'pHciCmd->Data' 2 <= 2
/home/finger/rtl8723au/hal/rtl8723a_bt-coexist.c:5765 bthci_UseFakeData() warn: buffer overflow 'pHciCmd->Data' 2 <= 18

An array in one of the structs was of size 2, and should have been at least 19. It is now 20.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>

Change Summary

Incremental Difference

--- a/include/rtl8723a_bt-coexist.h
+++ b/include/rtl8723a_bt-coexist.h
@@ -851,7 +851,7 @@ typedef struct _PACKET_IRP_HCICMD_DATA
851851 u16 OCF:10;
852852 u16 OGF:6;
853853 u8 Length;
854- u8 Data[2];
854+ u8 Data[20];
855855 } PACKET_IRP_HCICMD_DATA, *PPACKET_IRP_HCICMD_DATA;
856856
857857 typedef struct _BT_ASOC_ENTRY
Show on old repository browser