Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Sep 2001 00:56:26 +0000 (UTC)
From:      naddy@mips.inka.de (Christian Weisgerber)
To:        freebsd-ports@freebsd.org
Subject:   Re: ports/30713: 'gtar --version' segfaults
Message-ID:  <9ognjq$1i92$1@kemoauc.mips.inka.de>
References:  <20010921224643.63992.qmail@nightshade.la.mastaler.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<jason-dated-1002321733.08bf3d@mastaler.com> wrote:

> >Description:
> 
> I just upgraded my gtar port to 1.13.23, and get a segmentation fault
> when I run 'gtar --version'.  Strangely, the program seems to work
> fine otherwise.

In an act of unprecedented ridiculousness gtar goes through contortions
with locales and iconv in order to obtain a "pretty" copyright
symbol, if the user's character set contains one.

On systems with insufficient locale support this code dereferences
a NULL pointer.  It doesn't happen for me on 5.0-CURRENT, but I've
seen it on another platform.

The patchlet below should fix this.

--- /usr/ports/archivers/gtar/files/patch-lib_copysym.c	Thu Jan  1 01:00:00 1970
+++ gtar/files/patch-lib_copysym.c	Sat Sep 22 02:43:08 2001
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- lib/copysym.c.orig	Sat Sep 15 07:53:06 2001
++++ lib/copysym.c	Sat Sep 22 02:42:33 2001
+@@ -60,7 +60,7 @@
+ #endif
+     }
+ 
+-  if (*outcharset)
++  if (outcharset && *outcharset)
+     {
+       iconv_t conv = iconv_open (outcharset, "UTF-8");
+ 
-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9ognjq$1i92$1>