fix Issue 44848 in oss-fuzz: openh264:decoder_fuzzer: Index-out-of-bounds in WelsDec::WelsInitRefList (#3499)

diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp
index 993c85c..7b50fe0 100644
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -886,7 +886,9 @@
     pRefPic->pLongRefList[LIST_0][i] = pPic;
   }
 
-  pRefPic->uiLongRefCount[LIST_0]++;
+  if (pRefPic->uiLongRefCount[LIST_0] < MAX_REF_PIC_COUNT) {
+    pRefPic->uiLongRefCount[LIST_0]++;
+  }
   return ERR_NONE;
 }