From 8bf705f51953e445069822ad1864237a847e4b52 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 29 Feb 2008 14:34:34 +0000 Subject: [PATCH] If the message file does not exist, just return harmlessly, instead of crashing. (Closes issue #12108) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105296 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index dc7006b2e1..74bfd2c9a3 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3845,7 +3845,9 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, strncat(textfile, ".txt", sizeof(textfile) - 1); strncat(backup, "-bak", sizeof(backup) - 1); - msg_cfg = ast_config_load(textfile); + if (!(msg_cfg = ast_config_load(textfile))) { + return -1; + } *duration = 0; if ((duration_str = ast_variable_retrieve(msg_cfg, "message", "duration")))