[asterisk-bugs] [JIRA] (ASTERISK-28804) [patch] app_osplookup.c: Avoid a format truncation.
Alexander Traud (JIRA)
noreply at issues.asterisk.org
Sat Apr 4 04:27:25 CDT 2020
Alexander Traud created ASTERISK-28804:
------------------------------------------
Summary: [patch] app_osplookup.c: Avoid a format truncation.
Key: ASTERISK-28804
URL: https://issues.asterisk.org/jira/browse/ASTERISK-28804
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Applications/app_osplookup
Affects Versions: 17.3.0, 16.9.0, 13.32.0
Reporter: Alexander Traud
Severity: Trivial
The compiler _GCC_ (9.2.1) reports:{code}
app_osplookup.c: In function ‘osp_convert_inout.constprop’:
app_osplookup.c:1011:35: warning: ‘]’ directive output may be truncated writing 1 byte into a region of size between 0 and 255 [-Wformat-truncation=]
snprintf(dest, destsize, "[%s]", buffer);
^
app_osplookup.c:1009:35: warning: ‘]:’ directive output may be truncated writing 2 bytes into a region of size between 0 and 255 [-Wformat-truncation=]
snprintf(dest, destsize, "[%s]:%s", buffer, port);
^~
{code}ASTERISK-27578 did not find that issue, therefore GCC seems to have improved to detect such issues.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list