[asterisk-bugs] [JIRA] (ASTERISK-27181) GCC 7 warning: app_voicemail.c: In function 'imap_delete_old_greeting'

George Joseph (JIRA) noreply at issues.asterisk.org
Mon Aug 7 14:15:08 CDT 2017


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

George Joseph updated ASTERISK-27181:
-------------------------------------

    Status: Open  (was: Triage)

> GCC 7 warning: app_voicemail.c: In function 'imap_delete_old_greeting'
> ----------------------------------------------------------------------
>
>                 Key: ASTERISK-27181
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27181
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_voicemail/IMAP
>    Affects Versions: 15.0.0-beta1
>         Environment: Fedora 26 x86_64, gcc-7.1.1-3.fc26.x86_64
>            Reporter: Anthony Messina
>            Severity: Minor
>
> Warning when compiling
> {code}
> gcc  -o app_directory.so -pthread -m64 -Wl,--as-needed,--library-path=/usr/lib64 -Wl,-z,relro     -shared -Wl,--version-script,app_directory.exports,--warn-common  app_directory.o  
> app_voicemail.c: In function 'imap_delete_old_greeting':
> app_voicemail.c:8918:17: warning: '__builtin___sprintf_chk' may write a terminating nul past the end of the destination [-Wformat-overflow=]
>     sprintf(arg, "%d", i + 1);
>                  ^~~~
> In file included from /usr/include/stdio.h:939:0,
>                  from /builddir/build/BUILD/asterisk-15.0.0-beta1/include/asterisk/compat.h:49,
>                  from /builddir/build/BUILD/asterisk-15.0.0-beta1/include/asterisk.h:22,
>                  from app_voicemail.c:83:
> /usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 2 and 11 bytes into a destination of size 10
>    return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>        __bos (__s), __fmt, __va_arg_pack ());
>        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> {code}



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



More information about the asterisk-bugs mailing list