diff options
-rw-r--r-- | archival/tar.c | 4 | ||||
-rw-r--r-- | coreutils/dos2unix.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/archival/tar.c b/archival/tar.c index 9d50a101d..efdc46587 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -477,8 +477,8 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag, | |||
477 | dup2(gzipDataPipe[0], 0); | 477 | dup2(gzipDataPipe[0], 0); |
478 | close(gzipDataPipe[1]); | 478 | close(gzipDataPipe[1]); |
479 | 479 | ||
480 | if (tbInfo.tarFd != 1); | 480 | if (tbInfo.tarFd != 1) |
481 | dup2(tbInfo.tarFd, 1); | 481 | dup2(tbInfo.tarFd, 1); |
482 | 482 | ||
483 | close(gzipStatusPipe[0]); | 483 | close(gzipStatusPipe[0]); |
484 | fcntl(gzipStatusPipe[1], F_SETFD, FD_CLOEXEC); /* close on exec shows sucess */ | 484 | fcntl(gzipStatusPipe[1], F_SETFD, FD_CLOEXEC); /* close on exec shows sucess */ |
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) |