From 7be45c1573cf6b88257a48b7941c847764a5221e Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 16 Aug 2004 23:08:54 +0000 Subject: [PATCH] MFH: Fixed bug #29594 (Use PHP's own tmpfile() implementation). --- NEWS | 1 + ext/gd/gd.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 640e665aa8..b812fd21cb 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ PHP 4 NEWS ?? ??? 2004, Version 4.3.9 - Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev) - Fixed bug #29599 (domxml_error segfaults another apache module). (Rob) +- Fixed bug #29594 (Use PHP's own tmpfile() implementation). (Ilia) 11 Aug 2004, Version 4.3.9RC1 - Rewritten UNIX and Windows install help files. (Documentation Team) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 21b78374ba..803c0124d5 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -35,6 +35,7 @@ #include "SAPI.h" #include "php_gd.h" #include "ext/standard/info.h" +#include "php_open_temporary_file.h" #if HAVE_SYS_WAIT_H # include @@ -1663,7 +1664,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char FILE *tmp; char buf[4096]; - tmp = tmpfile(); + tmp = php_open_temporary_file("", "", NULL TSRMLS_CC); if (tmp == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); RETURN_FALSE; -- 2.40.0