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
gcc 15 warning about possible writing beyond bounds of a buffer.
Looks like a false positive to me since there is a check for each byte if the end of the buffer has been reached, and the bounds are correct, but it's possible I've missed something...
Relevant log output
[CCi] app_stack.i -> app_stack.o
In function'packsms8',
inlined from 'sms_exec' at app_sms.c:1997:76:
app_sms.c:470:24: error: writing 32 bytes into a region of size 6 [-Werror=stringop-overflow=]
470 | o[p++] = u;|~~~~~~~^~~
app_sms.c: In function'sms_exec':
app_sms.c:450:23: note: at offset [134, 140] into destination object 'dummy' of size 140
450 | unsigned char dummy[SMSLEN_8];| ^~~~~
cc1: all warnings being treated as errors
make[1]: *** [/usr/src/asterisk-22.2.0-rc1/Makefile.rules:151: app_sms.o] Error 1
Asterisk Issue Guidelines
Yes, I have read the Asterisk Issue Guidelines
The text was updated successfully, but these errors were encountered:
Ignore gcc warning about writing 32 bytes into a region of size 6,
since we check that we don't go out of bounds for each byte.
Resolves: asterisk#1088
Severity
Major
Versions
22.2.0-rc1
Components/Modules
app_sms
Operating Environment
Fedora 42
Frequency of Occurrence
Constant
Issue Description
gcc 15 warning about possible writing beyond bounds of a buffer.
Looks like a false positive to me since there is a check for each byte if the end of the buffer has been reached, and the bounds are correct, but it's possible I've missed something...
Relevant log output
Asterisk Issue Guidelines
The text was updated successfully, but these errors were encountered: