summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-01-03 01:16:00 +0000
committerMark Spencer <markster@digium.com>2005-01-03 01:16:00 +0000
commit056325aca63025c6e9fdac8f725f6cbaf0f2e6a6 (patch)
tree72fd6e5ef243c00af5b3f65cb606d107a2900c08 /apps
parent0c3cea35f0b9e78e1ae449ce7326106b202bf78d (diff)
Merge josh's strlen fix (thanks!) (bug #2893)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_voicemail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c253b3e98..92ca1262e 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4461,7 +4461,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
return -1;
}
}
- if (prefix) {
+ if (prefix && !ast_strlen_zero(prefix)) {
char fullusername[80] = "";
strncpy(fullusername, prefix, sizeof(fullusername) - 1);
strncat(fullusername, mailbox, sizeof(fullusername) - 1 - strlen(fullusername));
@@ -4476,7 +4476,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
else {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Incorrect password '%s' for user '%s' (context = %s)\n", password, mailbox, context ? context : "<any>");
- if (prefix)
+ if (prefix && !ast_strlen_zero(prefix))
strncpy(mailbox, "", mailbox_size -1);
}
logretries++;