summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_cond.c')
-rw-r--r--lib/libpthread/thread/thr_cond.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c
index bacfb7217337..4d52c631dcdc 100644
--- a/lib/libpthread/thread/thr_cond.c
+++ b/lib/libpthread/thread/thr_cond.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: uthread_cond.c,v 1.15 1999/06/20 08:28:13 jb Exp $
*/
#include <stdlib.h>
#include <errno.h>
@@ -261,6 +261,10 @@ pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
int rval = 0;
int status;
+ if (abstime->tv_sec < 0 ||
+ abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return (EINVAL);
+
if (cond == NULL)
rval = EINVAL;