summaryrefslogtreecommitdiff
path: root/print/ghostscript6/files/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'print/ghostscript6/files/patch-ad')
-rw-r--r--print/ghostscript6/files/patch-ad15
1 files changed, 15 insertions, 0 deletions
diff --git a/print/ghostscript6/files/patch-ad b/print/ghostscript6/files/patch-ad
new file mode 100644
index 000000000000..943abecaa755
--- /dev/null
+++ b/print/ghostscript6/files/patch-ad
@@ -0,0 +1,15 @@
+This patch replaces the use of the dangerous mktemp/fopen combo
+with the safe mkstemp/fdopen.
+
+ -mi
+
+--- src/gp_unifs.c Thu Mar 9 03:40:41 2000
++++ src/gp_unifs.c Wed Jul 19 09:56:42 2000
+@@ -71,4 +71,5 @@
+ strcat(fname, "XXXXXX");
+- mktemp(fname);
+- return fopen(fname, mode);
++ len = mkstemp(fname); /* reuse the no longer needed variable */
++ if (len == -1) return NULL;
++ return fdopen(len, mode);
+ }