summaryrefslogtreecommitdiffstats
path: root/tetris
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-03-19 00:50:28 +0000
committerchristos <christos@NetBSD.org>2006-03-19 00:50:28 +0000
commit489aeaa44fcd5524032787011b371da35c754266 (patch)
tree0550786ca1ba5a943a67564860bddc46e1373f21 /tetris
parentdf841f781507a7c3c31e10a236e635dd258335ff (diff)
downloadbsdgames-darwin-489aeaa44fcd5524032787011b371da35c754266.tar.gz
bsdgames-darwin-489aeaa44fcd5524032787011b371da35c754266.tar.zst
bsdgames-darwin-489aeaa44fcd5524032787011b371da35c754266.zip
Coverity CID 868: Fix possible NULL deref (after INFTIM passes :-)
Diffstat (limited to 'tetris')
-rw-r--r--tetris/input.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tetris/input.c b/tetris/input.c
index 469fa796..cd4d431e 100644
--- a/tetris/input.c
+++ b/tetris/input.c
@@ -1,4 +1,4 @@
-/* $NetBSD: input.c,v 1.9 2003/08/07 09:37:47 agc Exp $ */
+/* $NetBSD: input.c,v 1.10 2006/03/19 00:50:28 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -100,8 +100,10 @@ again:
/* NOTREACHED */
case 0: /* timed out */
- tvp->tv_sec = 0;
- tvp->tv_usec = 0;
+ if (tvp) {
+ tvp->tv_sec = 0;
+ tvp->tv_usec = 0;
+ }
return (0);
}
if (tvp) {