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

Commit c1e8596b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

[DO NOT MERGE] Fix heap buffer overflow for releaseSecureStops. am: fa237c4f

Change-Id: If5a392a28c53986f4c1bf69004b1bb83186382f0
parents ccf05385 fa237c4f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -818,6 +818,12 @@ Return<Status> DrmPlugin::releaseSecureStops(const SecureStopRelease& ssRelease)
    // and the drm service. The clearkey implementation consists of:
    //    count - number of secure stops
    //    list of fixed length secure stops
    size_t countBufferSize = sizeof(uint32_t);
    if (input.size() < countBufferSize) {
        // SafetyNet logging
        android_errorWriteLog(0x534e4554, "144766455");
        return Status::BAD_VALUE;
    }
    uint32_t count = 0;
    sscanf(reinterpret_cast<char*>(input.data()), "%04" PRIu32, &count);