ultrahdr: asan fix, default initialize member variable
The default value of mExifPos is commented as -1, but this is missing.
Further size_t is usually defined as unsigned int resulting negative
values as overflow. Best to declare it as ssize_t
Bug: 299596513
Test: atest ultrahdr_unit_test
Change-Id: I187f21aea44914993872def5a4889435d3f2d402
diff --git a/libs/ultrahdr/jpegr.cpp b/libs/ultrahdr/jpegr.cpp
index 74760d9..705a121 100644
--- a/libs/ultrahdr/jpegr.cpp
+++ b/libs/ultrahdr/jpegr.cpp
@@ -1268,7 +1268,7 @@
jpegr_compressed_struct new_jpg_image;
new_jpg_image.data = nullptr;
new_jpg_image.length = 0;
- if (decoder.getEXIFPos() != 0) {
+ if (decoder.getEXIFPos() >= 0) {
if (pExif != nullptr) {
ALOGE("received EXIF from outside while the primary image already contains EXIF");
return ERROR_JPEGR_INVALID_INPUT_TYPE;