From d6a4a47e6168602dd35af98246187a7a4d88264d Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 26 Jun 2007 12:25:58 +0000 Subject: Issue 10062 - Trying to move a message without selecting one first results in memory corruption git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@71750 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_voicemail.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps') diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index e4dcce86f..98128957a 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -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); -- cgit v1.2.3