Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/hunt/hunt fix off-by-one
details: https://anonhg.NetBSD.org/src/rev/a5508f430bad
branches: trunk
changeset: 328288:a5508f430bad
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Mar 30 05:41:50 2014 +0000
description:
fix off-by-one
diffstat:
games/hunt/hunt/playit.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 131fe5a0c1f6 -r a5508f430bad games/hunt/hunt/playit.c
--- a/games/hunt/hunt/playit.c Sun Mar 30 05:38:13 2014 +0000
+++ b/games/hunt/hunt/playit.c Sun Mar 30 05:41:50 2014 +0000
@@ -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 @@
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) {
Home |
Main Index |
Thread Index |
Old Index