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:
authorEgor Duda <deo@logos-m.ru>2001-09-16 18:26:11 +0400
committerEgor Duda <deo@logos-m.ru>2001-09-16 18:26:11 +0400
commit0aca521ab84e3f020085891bdab652680368ce4f (patch)
tree6fc4082616a915e4b5e2620d8cb499e457204dbd /winsup/cygwin/times.cc
parentd59583993906b2232b995eb4ae5731f7b71384c3 (diff)
* path.cc (symlink): Check arguments for validity.
(getcwd): Ditto. * syscalls.cc (ftruncate): Ditto. * times.cc (times): Ditto. * uname.cc (uname): Ditto.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc3
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. */