1--TEST-- 2OSS-Fuzz #17163: Out-of-bounds read due to tag with zero components 3--SKIPIF-- 4<?php 5if (!extension_loaded('exif')) { 6 die('skip exif extension not available'); 7} 8?> 9--FILE-- 10<?php 11 12var_dump(exif_read_data(__DIR__ . '/tag_with_illegal_zero_components.jpeg')); 13 14?> 15--EXPECTF-- 16Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): Process tag(x0202=JPEGInterch): Cannot be empty in %s on line %d 17 18Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): File structure corrupted in %s on line %d 19 20Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): Invalid JPEG file in %s on line %d 21bool(false) 22