libexif: Fix read buffer overflow (CVE-2020-0093)
authorMarcus Meissner <marcus@jet.franken.de>
Sat, 16 May 2020 14:47:42 +0000 (16:47 +0200)
committerMarcus Meissner <marcus@jet.franken.de>
Sat, 16 May 2020 14:47:42 +0000 (16:47 +0200)
commit5ae5973bed1947f4d447dc80b76d5cefadd90133
tree2bf28f9c2f59d4d735880fc1893bd5bce246040f
parent154189b77491191e00e1204083ab51c4ad5a60ff
libexif: Fix read buffer overflow (CVE-2020-0093)

Make sure the number of bytes being copied from doesn't exceed the
source buffer size.

From Android repo:
https://android.googlesource.com/platform/external/libexif/+/0335ffc17f9b9a4831c242bb08ea92f605fde7a6%5E%21/#F0

Test: testPocBug_148705132
Bug: 148705132

fixes https://github.com/libexif/libexif/issues/42
libexif/exif-data.c