kern/117348: Loading history file sometimes fails in libedit
Martin Beran
mb at tns.cz
Fri Oct 19 16:10:03 PDT 2007
>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 at 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:
More information about the freebsd-bugs
mailing list