mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 07:29:40 +00:00
rtl8188eu: Fix smatch warnings in core/rtw_efuse.c
Smatch reports the following warnings: CHECK /home/finger/rtl8188eu/core/rtw_efuse.c /home/finger/rtl8188eu/core/rtw_efuse.c:646 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 /home/finger/rtl8188eu/core/rtw_efuse.c:655 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 /home/finger/rtl8188eu/core/rtw_efuse.c:738 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 /home/finger/rtl8188eu/core/rtw_efuse.c:747 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 These are due to an off-by-one error in an array size. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
4769256ac2
commit
8f7fde8d6a
1 changed files with 2 additions and 2 deletions
|
@ -599,7 +599,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
|||
{
|
||||
u8 offset, word_en;
|
||||
u8 *map;
|
||||
u8 newdata[PGPKT_DATA_SIZE];
|
||||
u8 newdata[PGPKT_DATA_SIZE + 1];
|
||||
s32 i, idx;
|
||||
u8 ret = _SUCCESS;
|
||||
u16 mapLen = 0;
|
||||
|
@ -691,7 +691,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
|
|||
{
|
||||
u8 offset, word_en;
|
||||
u8 *map;
|
||||
u8 newdata[PGPKT_DATA_SIZE];
|
||||
u8 newdata[PGPKT_DATA_SIZE + 1];
|
||||
s32 i, idx;
|
||||
u8 ret = _SUCCESS;
|
||||
u16 mapLen = 0;
|
||||
|
|
Loading…
Reference in a new issue