]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue 10062 - Trying to move a message without selecting one first results in memory...
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 26 Jun 2007 12:25:58 +0000 (12:25 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 26 Jun 2007 12:25:58 +0000 (12:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71750 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index e4dcce86fb950d072cea87a8992ce109d5fadbdc..98128957a5df0aa87f4bc21fe853be9a47e7fe74 100644 (file)
@@ -5478,6 +5478,11 @@ static int vm_execmain(struct ast_channel *chan, void *data)
                                cmd = ast_play_and_wait(chan, "vm-nomore");
                        break;
                case '9':
+                       if (vms.curmsg < 0 || vms.curmsg > vms.lastmsg) {
+                               /* No message selected */
+                               cmd = 0;
+                               break;
+                       }
                        if (useadsi)
                                adsi_folders(chan, 1, "Save to folder...");
                        cmd = get_folder2(chan, "vm-savefolder", 1);