Module Name: src
Committed By: bouyer
Date: Tue Jun 5 20:22:14 UTC 2012
Modified Files:
src/lib/libedit [netbsd-6]: readline.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #309):
lib/libedit/readline.c: revision 1.104
don't crash if add_history is called from an empty line. Called from
nslookup in new bind.
XXX: pullup to 6
To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.100.2.1 src/lib/libedit/readline.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.100 src/lib/libedit/readline.c:1.100.2.1
--- src/lib/libedit/readline.c:1.100 Fri Nov 18 20:38:42 2011
+++ src/lib/libedit/readline.c Tue Jun 5 20:22:14 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.100 2011/11/18 20:38:42 christos Exp $ */
+/* $NetBSD: readline.c,v 1.100.2.1 2012/06/05 20:22:14 bouyer Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.100 2011/11/18 20:38:42 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.100.2.1 2012/06/05 20:22:14 bouyer Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -1371,6 +1371,9 @@ add_history(const char *line)
{
HistEvent ev;
+ if (line == NULL)
+ return 0;
+
if (h == NULL || e == NULL)
rl_initialize();