From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 25 13:50:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C405B255 for ; Wed, 25 Sep 2013 13:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A284E2703 for ; Wed, 25 Sep 2013 13:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8PDo01m021414 for ; Wed, 25 Sep 2013 13:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8PDo0Vc021412; Wed, 25 Sep 2013 13:50:00 GMT (envelope-from gnats) Resent-Date: Wed, 25 Sep 2013 13:50:00 GMT Resent-Message-Id: <201309251350.r8PDo0Vc021412@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, Sergey Kandaurov Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9013DE1 for ; Wed, 25 Sep 2013 13:40:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B72172652 for ; Wed, 25 Sep 2013 13:40:12 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8PDeCV0003389 for ; Wed, 25 Sep 2013 13:40:12 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8PDeCFn003377; Wed, 25 Sep 2013 13:40:12 GMT (envelope-from nobody) Message-Id: <201309251340.r8PDeCFn003377@oldred.freebsd.org> Date: Wed, 25 Sep 2013 13:40:12 GMT From: Sergey Kandaurov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/182373: [patch] editors/joe: segv in jmacs mode with n files opened X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 13:50:00 -0000 >Number: 182373 >Category: misc >Synopsis: [patch] editors/joe: segv in jmacs mode with n files opened >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: Wed Sep 25 13:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Sergey Kandaurov >Release: FreeBSD 10.0-CURRENT >Organization: n/a >Environment: >Description: joe immediately segfaults with `jmacs 1 2' Patch from upstream via pkgsrc ("Fix segfault from -orphan"). >How-To-Repeat: >Fix: Patch attached with submission follows: Index: editors/joe/files/patch-main.c =================================================================== --- editors/joe/files/patch-main.c (revision 0) +++ editors/joe/files/patch-main.c (working copy) @@ -0,0 +1,18 @@ +$NetBSD: patch-main.c,v 1.1 2011/04/01 13:12:24 wiz Exp $ + +Fix for crash with a segv if called as jmacs with more then +one file as an argument on the command line from upstream. + +http://joe-editor.cvs.sourceforge.net/viewvc/joe-editor/joe-current/main/main.c?r1=1.5&r2=1.6 + +--- main.c.orig 2008-10-27 03:01:11.000000000 +0000 ++++ main.c +@@ -431,7 +431,7 @@ int main(int argc, char **real_argv, cha + b->orphan = 1; + b->oldcur = pdup(b->bof, USTR "main"); + pline(b->oldcur, get_file_pos(b->name)); +- p_goto_bol(bw->cursor); ++ p_goto_bol(b->oldcur); + line = b->oldcur->line - (maint->h - 1) / 2; + if (line < 0) + line = 0; >Release-Note: >Audit-Trail: >Unformatted: