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 74bfd2c9a..79e8bf2ea 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3842,8 +3842,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); if (!(msg_cfg = ast_config_load(textfile))) { return -1; |