shithub: openh264

Download patch

ref: 7a1edbafd3c96d21696bb655bd657da6efbca450
parent: c210ef7f7701186e8f95f0a9eaa3475b179cf36f
author: xiaotiansf <xiaotianshimail@gmail.com>
date: Thu Apr 4 07:30:22 EDT 2019

fix oss-fuzzer reported bug 14060 by resetting decoder in time based on the error conditions.

--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -592,9 +592,10 @@
       }
       return dsErrorFree;
     }
-    if ((m_pDecContext->iErrorCode == (dsBitstreamError | dsDataErrorConcealed)) && m_pDecContext->eSliceType == B_SLICE) {
+    if ((m_pDecContext->iErrorCode & (dsBitstreamError | dsDataErrorConcealed)) && m_pDecContext->eSliceType == B_SLICE) {
       if (ResetDecoder()) {
-        return DECODING_STATE (dsBitstreamError | dsDataErrorConcealed);
+        pDstInfo->iBufferStatus = 0;
+        return (DECODING_STATE)m_pDecContext->iErrorCode;
       }
       return dsErrorFree;
     }