aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-09 10:08:09 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-09 10:08:09 +0000
commit6d161f15883a5bc1c1f2afe07bce871de1ed18a2 (patch)
tree9cf87413ea67a1d4274c7561d225620748299353 /app.c
parenta2741a5731dbe634606ce69e842bc7b7d4ec3f8d (diff)
More strcpy / snprintf as part of rgagnon's audit (bug #2004)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3410 f38db490-d61c-443f-a65b-d21fe96a405b
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, ", "))) {