← Commit list

c3498f678

Glenn L McGrath
Glenn L McGrath
2003-11-24
FAILED Duration: 99s

Subject

When a size of 0 is passed to copyfd_size, dont do anything, it was reading untill eof which breaks tar

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/copyfd.c+4 -1
@@ -78,7 +78,10 @@ extern size_t bb_full_fd_action(int src_fd, int dst_fd, const size_t size, ssize
extern int bb_copyfd_size(int fd1, int fd2, const off_t size)
{
- return(bb_full_fd_action(fd1, fd2, size, bb_full_write));
+ if (size) {
+ return(bb_full_fd_action(fd1, fd2, size, bb_full_write));
+ }
+ return(0);
}
extern int bb_copyfd_eof(int fd1, int fd2)