[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:31:25 CDT 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Traud updated ASTERISK-28804:
---------------------------------------

    Review Link: https://gerrit.asterisk.org/14086

> [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: 13.32.0, 16.9.0, 17.3.0
>            Reporter: Alexander Traud
>            Severity: Trivial
>              Labels: patch
>         Attachments: gcc-9.patch
>
>
> 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