]> granicus.if.org Git - php/commit
Limit the amount of errors generated during exif parsing
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 9 Oct 2019 13:07:51 +0000 (15:07 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 18 Oct 2019 14:54:49 +0000 (16:54 +0200)
commite5324a2484ec0782a76daca7dd5e1a5ac232b3d8
tree84096d7ea5afb40ecc6c2ea06d604cc9e1b774e5
parent81806db90bb36eef2609ef8628ee42d732575af8
Limit the amount of errors generated during exif parsing

Emitting errors is fairly expensive, to the point that parsing
a file with a huge number of invalid tags can take seconds.
Generating ten thousand errors is unlikely to help anybody, but
constitutes a potential DOS vector.
ext/exif/exif.c
ext/exif/tests/bug76557.phpt
ext/exif/tests/bug77753.phpt