svn commit: r255934 - in stable: 8/lib/libedit 9/lib/libedit
Xin LI
delphij at FreeBSD.org
Sun Sep 29 07:42:25 UTC 2013
Author: delphij
Date: Sun Sep 29 07:42:25 2013
New Revision: 255934
URL: http://svnweb.freebsd.org/changeset/base/255934
Log:
MFC r255891:
Import NetBSD readline.c,v 1.104: do not crash with add_history(NULL).
Modified:
stable/9/lib/libedit/readline.c
Directory Properties:
stable/9/lib/libedit/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/8/lib/libedit/readline.c
Directory Properties:
stable/8/lib/libedit/ (props changed)
Modified: stable/9/lib/libedit/readline.c
==============================================================================
--- stable/9/lib/libedit/readline.c Sun Sep 29 01:05:00 2013 (r255933)
+++ stable/9/lib/libedit/readline.c Sun Sep 29 07:42:25 2013 (r255934)
@@ -1363,6 +1363,9 @@ add_history(const char *line)
TYPE(HistEvent) ev;
const Char *wline;
+ if (line == NULL)
+ return 0;
+
if (h == NULL || e == NULL)
rl_initialize();
More information about the svn-src-stable-9
mailing list