From: Jeremy Allison Date: Thu, 7 May 2020 19:42:10 +0000 (-0700) Subject: s3: VFS: aio_fork: Change sys_pread() -> sys_pread_full() to protect against short... X-Git-Tag: ldb-2.2.0~542 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60f590000d545292760018694deb34a7cc4ded6d;p=thirdparty%2Fsamba.git s3: VFS: aio_fork: Change sys_pread() -> sys_pread_full() to protect against short reads. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361 Signed-off-by: Jeremy Allison Reviewed-by: Stefan Metzmacher --- diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index a1fed5c0655..285b331ff9c 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -342,7 +342,7 @@ static void aio_child_loop(int sockfd, struct mmap_area *map) switch (cmd_struct.cmd) { case READ_CMD: - ret_struct.size = sys_pread( + ret_struct.size = sys_pread_full( fd, discard_const(map->ptr), cmd_struct.n, cmd_struct.offset); #if 0