You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function 'QRspec_createFrame',
inlined from 'QRspec_newFrame' at src/wallet/addresses/qrencode/qrspec.c:513:9:
src/wallet/addresses/qrencode/qrspec.c:447:30: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
447 | p[width - 8] = 0xc0;
| ~~~~~~~~~~~~~^~~~~~
src/wallet/addresses/qrencode/qrspec.c:434:34: note: at offset -7 into destination object of size [0, 2147483647] allocated by 'malloc'
434 | frame = (unsigned char *)malloc((size_t)(width * width));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
evoskuil
changed the title
gcc 13.2.0: Wstringop-overflow in qrencode (-O3 only)
gcc 13.2.0: bogus Wstringop-overflow (3) in qrencode (-O3 only)
Oct 25, 2024
The warning assumes that in the above code
width = 1
is possible.The code clearly assumes otherwise. This is a perfectly safe and constant assumption because the nonzero minimum value of width is 21.
The text was updated successfully, but these errors were encountered: