Просмотр исходного кода

Revert "common/sendfile.c: bugfix can't support offset is NULL"

This reverts commit b00fd230ed0b49b9f23d829ad5d09859f34bb754.
Waldemar Brodkorb 6 лет назад
Родитель
Сommit
2d8a38e1a0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      libc/sysdeps/linux/common/sendfile.c

+ 1 - 1
libc/sysdeps/linux/common/sendfile.c

@@ -40,7 +40,7 @@ ssize_t sendfile(int out_fd, int in_fd, __off_t *offset, size_t count)
 		return -1;
 	}
 
-	if ((int)offset < 0) {
+	if (offset == NULL || (int)offset < 0) {
 		__set_errno(EFAULT);
 		return -1;
 	}