Index: app.c =================================================================== RCS file: /usr/cvsroot/asterisk/app.c,v retrieving revision 1.23 diff -u -p -r1.23 app.c --- app.c 22 Jun 2004 18:48:59 -0000 1.23 +++ app.c 9 Jul 2004 09:40:21 -0000 @@ -157,7 +157,7 @@ int ast_app_has_voicemail(const char *ma 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 *mai 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, ", "))) {