diff options
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index e250c1fe3..84b1f3101 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4085,8 +4085,8 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, make_file(msgfile, sizeof(msgfile), curdir, curmsg); strcpy(textfile, msgfile); strcpy(backup, msgfile); - strncat(textfile, ".txt", sizeof(textfile) - 1); - strncat(backup, "-bak", sizeof(backup) - 1); + strncat(textfile, ".txt", sizeof(textfile) - strlen(textfile) - 1); + strncat(backup, "-bak", sizeof(backup) - strlen(backup) - 1); msg_cfg = ast_config_load(textfile, config_flags); |