summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/timer.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-28 21:51:55 +0000
committerChristopher Faylor <me@cgf.cx>2005-03-28 21:51:55 +0000
commitf340d72e913509b090daff2eb948f423359dce21 (patch)
tree14719d074ac3ffdbad76ed7ab2d2127341d9c351 /winsup/cygwin/timer.cc
parentc6a756867090aaec26a75ccca8ccadf1aa142e9e (diff)
downloadcygnal-f340d72e913509b090daff2eb948f423359dce21.tar.gz
cygnal-f340d72e913509b090daff2eb948f423359dce21.tar.bz2
cygnal-f340d72e913509b090daff2eb948f423359dce21.zip
* timer.cc (getitimer): Check that ovalue is a valid pointer, not just NULL.
Diffstat (limited to 'winsup/cygwin/timer.cc')
-rw-r--r--winsup/cygwin/timer.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc
index 746362779..8815cdc63 100644
--- a/winsup/cygwin/timer.cc
+++ b/winsup/cygwin/timer.cc
@@ -386,11 +386,8 @@ getitimer (int which, struct itimerval *ovalue)
set_errno (EINVAL);
return -1;
}
- if (ovalue == NULL)
- {
- set_errno (EFAULT);
- return -1;
- }
+ if (check_null_invalid_struct_errno (ovalue))
+ return -1;
struct itimerspec spec_ovalue;
int ret = timer_gettime ((timer_t) &ttstart, &spec_ovalue);
if (!ret)