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

Asterisk Team (JIRA) noreply at issues.asterisk.org
Fri Jan 12 04:22:40 CST 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=241493#comment-241493 ] 

Asterisk Team commented on ASTERISK-27578:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> [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
>            Severity: Trivial
>              Labels: patch
>         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