From 66adfc394b7cca7684dc5588287cb76f1a834a06 Mon Sep 17 00:00:00 2001 From: BenzhengZhang Date: Tue, 3 Dec 2024 11:18:07 +0800 Subject: [PATCH 1/3] Potential bug fix --- codec/decoder/core/src/decoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codec/decoder/core/src/decoder.cpp b/codec/decoder/core/src/decoder.cpp index 6c634202a8..e3f14b8c0c 100644 --- a/codec/decoder/core/src/decoder.cpp +++ b/codec/decoder/core/src/decoder.cpp @@ -846,6 +846,10 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in return pCtx->iErrorCode; } + if (pCtx->iErrorCode != ERR_NONE && !(pCtx->iErrorCode & dsDataErrorConcealed)) { + return pCtx->iErrorCode; + } + pDstNal += (iDstIdx + 4); //init, increase 4 reserved zero bytes, used to store the next NAL if ((iSrcLength - iSrcConsumed + 4) > (pRawData->pEnd - pDstNal)) { pDstNal = pRawData->pCurPos = pRawData->pHead; From 70b074e0dad57f6a648a1f3e57a1f7f973416b88 Mon Sep 17 00:00:00 2001 From: BenzhengZhang Date: Wed, 5 Mar 2025 14:39:10 +0800 Subject: [PATCH 2/3] update openh264 version to v2.5.1 --- Makefile | 2 +- build/platform-darwin.mk | 2 +- codec/api/wels/codec_ver.h | 8 ++++---- gmpopenh264.info | 2 +- meson.build | 2 +- openh264.rc | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index fc3c9a794e..81f91160aa 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ USE_LOW_VERSION_NDK=No USE_ANT=No SHAREDLIB_MAJORVERSION=7 -FULL_VERSION := 2.5.0 +FULL_VERSION := 2.5.1 ifeq (,$(wildcard $(SRC_PATH)gmp-api)) HAVE_GMP_API=No diff --git a/build/platform-darwin.mk b/build/platform-darwin.mk index da5574a6e6..f1a5649abd 100644 --- a/build/platform-darwin.mk +++ b/build/platform-darwin.mk @@ -3,7 +3,7 @@ SHAREDLIB_DIR = $(PREFIX)/lib SHAREDLIBSUFFIX = dylib SHAREDLIBSUFFIXFULLVER=$(FULL_VERSION).$(SHAREDLIBSUFFIX) SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIB_MAJORVERSION).$(SHAREDLIBSUFFIX) -CURRENT_VERSION := 2.5.0 +CURRENT_VERSION := 2.5.1 COMPATIBILITY_VERSION := 2.5.0 SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ -fno-common -headerpad_max_install_names -install_name \ diff --git a/codec/api/wels/codec_ver.h b/codec/api/wels/codec_ver.h index 06b1fc0b05..10c86a0c5a 100644 --- a/codec/api/wels/codec_ver.h +++ b/codec/api/wels/codec_ver.h @@ -4,12 +4,12 @@ #include "codec_app_def.h" -static const OpenH264Version g_stCodecVersion = {2, 5, 0, 2411}; -static const char* const g_strCodecVer = "OpenH264 version:2.5.0.2411"; +static const OpenH264Version g_stCodecVersion = {2, 5, 1, 2503}; +static const char* const g_strCodecVer = "OpenH264 version:2.5.1.2503"; #define OPENH264_MAJOR (2) #define OPENH264_MINOR (5) -#define OPENH264_REVISION (0) -#define OPENH264_RESERVED (2411) +#define OPENH264_REVISION (1) +#define OPENH264_RESERVED (2503) #endif // CODEC_VER_H diff --git a/gmpopenh264.info b/gmpopenh264.info index e7aaeab89d..5e1af016d9 100644 --- a/gmpopenh264.info +++ b/gmpopenh264.info @@ -1,4 +1,4 @@ Name: gmpopenh264 Description: GMP Plugin for OpenH264. -Version: 2.5.0 +Version: 2.5.1 APIs: encode-video[h264], decode-video[h264] diff --git a/meson.build b/meson.build index 5dbefa4399..8ab1b678a3 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('openh264', ['c', 'cpp'], - version : '2.5.0', + version : '2.5.1', meson_version : '>= 0.52', default_options : [ 'warning_level=1', 'buildtype=debugoptimized' ]) diff --git a/openh264.rc b/openh264.rc index ecff214106..a71c18ee2c 100644 --- a/openh264.rc +++ b/openh264.rc @@ -24,8 +24,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,5,0,2411 - PRODUCTVERSION 2,5,0,2411 + FILEVERSION 2,5,1,2503 + PRODUCTVERSION 2,5,1,2503 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,12 +43,12 @@ BEGIN VALUE "Comments", "Cisco OpenH264 codec" VALUE "CompanyName", "Cisco Systems Inc." VALUE "FileDescription", "Cisco OpenH264 codec" - VALUE "FileVersion", "2.5.0.2411" + VALUE "FileVersion", "2.5.1.2503" VALUE "InternalName", "openh264.dll" VALUE "LegalCopyright", "© 2011-2015 Cisco and/or its affiliates. All rights reserved." VALUE "OriginalFilename", "openh264.dll" VALUE "ProductName", "Cisco OpenH264 codec" - VALUE "ProductVersion", "2.5.0.2411" + VALUE "ProductVersion", "2.5.1.2503" END END BLOCK "VarFileInfo" From bb36f79b36abc609078762a2162ff7fbd8bc1de2 Mon Sep 17 00:00:00 2001 From: BenzhengZhang Date: Wed, 5 Mar 2025 14:49:28 +0800 Subject: [PATCH 3/3] update release note --- RELEASES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASES b/RELEASES index a267e7e6a0..57fb9406f4 100644 --- a/RELEASES +++ b/RELEASES @@ -1,6 +1,10 @@ Releases ----------- +v2.5.1 +------ +- Fix decoder heap overflow vulnerability (Commit: 63db555e, PR: #3818) + v2.5.0 ------ - Fix some multi-thread decoding issues