From: Richard Mudgett Date: Thu, 26 Oct 2017 17:18:00 +0000 (-0500) Subject: app_voicemail.c: Fix compiler warning with IMAP build. X-Git-Tag: 13.19.0-rc1~185^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2db97ee219a24c464cd294cd5677a6415b227f62;p=thirdparty%2Fasterisk.git app_voicemail.c: Fix compiler warning with IMAP build. ASTERISK-27181 Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index f954e278ee..d0e1763bad 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8922,7 +8922,7 @@ static int imap_delete_old_greeting (char *dir, struct vm_state *vms) { char *file, *filename; char *attachment; - char arg[10]; + char arg[11]; int i; BODY* body; int curr_mbox; @@ -8958,7 +8958,7 @@ static int imap_delete_old_greeting (char *dir, struct vm_state *vms) } 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"); } }