aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 122f92a87..a3cd60fd3 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1380,11 +1380,12 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword)
}
value = strstr(tmp,",");
if (!value) {
- ast_log(AST_LOG_WARNING, "variable has bad format.\n");
- break;
+ new = alloca(strlen(newpassword)+1);
+ sprintf(new, "%s", newpassword);
+ } else {
+ new = alloca((strlen(value)+strlen(newpassword)+1));
+ sprintf(new,"%s%s", newpassword, value);
}
- new = alloca((strlen(value)+strlen(newpassword)+1));
- sprintf(new,"%s%s", newpassword, value);
if (!(cat = ast_category_get(cfg, category))) {
ast_log(AST_LOG_WARNING, "Failed to get category structure.\n");
break;