svn commit: r255891 - head/lib/libedit
Xin LI
delphij at FreeBSD.org
Thu Sep 26 17:54:59 UTC 2013
Author: delphij
Date: Thu Sep 26 17:54:58 2013
New Revision: 255891
URL: http://svnweb.freebsd.org/changeset/base/255891
Log:
Import NetBSD readline.c,v 1.104: do not crash with add_history(NULL).
MFC after: 3 days
Approved by: re (gjb)
Modified:
head/lib/libedit/readline.c
Modified: head/lib/libedit/readline.c
==============================================================================
--- head/lib/libedit/readline.c Thu Sep 26 16:25:06 2013 (r255890)
+++ head/lib/libedit/readline.c Thu Sep 26 17:54:58 2013 (r255891)
@@ -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-all
mailing list