From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 19 23:10:03 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0693A16A41A for ; Fri, 19 Oct 2007 23:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C2BFD13C459 for ; Fri, 19 Oct 2007 23:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9JNA2ZM075963 for ; Fri, 19 Oct 2007 23:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9JNA2RK075956; Fri, 19 Oct 2007 23:10:02 GMT (envelope-from gnats) Resent-Date: Fri, 19 Oct 2007 23:10:02 GMT Resent-Message-Id: <200710192310.l9JNA2RK075956@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Beran Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D58E16A41B for ; Fri, 19 Oct 2007 23:03:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 0F06413C459 for ; Fri, 19 Oct 2007 23:03:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9JN3dMa014785 for ; Fri, 19 Oct 2007 23:03:39 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9JN3d3S014784; Fri, 19 Oct 2007 23:03:39 GMT (envelope-from nobody) Message-Id: <200710192303.l9JN3d3S014784@www.freebsd.org> Date: Fri, 19 Oct 2007 23:03:39 GMT From: Martin Beran To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/117348: Loading history file sometimes fails in libedit X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2007 23:10:03 -0000 >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 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: