diff options
author | root <root@rshg054.dnsready.net> | 2013-09-11 01:51:01 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-09-11 01:51:01 -0700 |
commit | 2cfbbdcb041073ed1f9aff2f2fd630b24e039e6d (patch) | |
tree | dc3af95fb8134ce025aa4a516ab1a00adf0e1917 /extra/xfig/xfig-3.2.5b-fix-eps-reading.patch | |
parent | f5039428394b8715a685c006ab4c7421f45d0aff (diff) |
Wed Sep 11 01:49:28 PDT 2013
Diffstat (limited to 'extra/xfig/xfig-3.2.5b-fix-eps-reading.patch')
-rw-r--r-- | extra/xfig/xfig-3.2.5b-fix-eps-reading.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/extra/xfig/xfig-3.2.5b-fix-eps-reading.patch b/extra/xfig/xfig-3.2.5b-fix-eps-reading.patch deleted file mode 100644 index 7601d20ea..000000000 --- a/extra/xfig/xfig-3.2.5b-fix-eps-reading.patch +++ /dev/null @@ -1,46 +0,0 @@ -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) { |