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)
This commit is contained in:
John Marino 2014-02-26 14:52:04 +00:00
parent 84cec18196
commit c5a357ca44
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=346208
2 changed files with 22 additions and 3 deletions

View File

@ -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}"

View File

@ -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;