Little fix to avoid overflow
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Wed, 3 Jul 2002 04:24:08 +0000 (04:24 +0000)
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Wed, 3 Jul 2002 04:24:08 +0000 (04:24 +0000)
git-svn-id: svn://busybox.net/trunk/busybox@4989 69ca8d6d-28ef-0310-b511-8ec308f3f277

coreutils/dos2unix.c

index 8b65d05..b1d0a9d 100644 (file)
@@ -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) {