mirror of
https://github.com/sheumann/hush.git
synced 2025-01-04 22:34:37 +00:00
Steve Grubb writes:
Hi, I just re-reviewed the patch I just sent...and it needed to be BUFSIZ-3 in dos2unix.c . tempFn is BUFSIZ so the last addressable spot it BUFSIZ-1. The loop increments by 2. That's why it should be BUFSIZ-3. Best Regards, Steve Grubb
This commit is contained in:
parent
aaff79a8dd
commit
6c0396ba2a
@ -64,7 +64,9 @@ static int convert(char *fn, int ConvType)
|
|||||||
c = strlen(tempFn);
|
c = strlen(tempFn);
|
||||||
tempFn[c] = '.';
|
tempFn[c] = '.';
|
||||||
while(1) {
|
while(1) {
|
||||||
if (c >=BUFSIZ-2)
|
/* tempFn is BUFSIZ so the last addressable spot it BUFSIZ-1.
|
||||||
|
* The loop increments by 2. So this must check for BUFSIZ-3. */
|
||||||
|
if (c >=BUFSIZ-3)
|
||||||
bb_error_msg_and_die("unique name not found");
|
bb_error_msg_and_die("unique name not found");
|
||||||
/* Get some semi random stuff to try and make a
|
/* Get some semi random stuff to try and make a
|
||||||
* random filename based (and in the same dir as)
|
* random filename based (and in the same dir as)
|
||||||
|
Loading…
Reference in New Issue
Block a user