More strcpy / snprintf as part of rgagnon's audit (bug #2004)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-07-09 10:08:09 +00:00
parent 069d045513
commit 7ca6f85a41
8 changed files with 32 additions and 27 deletions

2
cdr.c
View File

@@ -431,7 +431,7 @@ int ast_cdr_update(struct ast_channel *c)
if (c->callerid && !ast_strlen_zero(c->callerid))
strncpy(cdr->clid, c->callerid, sizeof(cdr->clid) - 1);
else
strcpy(cdr->clid, "");
cdr->clid[0] = '\0';
name = NULL;
num = NULL;
ast_callerid_parse(tmp, &name, &num);