From afd46d804b5217468b74a7a251b81a7fa195b77e Mon Sep 17 00:00:00 2001 From: andersen Date: Wed, 5 May 2004 10:37:49 +0000 Subject: 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 git-svn-id: svn://busybox.net/trunk/busybox@8804 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 a21ed5bc3..c8cebcec7 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -64,7 +64,7 @@ static int convert(char *fn, int ConvType) c = strlen(tempFn); tempFn[c] = '.'; while(1) { - if (c >=BUFSIZ) + if (c >=BUFSIZ-2) bb_error_msg_and_die("unique name not found"); /* Get some semi random stuff to try and make a * random filename based (and in the same dir as) -- cgit v1.2.3-55-g6feb