diff options
author | Warner Losh <imp@FreeBSD.org> | 2003-06-07 18:44:04 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2003-06-07 18:44:04 +0000 |
commit | df001cb7b881e2df38e632ce6e78fc20f520591f (patch) | |
tree | 95f28046140bfd631b3e35b4aa19a5252dd704a7 /usr.sbin/i4b/isdntel | |
parent | cabaa3ba211e7e95de24fb5f44e799e4c41195b4 (diff) | |
download | src-df001cb7b881e2df38e632ce6e78fc20f520591f.tar.gz src-df001cb7b881e2df38e632ce6e78fc20f520591f.zip |
Use safer strlcpy and snprintf interfaces
Notes
Notes:
svn path=/head/; revision=115976
Diffstat (limited to 'usr.sbin/i4b/isdntel')
-rw-r--r-- | usr.sbin/i4b/isdntel/files.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/i4b/isdntel/files.c b/usr.sbin/i4b/isdntel/files.c index 54b207474583..bf05b4237cd2 100644 --- a/usr.sbin/i4b/isdntel/files.c +++ b/usr.sbin/i4b/isdntel/files.c @@ -260,12 +260,12 @@ free_list(void) void delete(struct onefile *this) { - char buffer[MAXPATHLEN+1]; + char buffer[MAXPATHLEN]; if(this == NULL) return; - sprintf(buffer, "%s", this->fname); + strlcpy(buffer, this->fname, sizeof(buffer)); unlink(buffer); @@ -295,12 +295,12 @@ reread(void) void play(struct onefile *this) { - char buffer[MAXPATHLEN+1]; + char buffer[MAXPATHLEN]; if(this == NULL) return; - sprintf(buffer, playstring, this->fname); + snprintf(buffer, sizeof(buffer), playstring, this->fname); system(buffer); } |