lwfinger / rtl8723du

89 stars 43 forks source link

compile warning: core/rtw_br_ext.c:94:9: warning: ‘memcpy’ forming offset [40, 2051] is out of the bounds [0, 40] #28

Open dsx724 opened 2 years ago

dsx724 commented 2 years ago

In function ‘__nat25_add_pppoe_tag’, inlined from ‘nat25_db_handle’ at /root/rtl8723du/core/rtw_br_ext.c:1121:11: /root/rtl8723du/core/rtw_br_ext.c:94:9: warning: ‘memcpy’ forming offset [40, 2051] is out of the bounds [0, 40] of object ‘tag_buf’ with type ‘unsigned char[40]’ [-Warray-bounds] 94 | memcpy((unsigned char *)ph->tag, tag, data_len); | ^~~~~~~~~~~ /root/rtl8723du/core/rtw_br_ext.c: In function ‘nat25_db_handle’: /root/rtl8723du/core/rtw_br_ext.c:1090:63: note: ‘tag_buf’ declared here 1090 | unsigned char tag_buf[40]; | ^~~