Skip to content

Commit

Permalink
Fix null pointer derefernce AMediaDrm_setPropertyByteArray
Browse files Browse the repository at this point in the history
Bug: 234798181
Test: ndkDrmFuzzer
Change-Id: I0d2d92ce7be108a904e811048f90a93571862ebc
  • Loading branch information
Kyle Zhang authored and thestinger committed Sep 18, 2023
1 parent 41235bc commit a89f704
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions media/ndk/NdkMediaDrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,9 @@ media_status_t AMediaDrm_setPropertyString(AMediaDrm *mObj,
EXPORT
media_status_t AMediaDrm_setPropertyByteArray(AMediaDrm *mObj,
const char *propertyName, const uint8_t *value, size_t valueSize) {
if (!mObj || mObj->mDrm == NULL) {
return AMEDIA_ERROR_INVALID_OBJECT;
}

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

0 comments on commit a89f704

Please sign in to comment.