* timer.cc (getitimer): Check that ovalue is a valid pointer, not just NULL.

This commit is contained in:
Christopher Faylor 2005-03-28 21:51:55 +00:00
parent c6a7568670
commit f340d72e91
2 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2005-03-28 Christopher Faylor <cgf@timesys.com>
* timer.cc (getitimer): Check that ovalue is a valid pointer, not just
NULL.
2005-03-28 Christopher Faylor <cgf@timesys.com>
* timer.cc (timer_tracker::settime): Set times to zero when just

View File

@ -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)