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

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Mon Apr 1 13:23:56 CDT 2019


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

Kevin Harwell updated ASTERISK-27578:
-------------------------------------

    Target Release Version/s: 16.3.0

> [patch] app_osplookup.c: Avoid a format truncation.
> ---------------------------------------------------
>
>                 Key: ASTERISK-27578
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27578
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_osplookup
>    Affects Versions: 13.19.0, 15.2.0
>            Reporter: Alexander Traud
>            Assignee: Alexander Traud
>            Severity: Trivial
>              Labels: patch
>      Target Release: 13.20.0, 15.3.0, 16.0.0, 16.3.0
>
>         Attachments: truncation_gcc_osplookup.patch
>
>
> The compiler _GCC_ (7.2) reports:{code}app_osplookup.c: In function 'osplookup_exec':
> app_osplookup.c:2584:42: warning: '%s' directive output may be truncated writing up to 4095 bytes into a region of size 4078 [-Wformat-truncation=]
>     snprintf(buffer, sizeof(buffer), "%s: %s", OSP_SIP_HEADER, results.token);
>                                           ^~                   ~~~~~~~
> app_osplookup.c: In function 'ospnext_exec':
> app_osplookup.c:2770:42: warning: '%s' directive output may be truncated writing up to 4095 bytes into a region of size 4078 [-Wformat-truncation=]
>     snprintf(buffer, sizeof(buffer), "%s: %s", OSP_SIP_HEADER, results.token);
>                                           ^~                   ~~~~~~~{code}ASTERISK-27156 tried to fix all warning reported by GCC 7.0 (and newer) but missed this module, because it depends on the package _libosptk-dev_, which is available only since Ubuntu 17.04, for example. Consequently, the above issue would emerge when going for script {{install_prereq}} on the upcoming Ubuntu 18.04 LTS.
> For us external project members, covering the whole source code of Asterisk including all optional and conditional code is more than complicated. Perhaps one day, the Asterisk team is able to find a solution to identify issues with new compiler (versions) more systematically.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list