[Home]

Summary:ASTERISK-27181: GCC 7 warning: app_voicemail.c: In function 'imap_delete_old_greeting'
Reporter:Anthony Messina (amessina)Labels:
Date Opened:2017-08-05 22:27:46Date Closed:2017-10-26 12:27:20
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_voicemail/IMAP
Versions:15.0.0-beta1 Frequency of
Occurrence
Constant
Related
Issues:
duplicatesASTERISK-27156 Asterisk won't compile on Fedora 26 with devmode enabled.
Environment:Fedora 26 x86_64, gcc-7.1.1-3.fc26.x86_64Attachments:
Description: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}
Comments:By: Asterisk Team (asteriskteam) 2017-08-05 22:27:47.105-0500

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].

By: Richard Mudgett (rmudgett) 2017-08-07 11:54:45.177-0500

[~gjoseph] - I doesn't look like this particular compile warning was fixed by ASTERISK-27156.

By: Corey Farrell (coreyfarrell) 2017-08-07 12:29:53.980-0500

I don't have IMAP or ODBC installed on my system so it makes sense I missed this one.

By: George Joseph (gjoseph) 2017-08-07 14:13:39.384-0500

Yeah I thought format-overflow was turned off for app_voicemail in its entirety but it was format-truncation that was turned off.


By: Friendly Automation (friendly-automation) 2017-10-27 08:29:28.516-0500

Change 6924 merged by Jenkins2:
app_voicemail.c: Fix compiler warning with IMAP build.

[https://gerrit.asterisk.org/6924|https://gerrit.asterisk.org/6924]

By: Friendly Automation (friendly-automation) 2017-10-27 08:41:54.795-0500

Change 6926 merged by Joshua Colp:
app_voicemail.c: Fix compiler warning with IMAP build.

[https://gerrit.asterisk.org/6926|https://gerrit.asterisk.org/6926]

By: Friendly Automation (friendly-automation) 2017-10-27 08:49:42.750-0500

Change 6925 merged by Jenkins2:
app_voicemail.c: Fix compiler warning with IMAP build.

[https://gerrit.asterisk.org/6925|https://gerrit.asterisk.org/6925]