From 67d1c8d06139329874a52174d96bc268d344dab0 Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 7 Jun 2003 18:44:04 +0000 Subject: Use safer strlcpy and snprintf interfaces --- usr.sbin/i4b/isdntel/files.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/i4b') 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); } -- cgit v1.1