summaryrefslogtreecommitdiffstats
path: root/usr.sbin/i4b
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-06-07 18:44:04 +0000
committerimp <imp@FreeBSD.org>2003-06-07 18:44:04 +0000
commit67d1c8d06139329874a52174d96bc268d344dab0 (patch)
tree95f28046140bfd631b3e35b4aa19a5252dd704a7 /usr.sbin/i4b
parentda3e415da131b557ea4271ab70a0701834376b51 (diff)
downloadFreeBSD-src-67d1c8d06139329874a52174d96bc268d344dab0.zip
FreeBSD-src-67d1c8d06139329874a52174d96bc268d344dab0.tar.gz
Use safer strlcpy and snprintf interfaces
Diffstat (limited to 'usr.sbin/i4b')
-rw-r--r--usr.sbin/i4b/isdntel/files.c8
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);
}
OpenPOWER on IntegriCloud