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

Commit 2442047f authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Fix use of uninitialized value in libmediadrm

bug:70526702
test:gts media tests

Change-Id: I29a67dad01ca8c8f649ba12cf08cc86b7eb56523
parent 5231cc16
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -331,10 +331,13 @@ ssize_t CryptoHal::decrypt(const uint8_t keyId[16], const uint8_t iv[16],
            return status;
            return status;
        }
        }
        secure = false;
        secure = false;
    } else {
    } else if (destination.mType == kDestinationTypeNativeHandle) {
        hDestination.type = BufferType::NATIVE_HANDLE;
        hDestination.type = BufferType::NATIVE_HANDLE;
        hDestination.secureMemory = hidl_handle(destination.mHandle);
        hDestination.secureMemory = hidl_handle(destination.mHandle);
        secure = true;
        secure = true;
    } else {
        android_errorWriteLog(0x534e4554, "70526702");
        return UNKNOWN_ERROR;
    }
    }


    ::SharedBuffer hSource;
    ::SharedBuffer hSource;
+4 −0
Original line number Original line Diff line number Diff line
@@ -369,6 +369,10 @@ status_t BnCrypto::onTransact(
                    android_errorWriteLog(0x534e4554, "71389378");
                    android_errorWriteLog(0x534e4554, "71389378");
                    return OK;
                    return OK;
                }
                }
            } else {
                reply->writeInt32(BAD_VALUE);
                android_errorWriteLog(0x534e4554, "70526702");
                return OK;
            }
            }


            AString errorDetailMsg;
            AString errorDetailMsg;