Fix a buffer overflow on corrupted JPEG data
authorDan Fandrich <dan@coneharvesters.com>
Thu, 12 Jul 2012 17:28:26 +0000 (10:28 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 12 Jul 2012 17:28:26 +0000 (10:28 -0700)
commit00986f6fa979fe810b46e376a462c581f9746e06
tree595483de773dece5daf88a6cf1e4dc2cc953f6c1
parent8ce72b7f81e61ef69b7ad5bdfeff1516c90fa361
Fix a buffer overflow on corrupted JPEG data
An unsigned data length might wrap around when decremented
below zero, bypassing sanity checks on length.
This code path can probably only occur if exif_data_load_data()
is called directly by the application on data that wasn't parsed
by libexif itself.
This solves the other part of CVE-2012-2836
libexif/exif-data.c