[asterisk-bugs] [JIRA] (ASTERISK-28804) [patch] app_osplookup.c: Avoid a format truncation.

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Sep 9 11:08:45 CDT 2020


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

Asterisk Team updated ASTERISK-28804:
-------------------------------------

    Target Release Version/s: 18.0.0

> [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
>            Assignee: Alexander Traud
>            Severity: Trivial
>              Labels: patch
>      Target Release: 13.34.0, 16.11.0, 17.5.0, 18.0.0
>
>         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