Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-27 06:31:33 +0400
committerChristopher Faylor <me@cgf.cx>2005-03-27 06:31:33 +0400
commit255557f8c3bcc39467cd02a234d2a544f17d22c9 (patch)
treee152f9b0f349b6351d12563c0f14718775204142 /winsup/cygwin/signal.cc
parentec98d19a08c2e4678e8a6f40fea0c9bbeaa4a2c7 (diff)
* timer.cc (nanosleep): Treat tv_sec < 0 as invalid.
* include/search.h: Make declarations consistent with newlib.
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r--winsup/cygwin/signal.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 1808b2428..41b48313f 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -77,6 +77,7 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
pthread_testcancel ();
if ((unsigned int) rqtp->tv_sec > (HIRES_DELAY_MAX / 1000 - 1)
+ || rqtp->tv_sec < 0
|| (unsigned int) rqtp->tv_nsec > 999999999)
{
set_errno (EINVAL);