Fix a place where configuration values could cause an overflow of a buffer.
authorRussell Bryant <russell@russellbryant.com>
Thu, 13 Mar 2008 20:35:28 +0000 (20:35 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 13 Mar 2008 20:35:28 +0000 (20:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index fd6d32b..ce5c697 100644 (file)
@@ -5013,7 +5013,7 @@ static void imap_mailbox_name(char *spec, size_t len, struct vm_state *vms, int
        if (box == NEW_FOLDER || box == OLD_FOLDER)
                snprintf(spec, len, "%s%s", tmp, use_folder? imapfolder: "INBOX");
        else if (box == GREETINGS_FOLDER)
-               sprintf(spec, "%s%s", tmp, greetingfolder);
+               snprintf(spec, len, "%s%s", tmp, greetingfolder);
        else
                snprintf(spec, len, "%s%s%c%s", tmp, imapfolder, delimiter, mbox(box));
 }