mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Don't die on a bad voicemail conf timezone entry (bug #1326)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3422,6 +3422,7 @@ static int load_config(void)
|
||||
msg_format = ast_strdupa(var->value);
|
||||
if (msg_format != NULL) {
|
||||
timezone = strsep(&msg_format, "|");
|
||||
if (msg_format) {
|
||||
strncpy(z->name, var->name, sizeof(z->name) - 1);
|
||||
strncpy(z->timezone, timezone, sizeof(z->timezone) - 1);
|
||||
strncpy(z->msg_format, msg_format, sizeof(z->msg_format) - 1);
|
||||
@@ -3433,6 +3434,10 @@ static int load_config(void)
|
||||
zones = z;
|
||||
zonesl = z;
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Invalid tonezone definition at line %d\n", var->lineno);
|
||||
free(z);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Out of memory while reading voicemail config\n");
|
||||
free(z);
|
||||
|
||||
Reference in New Issue
Block a user