Date: Fri, 19 Oct 2007 23:03:39 GMT From: Martin Beran <mb@tns.cz> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/117348: Loading history file sometimes fails in libedit Message-ID: <200710192303.l9JN3d3S014784@www.freebsd.org> Resent-Message-ID: <200710192310.l9JNA2RK075956@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 117348 >Category: kern >Synopsis: Loading history file sometimes fails in libedit >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 19 23:10:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Martin Beran >Release: 6.2-RELEASE-p4 >Organization: Trusted Network Solutions, a. s. >Environment: FreeBSD mb.tns.cz 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Sun Apr 29 22:31:25 CEST 2007 root@mb.tns.cz:/usr/obj/usr/src/sys/MB i386 >Description: Under some circumstances, loading history in libedit by history(H_LOAD) causes abnormal program termination due to invalid memory access on line 693 of /usr/src/lib/libedit/history.c. >How-To-Repeat: >Fix: Compile the following program with ElectricFence #include <histedit.h> int main(int argc, char* argv[]) { History* h = history_init(); HistEvent ev; history(h, &ev, H_LOAD, argv[1]); return 0; } and run it with a history file 4096 bytes long containing _HiStOrY_V2_ def0123456789abcdef0123456789abcdef0123456789abcde followed by 63 copies of line: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710192303.l9JN3d3S014784>