diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-06-26 23:59:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-06-26 23:59:17 +0000 |
commit | 9bf0b8bb7ef16f277afd4448b900fc4a0b21ccb2 (patch) | |
tree | 3f6418ef3adf226c40281b2e5da4d391b0206b6a /libc | |
parent | c83ff9adbaa0b4761f4d8f99778104f825e5a4a3 (diff) |
if function or stack are NULL, make sure errno is set to EINVAL
Diffstat (limited to 'libc')
-rw-r--r-- | libc/sysdeps/linux/bfin/clone.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/bfin/clone.c b/libc/sysdeps/linux/bfin/clone.c index 6392fd664..0ba1d5a4a 100644 --- a/libc/sysdeps/linux/bfin/clone.c +++ b/libc/sysdeps/linux/bfin/clone.c @@ -7,6 +7,7 @@ */ #include <sched.h> +#include <errno.h> #include <sys/syscall.h> int @@ -57,6 +58,10 @@ clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg, ...) : "i" (__NR_clone), "a" (child_stack), "a" (flags), "a" (arg), "a" (fn), "i" (__NR_exit) : "CC", "R0", "R1", "P0"); #endif + + } else { + __set_errno(EINVAL); } + return rval; } |