Fix AUPT: Native crash in /system/bin/mediaserver

Protect against invalid memcpy to NULL

bug: 15163357
Change-Id: Ifab17714473f45cb714a0ee765638733b3236ec8
This commit is contained in:
Jeff Tinker
2014-05-30 16:26:39 -07:00
parent 52683d3e28
commit 8611de4ead

View File

@@ -477,6 +477,11 @@ void WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void* out
DecryptContext &context = source->getDecryptContext();
uint32_t copied = length;
if (!context.mMediaBuf->data()) {
ALOGE("WVMMediaSource::DecryptCallback - no media buffer!");
return;
}
if (clientContext->getCryptoPluginMode()) {
// just determine crypto unit boundaries
if (key) {