From 009ae1f17daa320836c4215c16ea1c0db12a5d07 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 3 Jul 2002 04:24:08 +0000 Subject: [PATCH] Little fix to avoid overflow --- coreutils/dos2unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 8b65d05de..b1d0a9d70 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -58,7 +58,7 @@ static int convert(char *fn, int ConvType) if ((in = wfopen(fn, "rw")) == NULL) { return -1; } - strcpy(tempFn, fn); + safe_strncpy(tempFn, fn, sizeof(tempFn)); c = strlen(tempFn); tempFn[c] = '.'; while(1) { -- 2.25.1