aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dos2unix.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-05-05 10:37:49 +0000
committerEric Andersen <andersen@codepoet.org>2004-05-05 10:37:49 +0000
commitaaff79a8dd00f2a9652a4bce8fbfe77715804ac2 (patch)
tree2a6a8e172ed56b1d5083626bf93028ac2678a8e9 /coreutils/dos2unix.c
parent6c8161d69fe9fce0f862b678aaa84866aaaeff8f (diff)
downloadbusybox-w32-aaff79a8dd00f2a9652a4bce8fbfe77715804ac2.tar.gz
busybox-w32-aaff79a8dd00f2a9652a4bce8fbfe77715804ac2.tar.bz2
busybox-w32-aaff79a8dd00f2a9652a4bce8fbfe77715804ac2.zip
Steve Grubb writes:
Hello, I found and patched 2 more bugs. The first is a misplaced semi-colon. The second one is a buffer overflow. I doubt the buffer overflow is triggered in real life. But you never know what those wily hackers are up to. Thanks, Steve Grubb
Diffstat (limited to 'coreutils/dos2unix.c')
-rw-r--r--coreutils/dos2unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index a21ed5bc3..c8cebcec7 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -64,7 +64,7 @@ static int convert(char *fn, int ConvType)
64 c = strlen(tempFn); 64 c = strlen(tempFn);
65 tempFn[c] = '.'; 65 tempFn[c] = '.';
66 while(1) { 66 while(1) {
67 if (c >=BUFSIZ) 67 if (c >=BUFSIZ-2)
68 bb_error_msg_and_die("unique name not found"); 68 bb_error_msg_and_die("unique name not found");
69 /* Get some semi random stuff to try and make a 69 /* Get some semi random stuff to try and make a
70 * random filename based (and in the same dir as) 70 * random filename based (and in the same dir as)