Fix for bug #31566: my_write(fd, 0x0, 0, flags) fails with EFAULT on
some platforms Since the behavior of write(fd, buf, 0) is undefined, it may fail with EFAULT on some architectures when buf == NULL. The error was propagated up to a caller, since my_write() code did not handle it properly. Fixed by checking the 'number of bytes' argument in my_write() and returning before calling the write() system call when there is nothing to write.
Showing
Please register or sign in to comment