diff options
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r-- | winsup/cygwin/times.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index ee5fe5f50..e5635ddff 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -52,6 +52,9 @@ times (struct tms * buf) { FILETIME creation_time, exit_time, kernel_time, user_time; + if (check_null_invalid_struct_errno (buf)) + return ((clock_t) -1); + DWORD ticks = GetTickCount (); /* Ticks is in milliseconds, convert to our ticks. Use long long to prevent overflow. */ |