summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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