Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libterminfo Fix off by one error.
details: https://anonhg.NetBSD.org/src/rev/f88560644d72
branches: trunk
changeset: 782989:f88560644d72
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Nov 30 10:14:18 2012 +0000
description:
Fix off by one error.
diffstat:
lib/libterminfo/tparm.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 37664889649f -r f88560644d72 lib/libterminfo/tparm.c
--- a/lib/libterminfo/tparm.c Fri Nov 30 08:25:35 2012 +0000
+++ b/lib/libterminfo/tparm.c Fri Nov 30 10:14:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tparm.c,v 1.8 2012/06/02 19:10:33 roy Exp $ */
+/* $NetBSD: tparm.c,v 1.9 2012/11/30 10:14:18 msaitoh Exp $ */
/*
* Copyright (c) 2009, 2011 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: tparm.c,v 1.8 2012/06/02 19:10:33 roy Exp $");
+__RCSID("$NetBSD: tparm.c,v 1.9 2012/11/30 10:14:18 msaitoh Exp $");
#include <sys/param.h>
#include <assert.h>
@@ -57,7 +57,7 @@
static int
push(int num, char *string, TPSTACK *stack)
{
- if (stack->offset > sizeof(stack->nums)) {
+ if (stack->offset >= sizeof(stack->nums)) {
errno = E2BIG;
return -1;
}
Home |
Main Index |
Thread Index |
Old Index