added EFAULT check
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 7 Mar 2004 19:38:59 +0000 (19:38 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 7 Mar 2004 19:38:59 +0000 (19:38 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1137 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/lib/syscall_setflags.c

index fab0ae8..37d8947 100644 (file)
 int
 vc_set_flags(xid_t xid, struct vc_ctx_flags const *flags)
 {
+  if (flags==0) {
+    errno = EFAULT;
+    return -1;
+  }
+  
   CALL_VC(CALL_VC_V13A(vc_set_flags, xid, flags));
 }
 #endif