XFree86-4.5.0, gimp-2.2.8: can't save xpm files

Dejan Lesjak dejan.lesjak at ijs.si
Thu Sep 29 16:26:06 PDT 2005


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
-------------- next part --------------
--- 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))) {


More information about the freebsd-x11 mailing list