about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/mips/pread64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips/pread64.c')
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread64.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 06a992e1cb..6482ce45ad 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -23,6 +23,7 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
+#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -33,8 +34,8 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
 				  off64_t offset) internal_function;
 # endif
 
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
-			        off_t offset_hi, off_t offset_lo);
+extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
+				int dummy, off_t offset_hi, off_t offset_lo);
 
 
 
@@ -48,7 +49,7 @@ __libc_pread64 (fd, buf, count, offset)
   ssize_t result;
 
   /* First try the syscall.  */
-  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
+  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
 					     (off_t) (offset & 0xffffffff)));
 # if __ASSUME_PREAD_SYSCALL == 0