1--TEST-- 2Bug #79945 (using php wrappers in imagecreatefrompng causes segmentation fault) 3--EXTENSIONS-- 4gd 5--SKIPIF-- 6<?php 7set_error_handler(function($errno, $errstr) { 8 if (str_contains($errstr, 'Cannot cast a filtered stream on this system')) { 9 die('skip: fopencookie not support on this system'); 10 } 11}); 12imagecreatefrompng('php://filter/read=convert.base64-encode/resource=' . __DIR__ . '/test.png'); 13restore_error_handler(); 14?> 15--FILE-- 16<?php 17imagecreatefrompng('php://filter/read=convert.base64-encode/resource=' . __DIR__ . '/test.png'); 18?> 19--CLEAN-- 20--EXPECTF-- 21 22Warning: imagecreatefrompng(): "php://filter/read=convert.base64-encode/resource=%s" is not a valid PNG file in %s on line %d 23