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

George Joseph (JIRA) noreply at issues.asterisk.org
Mon Apr 6 08:18:26 CDT 2020


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

George Joseph updated ASTERISK-28804:
-------------------------------------

    Assignee: Alexander Traud

> [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
>         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