From 8611de4eadeebf8673fd0c4b97eb0c45af695155 Mon Sep 17 00:00:00 2001 From: Jeff Tinker Date: Fri, 30 May 2014 16:26:39 -0700 Subject: [PATCH] Fix AUPT: Native crash in /system/bin/mediaserver Protect against invalid memcpy to NULL bug: 15163357 Change-Id: Ifab17714473f45cb714a0ee765638733b3236ec8 --- proprietary/wvm/WVMMediaSource.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proprietary/wvm/WVMMediaSource.cpp b/proprietary/wvm/WVMMediaSource.cpp index fe69691b..9a59250f 100644 --- a/proprietary/wvm/WVMMediaSource.cpp +++ b/proprietary/wvm/WVMMediaSource.cpp @@ -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) {