libexif: Fix unsigned integer overflow

(offset + 2) itself may overflow if offset is larger than UINT_MAX-2.
Refactor the code to avoid the overflow.

Test: adb shell /data/fuzz/$(get_build_var TARGET_ARCH)/libexif_fuzzer/libexif_fuzzer /data/tmp/test-case
Bug: 146428941
Change-Id: I2a7bb04002f166c92247f0e8abe1c5b826b29cb1
1 file changed