openbsd-ports/graphics/tiff/patches/patch-tools_fax2ps_c
naddy 12aaddf055 SECURITY:
Update to 3.9.4, which includes fixes for CVE-2009-2347 and CVE-2010-1411.
2010-06-30 17:10:07 +00:00

20 lines
633 B
Plaintext

$OpenBSD: patch-tools_fax2ps_c,v 1.6 2010/06/30 17:10:08 naddy Exp $
--- tools/fax2ps.c.orig Thu Apr 20 14:36:23 2006
+++ tools/fax2ps.c Sun Oct 11 15:42:29 2009
@@ -377,11 +377,12 @@ main(int argc, char** argv)
int n;
FILE* fd;
char buf[16*1024];
+ char temp[22];
- fd = tmpfile();
+ strlcpy(temp, "/tmp/fax2psXXXXXXXXXX", sizeof(temp));
+ fd = fdopen(mkstemp(temp), "w+");
if (fd == NULL) {
- fprintf(stderr, "Could not create temporary file, exiting.\n");
- fclose(fd);
+ fprintf(stderr, "Could not create temporary file \"%s\".\n", temp);
exit(-2);
}
#if defined(HAVE_SETMODE) && defined(O_BINARY)