diff options
author | imp <imp@FreeBSD.org> | 2003-06-07 18:44:04 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-06-07 18:44:04 +0000 |
commit | 67d1c8d06139329874a52174d96bc268d344dab0 (patch) | |
tree | 95f28046140bfd631b3e35b4aa19a5252dd704a7 | |
parent | da3e415da131b557ea4271ab70a0701834376b51 (diff) | |
download | FreeBSD-src-67d1c8d06139329874a52174d96bc268d344dab0.zip FreeBSD-src-67d1c8d06139329874a52174d96bc268d344dab0.tar.gz |
Use safer strlcpy and snprintf interfaces
-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 54b2074..bf05b42 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); } |