xref: /PHP-8.1/ext/exif/tests/bug60150.phpt (revision bd9f4fa6)
1--TEST--
2Bug #60150 (Integer overflow during the parsing of invalid exif header)
3--EXTENSIONS--
4exif
5--INI--
6output_handler=
7zlib.output_compression=0
8--FILE--
9<?php
10$infile = __DIR__.'/bug60150.jpg';
11var_dump(exif_read_data($infile));
12?>
13--EXPECTF--
14Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOriginal): Illegal pointer offset(%s) in %s on line %d
15
16Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
17
18Warning: exif_read_data(bug60150.jpg): Invalid JPEG file in %s on line %d
19bool(false)
20