Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2019 22:34:22 +0200
From:      Niclas Zeising <zeising@freebsd.org>
To:        Christian Barthel <bch@online.de>, x11@FreeBSD.org
Subject:   Re: xedit Segfaults without "tags" file
Message-ID:  <63c44680-68df-8aaa-1395-d920db4dcb1d@freebsd.org>
In-Reply-To: <87o8zs9bzb.fsf@x230.onfire.org>
References:  <87o8zs9bzb.fsf@x230.onfire.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------A393AE7E71F7DC3476ADEE89
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 2019-09-10 21:40, Christian Barthel wrote:
> Hello,
> 
> I am using xedit(1) on FreeBSD 12 (installed as package).
> 
> xedit-1.2.2                    Simple text editor for X
> 
> When starting xedit(1), a Segmentation Fault occurs.  It looks
> like it wants to access the file ~/tags.  After creating this
> file, xedit(1) starts as expected.
> 

Hi!
Can you try the attached patch?  It's against the ports tree, and then 
you need to rebuild the port manually or use poudriere to test it.
Thanks!
Regards
-- 
Niclas Zeising

--------------A393AE7E71F7DC3476ADEE89
Content-Type: text/x-patch; charset=UTF-8;
 name="ports.x11.xedit.segfault.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ports.x11.xedit.segfault.diff"

Index: x11/xedit/Makefile
===================================================================
--- x11/xedit/Makefile	(revision 511829)
+++ x11/xedit/Makefile	(working copy)
@@ -2,12 +2,18 @@
 
 PORTNAME=	xedit
 PORTVERSION=	1.2.2
+PORTREVISION=	1
 CATEGORIES=	x11
 
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	Simple text editor for X
 
-XORG_CAT=	app
-USE_XORG=	xt xaw7
+LICENSE=	MIT BSD3CLAUSE
+LICENSE_COMB=	multi
+LICENSE_FILE=	${WRKSRC}/COPYING
 
+USES=		xorg-cat:app xorg
+
+USE_XORG=	x11 xmu xt xaw7
+
 .include <bsd.port.mk>
Index: x11/xedit/files/patch-util.c
===================================================================
--- x11/xedit/files/patch-util.c	(nonexistent)
+++ x11/xedit/files/patch-util.c	(working copy)
@@ -0,0 +1,27 @@
+--- util.c.orig	2015-02-21 21:42:33 UTC
++++ util.c
+@@ -506,13 +506,14 @@ ResolveName(char *filename)
+ 
+     if (result == NULL && errno == ENOENT) {
+ 	int	length;
+-	char	*dir, *file;
++	char	*dir, *file, *fname;
+ 
+ 	length = strlen(filename);
+ 	tmp = dir = XtMalloc(length + 1);
+ 	strcpy(dir, filename);
++	fname = strdup(filename);
+ 
+-	file = basename(filename);
++	file = basename(fname);
+ 	dir = dirname(tmp);
+ 
+ 	/* Creating a new file? */
+@@ -526,6 +527,7 @@ ResolveName(char *filename)
+ 	}
+ 
+ 	XtFree(tmp);
++	free(fname);
+     }
+ 
+     return (result);

Property changes on: x11/xedit/files/patch-util.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property

--------------A393AE7E71F7DC3476ADEE89--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?63c44680-68df-8aaa-1395-d920db4dcb1d>