From c238a2189d15121d62faa56982cbf17f22bd5b3e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 31 May 1996 21:40:48 +0000 Subject: added checks to validate values passed to set attribute routines --- c/src/exec/posix/src/cond.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'c/src/exec/posix/src/cond.c') diff --git a/c/src/exec/posix/src/cond.c b/c/src/exec/posix/src/cond.c index bba0f1991f..5dd5493808 100644 --- a/c/src/exec/posix/src/cond.c +++ b/c/src/exec/posix/src/cond.c @@ -142,8 +142,15 @@ int pthread_condattr_setpshared( if ( !attr ) return EINVAL; - attr->process_shared = pshared; - return 0; + switch ( pshared ) { + case PTHREAD_PROCESS_SHARED: + case PTHREAD_PROCESS_PRIVATE: + attr->process_shared = pshared; + return 0; + + default: + return EINVAL; + } } /*PAGE -- cgit v1.2.3