aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'app.c')
-rwxr-xr-xapp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.c b/app.c
index 813d35842..86ad5077c 100755
--- a/app.c
+++ b/app.c
@@ -157,7 +157,7 @@ int ast_app_has_voicemail(const char *mailbox)
if (ast_strlen_zero(mailbox))
return 0;
if (strchr(mailbox, ',')) {
- strncpy(tmp, mailbox, sizeof(tmp));
+ strncpy(tmp, mailbox, sizeof(tmp) - 1);
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ","))) {
@@ -207,7 +207,7 @@ int ast_app_messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
return 0;
if (strchr(mailbox, ',')) {
int tmpnew, tmpold;
- strncpy(tmp, mailbox, sizeof(tmp));
+ strncpy(tmp, mailbox, sizeof(tmp) - 1);
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ", "))) {