misc/182373: [patch] editors/joe: segv in jmacs mode with n files opened
Sergey Kandaurov
pluknet at gmail.com
Wed Sep 25 13:50:00 UTC 2013
>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:
More information about the freebsd-bugs
mailing list