mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
af56fed73b
Unlike the original patch, this does not return an unknown format in case an unsigned compatible type cannot be found (cases for SINGLE and DOUBLE removed), as these seems rare cases according to the inline comments. Note, the test does not test if PHP is in debug mode, although the report originally states it only occurs there only. The fix is based on a patch by hlt99 at blinkenshell dot org
13 lines
418 B
PHP
13 lines
418 B
PHP
--TEST--
|
|
Bug #71534 (Type confusion in exif_read_data() leading to heap overflow in debug mode)
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
|
--FILE--
|
|
<?php
|
|
// This is kinda bad, I know! But, this generates about 200+ warnings due to its
|
|
// broken TIFF format
|
|
var_dump(@exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . 'bug71534.tiff') === false);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|