From 60f590000d545292760018694deb34a7cc4ded6d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 May 2020 12:42:10 -0700 Subject: [PATCH] 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 --- source3/modules/vfs_aio_fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3