[Asterisk-code-review] app voicemail.c: Fix compiler warning with IMAP build. (asterisk[15])

Jenkins2 asteriskteam at digium.com
Fri Oct 27 08:48:58 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6925 )

Change subject: app_voicemail.c: Fix compiler warning with IMAP build.
......................................................................

app_voicemail.c: Fix compiler warning with IMAP build.

ASTERISK-27181

Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17
---
M apps/app_voicemail.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index a9b8fe3..ecd423f 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8928,7 +8928,7 @@
 {
 	char *file, *filename;
 	char *attachment;
-	char arg[10];
+	char arg[11];
 	int i;
 	BODY* body;
 	int curr_mbox;
@@ -8964,7 +8964,7 @@
 		}
 		filename = strsep(&attachment, ".");
 		if (!strcmp(filename, file)) {
-			sprintf(arg, "%d", i + 1);
+			snprintf(arg, sizeof(arg), "%d", i + 1);
 			mail_setflag(vms->mailstream, arg, "\\DELETED");
 		}
 	}

-- 
To view, visit https://gerrit.asterisk.org/6925
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17
Gerrit-Change-Number: 6925
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171027/d842cb7d/attachment.html>


More information about the asterisk-code-review mailing list