From 0aca521ab84e3f020085891bdab652680368ce4f Mon Sep 17 00:00:00 2001 From: Egor Duda Date: Sun, 16 Sep 2001 14:26:11 +0000 Subject: * path.cc (symlink): Check arguments for validity. (getcwd): Ditto. * syscalls.cc (ftruncate): Ditto. * times.cc (times): Ditto. * uname.cc (uname): Ditto. --- winsup/cygwin/times.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'winsup/cygwin/times.cc') 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. */ -- cgit v1.2.3