Bug 182373 - [patch] editors/joe: segv in jmacs mode with n files opened
Summary: [patch] editors/joe: segv in jmacs mode with n files opened
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-25 14:50 UTC by pluknet
Modified: 2014-02-26 15:00 UTC (History)
0 users

See Also:


Attachments
file.diff (888 bytes, patch)
2013-09-25 14:50 UTC, pluknet
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pluknet 2013-09-25 14:50:00 UTC
joe immediately segfaults with `jmacs 1 2'

Patch from upstream via pkgsrc ("Fix segfault from -orphan").

Fix: Patch attached with submission follows:
Comment 1 Sergey Kandaurov freebsd_committer 2013-09-25 15:06:02 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

Ports PR.
Comment 2 Edwin Groothuis freebsd_committer 2013-09-30 00:20:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sylvio

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 John Marino freebsd_committer 2014-02-26 13:30:05 UTC
Responsible Changed
From-To: sylvio->marino

I'll overtake it
Comment 4 dfilter service freebsd_committer 2014-02-26 14:52:12 UTC
Author: marino
Date: Wed Feb 26 14:52:04 2014
New Revision: 346208
URL: http://svnweb.freebsd.org/changeset/ports/346208
QAT: https://qat.redports.org/buildarchive/r346208/

Log:
  editors/joe: Fix jmacs mode segfault (fix from pkgsrc)
  
  Fix segfault per PR (pkgsrc fix verified).
  Relocate license to please portlint, reset maintainer.
  
  PR:		ports/182373
  Submitted by:	Sergey Kandaurov
  Approved by:	maintainer timeout (5 months)

Added:
  head/editors/joe/files/patch-main.c   (contents, props changed)
Modified:
  head/editors/joe/Makefile

Modified: head/editors/joe/Makefile
==============================================================================
--- head/editors/joe/Makefile	Wed Feb 26 14:20:05 2014	(r346207)
+++ head/editors/joe/Makefile	Wed Feb 26 14:52:04 2014	(r346208)
@@ -3,14 +3,16 @@
 
 PORTNAME=	joe
 PORTVERSION=	3.7
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES?=	editors
 MASTER_SITES=	SF/joe-editor/JOE%20sources/joe-${PORTVERSION}
 
-MAINTAINER=	sylvio@FreeBSD.org
+MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Joe's Own Editor
 
+LICENSE=	GPLv1
+
 BUILD_DEPENDS=	aspell:${PORTSDIR}/textproc/aspell
 RUN_DEPENDS=	aspell:${PORTSDIR}/textproc/aspell
 
@@ -18,7 +20,6 @@ OPTIONS_DEFINE=	DOCS
 
 CONFLICTS=	joe-2.*
 
-LICENSE=	GPLv1
 USES=		gmake iconv ncurses
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}"

Added: head/editors/joe/files/patch-main.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/joe/files/patch-main.c	Wed Feb 26 14:52:04 2014	(r346208)
@@ -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;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 John Marino freebsd_committer 2014-02-26 14:58:28 UTC
State Changed
From-To: open->closed

Committed. Thanks!