diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-07-03 04:24:08 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-07-03 04:24:08 +0000 |
| commit | 94f0de0826a8ac7dac8bfb8604fde53e2b78b0c5 (patch) | |
| tree | d8736ddc4ec25f2b3df81bbc430ca1dbd8dbb496 /coreutils | |
| parent | a690654406f38ae26692a452c00bfaf021d99703 (diff) | |
| download | busybox-w32-94f0de0826a8ac7dac8bfb8604fde53e2b78b0c5.tar.gz busybox-w32-94f0de0826a8ac7dac8bfb8604fde53e2b78b0c5.tar.bz2 busybox-w32-94f0de0826a8ac7dac8bfb8604fde53e2b78b0c5.zip | |
Little fix to avoid overflow
git-svn-id: svn://busybox.net/trunk/busybox@4989 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/dos2unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 58 | if ((in = wfopen(fn, "rw")) == NULL) { | 58 | if ((in = wfopen(fn, "rw")) == NULL) { |
| 59 | return -1; | 59 | return -1; |
| 60 | } | 60 | } |
| 61 | strcpy(tempFn, fn); | 61 | safe_strncpy(tempFn, fn, sizeof(tempFn)); |
| 62 | c = strlen(tempFn); | 62 | c = strlen(tempFn); |
| 63 | tempFn[c] = '.'; | 63 | tempFn[c] = '.'; |
| 64 | while(1) { | 64 | while(1) { |
