summaryrefslogtreecommitdiffstats
path: root/hunt
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2014-03-30 05:41:50 +0000
committerdholland <dholland@NetBSD.org>2014-03-30 05:41:50 +0000
commitc860b74604f19b4b34a8f2fa731593038a0b4816 (patch)
tree2a5bf28970998c0d9ed8812a8206d957a4395c64 /hunt
parent99c499af28a324719c1f812d8ba0c9c5ae50347d (diff)
downloadbsdgames-darwin-c860b74604f19b4b34a8f2fa731593038a0b4816.tar.gz
bsdgames-darwin-c860b74604f19b4b34a8f2fa731593038a0b4816.tar.zst
bsdgames-darwin-c860b74604f19b4b34a8f2fa731593038a0b4816.zip
fix off-by-one
Diffstat (limited to 'hunt')
-rw-r--r--hunt/hunt/playit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c
index 9b6d3c95..1f26ae83 100644
--- a/hunt/hunt/playit.c
+++ b/hunt/hunt/playit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: playit.c,v 1.22 2014/03/30 05:38:13 dholland Exp $ */
+/* $NetBSD: playit.c,v 1.23 2014/03/30 05:41:50 dholland Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: playit.c,v 1.22 2014/03/30 05:38:13 dholland Exp $");
+__RCSID("$NetBSD: playit.c,v 1.23 2014/03/30 05:41:50 dholland Exp $");
#endif /* not lint */
#include <sys/file.h>
@@ -246,7 +246,7 @@ send_stuff(void)
char *sp, *nsp;
static char inp[sizeof Buf];
- count = read(STDIN_FILENO, Buf, sizeof Buf);
+ count = read(STDIN_FILENO, Buf, sizeof(Buf) - 1);
if (count <= 0)
return;
if (nchar_send <= 0 && !no_beep) {