Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 575230 Details for
Bug 806689
xfig is unable to open (encapsulated) postscript files
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to rectify issue reading eps files
xfig-3.2.5b-fix-eps-reading.patch (text/plain), 1.66 KB, created by
Rohan Ferris
on 2012-04-04 22:19:28 UTC
(
hide
)
Description:
Patch to rectify issue reading eps files
Filename:
MIME Type:
Creator:
Rohan Ferris
Created:
2012-04-04 22:19:28 UTC
Size:
1.66 KB
patch
obsolete
>diff -ur xfig.3.2.5b/f_readeps.c xfig.3.2.5b.new/f_readeps.c >--- xfig.3.2.5b/f_readeps.c 2009-03-30 17:52:18.000000000 +0200 >+++ xfig.3.2.5b.new/f_readeps.c 2010-11-25 16:53:54.328247928 +0100 >@@ -252,12 +252,13 @@ > { > char buf[300]; > FILE *tmpfp, *pixfile, *gsfile; >- char *psnam, *driver; >+ char *driver; > int status, wid, ht, nbitmap, fd; > char tmpfile[PATH_MAX], > pixnam[PATH_MAX], > errnam[PATH_MAX], >- gscom[2 * PATH_MAX]; >+ gscom[2 * PATH_MAX], >+ psnam[PATH_MAX]; > > wid = urx - llx; > ht = ury - lly; >@@ -307,19 +308,14 @@ > /* for color, use pcx */ > driver = "pcx256"; > } >- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */ >- if (tmpfile[0] == '/') { >- psnam = strrchr(tmpfile, '/'); >- *psnam = 0; >- sprintf(gscom, "cd \"%s/\";", tmpfile); >- *psnam++ = '/'; /* Restore name for unlink() below */ >- } else { >- psnam = tmpfile; >- gscom[0] = '\0'; >+ /* Canonicalize the eps file filename, needed to "defeat" -dSAFER */ >+ if (!realpath(tmpfile, psnam)) { >+ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno)); >+ return False; > } >- sprintf(&gscom[strlen(gscom)], >- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1", >- appres.ghostscript, driver, wid, ht, pixnam, errnam); >+ sprintf(gscom, >+ "%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1", >+ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam); > if (appres.DEBUG) > fprintf(stderr,"calling: %s\n",gscom); > if ((gsfile = popen(gscom, "w")) == 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 806689
:
575229
| 575230 |
575868