diff options
author | Marco Nelissen <marcone@google.com> | 2014-09-17 12:38:33 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2014-09-17 12:38:33 -0700 |
commit | 9b7db1c57ff2a3f854568dd61fcec82ff63addeb (patch) | |
tree | 9ef04f6512cbd03360d9065bdbaa359430e48217 /media | |
parent | 086c1e3f41a92aa0025a1da1db5dabbfdffaf129 (diff) | |
download | frameworks_av-9b7db1c57ff2a3f854568dd61fcec82ff63addeb.zip frameworks_av-9b7db1c57ff2a3f854568dd61fcec82ff63addeb.tar.gz frameworks_av-9b7db1c57ff2a3f854568dd61fcec82ff63addeb.tar.bz2 |
Fix null pointer dereference
Bug: 17544813
Change-Id: I6c94cd3056a99bb42fc71ee583938a2e3806fdc7
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/codecs/aacdec/SoftAAC2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp index 4569c1c..456be89 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp @@ -705,7 +705,9 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { } // Discard input buffer. - inHeader->nFilledLen = 0; + if (inHeader) { + inHeader->nFilledLen = 0; + } aacDecoder_SetParam(mAACDecoder, AAC_TPDEC_CLEAR_BUFFER, 1); @@ -736,7 +738,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { notify(OMX_EventPortSettingsChanged, 1, 0, NULL); mOutputPortSettingsChange = AWAITING_DISABLED; - if (inHeader->nFilledLen == 0) { + if (inHeader && inHeader->nFilledLen == 0) { inInfo->mOwnedByUs = false; mInputBufferCount++; inQueue.erase(inQueue.begin()); |