From: Enrico Scholz Date: Sun, 7 Mar 2004 19:38:59 +0000 (+0000) Subject: added EFAULT check X-Git-Tag: VERSION_0_10~436 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d3b4895af6c75a53ddc95595e9e2857055b610d;p=util-vserver.git added EFAULT check git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1137 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/lib/syscall_setflags.c b/util-vserver/lib/syscall_setflags.c index fab0ae8..37d8947 100644 --- a/util-vserver/lib/syscall_setflags.c +++ b/util-vserver/lib/syscall_setflags.c @@ -32,6 +32,11 @@ 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