]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #29594 (Use PHP's own tmpfile() implementation).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 16 Aug 2004 23:08:56 +0000 (23:08 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 16 Aug 2004 23:08:56 +0000 (23:08 +0000)
ext/gd/gd.c

index 8694e471afab6b59db1cd8b6bc2073152e152dcf..f00e46f65a7017db33fb89c9a4e84be5b45c7f91 100644 (file)
@@ -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 <sys/wait.h>
@@ -1767,7 +1768,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;