From: Rich Felker Date: Tue, 28 Aug 2018 22:12:17 +0000 (-0400) Subject: reject invalid arguments to pthread_barrierattr_setpshared X-Git-Tag: v1.1.20~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=baf95a5aefe885ef8a675759c63d43649d312ec6;p=oweals%2Fmusl.git reject invalid arguments to pthread_barrierattr_setpshared this is a POSIX requirement. --- diff --git a/src/thread/pthread_barrierattr_setpshared.c b/src/thread/pthread_barrierattr_setpshared.c index b391461e..c2d2929d 100644 --- a/src/thread/pthread_barrierattr_setpshared.c +++ b/src/thread/pthread_barrierattr_setpshared.c @@ -2,6 +2,7 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared) { + if (pshared > 1U) return EINVAL; a->__attr = pshared ? INT_MIN : 0; return 0; }