X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_condattr_setclock.c;h=cd2cecc98bca6b52a6b02e6518cc1ef398dbd9c6;hp=bf7455238c76a1779eeb194e9c1d8f3b509fd2c4;hb=be48e22b424b6f858da0151a0b3b68bdb96b41ca;hpb=b4d40e44e36f28cf5a52e9f0c12e622c3baf1657 diff --git a/src/thread/pthread_condattr_setclock.c b/src/thread/pthread_condattr_setclock.c index bf745523..cd2cecc9 100644 --- a/src/thread/pthread_condattr_setclock.c +++ b/src/thread/pthread_condattr_setclock.c @@ -2,7 +2,7 @@ int pthread_condattr_setclock(pthread_condattr_t *a, clockid_t clk) { - if (clk < 0) return EINVAL; + if (clk < 0 || clk-2U < 2) return EINVAL; *a &= 0x80000000; *a |= clk; return 0;