summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_barrier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c
index dd8f48e..2c47f13 100644
--- a/lib/libthr/thread/thr_barrier.c
+++ b/lib/libthr/thread/thr_barrier.c
@@ -100,7 +100,7 @@ _pthread_barrier_init(pthread_barrier_t *barrier,
pthread_barrier_t bar;
int pshared;
- if (barrier == NULL || count <= 0)
+ if (barrier == NULL || count == 0 || count > INT_MAX)
return (EINVAL);
if (attr == NULL || *attr == NULL ||
OpenPOWER on IntegriCloud