Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit one extra char for NUL.
details: https://anonhg.NetBSD.org/src/rev/01b7c686b1fd
branches: trunk
changeset: 351915:01b7c686b1fd
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 05 19:23:58 2017 +0000
description:
one extra char for NUL.
diffstat:
lib/libedit/hist.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 3ea59d63f393 -r 01b7c686b1fd lib/libedit/hist.c
--- a/lib/libedit/hist.c Sun Mar 05 19:22:45 2017 +0000
+++ b/lib/libedit/hist.c Sun Mar 05 19:23:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hist.c,v 1.31 2017/03/05 17:30:38 christos Exp $ */
+/* $NetBSD: hist.c,v 1.32 2017/03/05 19:23:58 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: hist.c,v 1.31 2017/03/05 17:30:38 christos Exp $");
+__RCSID("$NetBSD: hist.c,v 1.32 2017/03/05 19:23:58 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -131,7 +131,7 @@
if ((hp = HIST_NEXT(el)) == NULL)
goto out;
- hlen = wcslen(hp);
+ hlen = wcslen(hp) + 1;
blen = (size_t)(el->el_line.limit - el->el_line.buffer);
if (hlen > blen && !ch_enlargebufs(el, hlen))
goto out;
Home |
Main Index |
Thread Index |
Old Index