]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_voicemail.c: Fix compiler warning with IMAP build.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 26 Oct 2017 17:18:00 +0000 (12:18 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 26 Oct 2017 17:18:00 +0000 (12:18 -0500)
ASTERISK-27181

Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17

apps/app_voicemail.c

index f954e278ee791ff35f519ae88e19287603f324bd..d0e1763bad43a45d2996e10dc93739b0551de69a 100644 (file)
@@ -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");
                }
        }