From 2d3b4895af6c75a53ddc95595e9e2857055b610d Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 7 Mar 2004 19:38:59 +0000 Subject: [PATCH] added EFAULT check git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1137 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/syscall_setflags.c | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 1.8.1.5