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

Commit fc5c0f87 authored by Kyle Zhang's avatar Kyle Zhang
Browse files

Fix null pointer derefernce AMediaDrm_setPropertyByteArray

Bug: 234798181
Test: ndkDrmFuzzer
Change-Id: I0d2d92ce7be108a904e811048f90a93571862ebc
parent 1f772bf9
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -758,6 +758,9 @@ media_status_t AMediaDrm_setPropertyString(AMediaDrm *mObj,
EXPORT
EXPORT
media_status_t AMediaDrm_setPropertyByteArray(AMediaDrm *mObj,
media_status_t AMediaDrm_setPropertyByteArray(AMediaDrm *mObj,
        const char *propertyName, const uint8_t *value, size_t valueSize) {
        const char *propertyName, const uint8_t *value, size_t valueSize) {
    if (!mObj || mObj->mDrm == NULL) {
        return AMEDIA_ERROR_INVALID_OBJECT;
    }


    Vector<uint8_t> byteArray;
    Vector<uint8_t> byteArray;
    byteArray.appendArray(value, valueSize);
    byteArray.appendArray(value, valueSize);