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

Commit f6d07bc6 authored by Ruben Brunk's avatar Ruben Brunk Committed by Android (Google) Code Review
Browse files

Merge "Fix UAF error in CameraModule." into mnc-dev

parents b9f72ab0 eff134a6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -136,9 +136,10 @@ void CameraModule::deriveCameraCharacteristicsKeys(
    // Always add a default for the pre-correction active array if the vendor chooses to omit this
    camera_metadata_entry entry = chars.find(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE);
    if (entry.count == 0) {
        Vector<int32_t> preCorrectionArray;
        entry = chars.find(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE);
        chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, entry.data.i32,
                entry.count);
        preCorrectionArray.appendArray(entry.data.i32, entry.count);
        chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, preCorrectionArray);
    }

    return;