From 94f0de0826a8ac7dac8bfb8604fde53e2b78b0c5 Mon Sep 17 00:00:00 2001 From: andersen Date: Wed, 3 Jul 2002 04:24:08 +0000 Subject: Little fix to avoid overflow git-svn-id: svn://busybox.net/trunk/busybox@4989 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- coreutils/dos2unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coreutils/dos2unix.c') 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) { -- cgit v1.2.3-55-g6feb