Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2005 01:25:52 +0200
From:      Dejan Lesjak <dejan.lesjak@ijs.si>
To:        freebsd-x11@freebsd.org
Cc:        Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: XFree86-4.5.0, gimp-2.2.8: can't save xpm files
Message-ID:  <200509300125.53554.dejan.lesjak@ijs.si>
In-Reply-To: <200509292203.17419.dejan.lesjak@ijs.si>
References:  <433BEEEB.3070007@icyb.net.ua> <200509292203.17419.dejan.lesjak@ijs.si>

next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_BgHPDnqcXXtX6oO
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Thursday 29 of September 2005 22:03, Dejan Lesjak wrote:
> On Thursday 29 of September 2005 15:40, Andriy Gapon wrote:
> > I am getting "Plug-in could not save image" error while trying to save
> > xpm image in Gimp. Quick search on the net returned thess bug reports:
> >
> > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140815
> > https://bugs.freedesktop.org/show_bug.cgi?id=1924
> >
> > I assume that libXpm installed by XFree86-libraries-4.5.0 is affected by
> > the same issue.
>
> It would be, yes.
>
> > Should the same kind of patches be applied to that port ?
> > Should they be port patches ?
>
> Let's see if attached patch which is a part of relevant changes solves this
> (I can save xpm with this but haven't done much more testing than that).
> Put the patch in x11/XFree86-4-libraries/files directory and
> rebuild/reinstall XFree86-libraries.

Erm, that patch broke other stuff. Sorry. Attached is the one from Freedesktop 
bugzilla (which seems to work for me).


Dejan

--Boundary-00=_BgHPDnqcXXtX6oO
Content-Type: text/plain;
  charset="iso-8859-6";
  name="patch-WrFFrI.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-WrFFrI.c"

--- extras/Xpm/lib/WrFFrI.c.orig	Thu Sep 29 22:40:34 2005
+++ extras/Xpm/lib/WrFFrI.c	Thu Sep 29 22:41:02 2005
@@ -326,10 +326,7 @@ OpenWriteFile(filename, mdata)
 #ifndef NO_ZPIPE
 	size_t len = strlen(filename);
 
-	if(len == 0                        ||
-	   filename[0] == '/'              ||
-	   strstr(filename, "../") != NULL ||
-	   filename[len-1] == '/')
+	if(len == 0)
 		return(XpmOpenFailed);
 
 	if (len > 2 && !strcmp(".Z", filename + (len - 2))) {

--Boundary-00=_BgHPDnqcXXtX6oO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509300125.53554.dejan.lesjak>