Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Fix off by one <tsahara at iij>
details: https://anonhg.NetBSD.org/src/rev/e1c10174a1df
branches: trunk
changeset: 446270:e1c10174a1df
user: christos <christos%NetBSD.org@localhost>
date: Thu Nov 29 03:10:20 2018 +0000
description:
Fix off by one <tsahara at iij>
diffstat:
lib/libedit/parse.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 208a41d30f51 -r e1c10174a1df lib/libedit/parse.c
--- a/lib/libedit/parse.c Wed Nov 28 22:54:11 2018 +0000
+++ b/lib/libedit/parse.c Thu Nov 29 03:10:20 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.40 2016/05/09 21:46:56 christos Exp $ */
+/* $NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: parse.c,v 1.40 2016/05/09 21:46:56 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -111,7 +111,7 @@
if (ptr == argv[0])
return 0;
- l = (size_t)(ptr - argv[0] - 1);
+ l = (size_t)(ptr - argv[0]);
tprog = el_malloc((l + 1) * sizeof(*tprog));
if (tprog == NULL)
return 0;
Home |
Main Index |
Thread Index |
Old Index