about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/lxstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/lxstat.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/lxstat.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/lxstat.c b/sysdeps/unix/sysv/linux/i386/lxstat.c
index ee89ec125a..e42dcfe759 100644
--- a/sysdeps/unix/sysv/linux/i386/lxstat.c
+++ b/sysdeps/unix/sysv/linux/i386/lxstat.c
@@ -28,14 +28,18 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
+#include <bp-checks.h>
+
 #include "kernel-features.h"
 
 #include <xstatconv.c>
 
-extern int __syscall_lstat (const char *, struct kernel_stat *);
+extern int __syscall_lstat (const char *__unbounded,
+			    struct kernel_stat *__unbounded);
 
 #ifdef __NR_stat64
-extern int __syscall_lstat64 (const char *, struct stat64 *);
+extern int __syscall_lstat64 (const char *__unbounded,
+			      struct stat64 *__unbounded);
 # if  __ASSUME_STAT64_SYSCALL == 0
 /* The variable is shared between all wrappers around *stat64 calls.  */
 extern int __have_no_stat64;
@@ -53,15 +57,13 @@ __lxstat (int vers, const char *name, struct stat *buf)
   int result;
 
   if (vers == _STAT_VER_KERNEL)
-    {
-      return INLINE_SYSCALL (lstat, 2, name, (struct kernel_stat *) buf);
-    }
+    return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), CHECK_1 ((struct kernel_stat *) buf));
 
 #if __ASSUME_STAT64_SYSCALL > 0
   {
     struct stat64 buf64;
 
-    result = INLINE_SYSCALL (lstat64, 2, name, &buf64);
+    result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), __ptrvalue (&buf64));
     if (result == 0)
       result = xstat32_conv (vers, &buf64, buf);
     return result;
@@ -74,7 +76,7 @@ __lxstat (int vers, const char *name, struct stat *buf)
   if (! __have_no_stat64)
     {
       struct stat64 buf64;
-      result = INLINE_SYSCALL (lstat64, 2, name, &buf64);
+      result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), __ptrvalue (&buf64));
 
       if (result == 0)
 	result = xstat32_conv (vers, &buf64, buf);
@@ -84,9 +86,9 @@ __lxstat (int vers, const char *name, struct stat *buf)
 
       __have_no_stat64 = 1;
     }
-# endif  
-  
-  result = INLINE_SYSCALL (lstat, 2, name, &kbuf);
+# endif
+
+  result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
   if (result == 0)
     result = xstat_conv (vers, &kbuf, buf);