diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-08-28 18:12:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-08-28 18:12:17 -0400 |
commit | baf95a5aefe885ef8a675759c63d43649d312ec6 (patch) | |
tree | 8f7d87846ddcf203c93d4cf69cf5cd7df75f7580 | |
parent | 056f9d818eaf1dbe9e9d63b64b109fd9b608fa36 (diff) | |
download | musl-baf95a5aefe885ef8a675759c63d43649d312ec6.tar.gz musl-baf95a5aefe885ef8a675759c63d43649d312ec6.tar.bz2 musl-baf95a5aefe885ef8a675759c63d43649d312ec6.tar.xz musl-baf95a5aefe885ef8a675759c63d43649d312ec6.zip |
reject invalid arguments to pthread_barrierattr_setpshared
this is a POSIX requirement.
-rw-r--r-- | src/thread/pthread_barrierattr_setpshared.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |