]> granicus.if.org Git - php/commitdiff
Fix crash in stdout image output
authorStanislav Malyshev <stas@php.net>
Thu, 25 Jan 2001 14:35:36 +0000 (14:35 +0000)
committerStanislav Malyshev <stas@php.net>
Thu, 25 Jan 2001 14:35:36 +0000 (14:35 +0000)
# Basically, this code sucks. It should use GD contexts, not temp files

ext/gd/gd.c

index 45a4c5b099ec0284f8891b070f7ae3eafad02c5c..2482d5ad3149b85fe44777b11aa1a380a70db545 100644 (file)
@@ -860,10 +860,10 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
                                        if(q<0||q>255) {
                                                php_error(E_WARNING, "%s: invalid threshold value '%d'. It must be between 0 and 255",get_active_function_name(), q);
                                        }
-                                       (*func_p)(im, q, fp);
+                                       (*func_p)(im, q, tmp);
                                        break;
                                default:
-                                       (*func_p)(im, fp);
+                                       (*func_p)(im, tmp);
                                        break;
                        }