Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54cfa943 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Camera: Fix possible ExifUtils heap corruption am: aa567338 am: 711ebe64...

Camera: Fix possible ExifUtils heap corruption am: aa567338 am: 711ebe64 am: f4481c4d am: 098aae3c

Change-Id: I628770666910386d1ca58c11573425d70b50f69d
parents e4c37b79 098aae3c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -632,13 +632,13 @@ bool ExifUtilsImpl::setGpsTimestamp(const struct tm& t) {
}

bool ExifUtilsImpl::setImageHeight(uint32_t length) {
    SET_LONG(EXIF_IFD_0, EXIF_TAG_IMAGE_LENGTH, length);
    SET_SHORT(EXIF_IFD_0, EXIF_TAG_IMAGE_LENGTH, length);
    SET_LONG(EXIF_IFD_EXIF, EXIF_TAG_PIXEL_Y_DIMENSION, length);
    return true;
}

bool ExifUtilsImpl::setImageWidth(uint32_t width) {
    SET_LONG(EXIF_IFD_0, EXIF_TAG_IMAGE_WIDTH, width);
    SET_SHORT(EXIF_IFD_0, EXIF_TAG_IMAGE_WIDTH, width);
    SET_LONG(EXIF_IFD_EXIF, EXIF_TAG_PIXEL_X_DIMENSION, width);
    return true;
}