Date: Thu, 26 Sep 2013 17:54:59 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255891 - head/lib/libedit Message-ID: <201309261754.r8QHsxvj073328@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309261754.r8QHsxvj073328>