27 lines
729 B
Plaintext
27 lines
729 B
Plaintext
--- comms.c.orig Tue Feb 16 10:24:20 1999
|
|
+++ comms.c Sat Oct 30 17:24:59 1999
|
|
@@ -1260,7 +1260,7 @@
|
|
struct action *action = NULL;
|
|
struct pk_draw_msg *message = NULL;
|
|
char arg[LEN];
|
|
- char filename[L_tmpnam] = "";
|
|
+ char filename[L_tmpnam] = "wbd.XXXXXXXX";
|
|
FILE *tmpfile;
|
|
int i, result;
|
|
|
|
@@ -1287,13 +1287,7 @@
|
|
}
|
|
|
|
/* Dump the PostScript to a temp file. */
|
|
- if (tmpnam (filename) == NULL)
|
|
- {
|
|
- printf ("Failed to create temp file.\n");
|
|
- return -1;
|
|
- }
|
|
- tmpfile = fopen (filename, "wb");
|
|
- if (tmpfile == NULL)
|
|
+ if ((tmpfile = fdopen(mkstemp(filename), "wb")) == NULL)
|
|
{
|
|
printf ("Failed to create temp file.\n");
|
|
return -1;
|