From c89b488350b4f70c426fe89cba7751c334975335 Mon Sep 17 00:00:00 2001 From: Christian Lehmann Date: Mon, 15 Jun 2026 11:05:07 +0200 Subject: [PATCH] fix potential security issue --- source/Lib/vvdec/vvdecimpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Lib/vvdec/vvdecimpl.cpp b/source/Lib/vvdec/vvdecimpl.cpp index 61e5025a..6faea39e 100644 --- a/source/Lib/vvdec/vvdecimpl.cpp +++ b/source/Lib/vvdec/vvdecimpl.cpp @@ -395,7 +395,7 @@ int VVDecImpl::decode( vvdecAccessUnit& rcAccessUnit, vvdecFrame** ppcFrame ) rBitstream.clearEmulationPreventionByteLocation(); size_t numNaluBytes = iAUEndPosVec[iAU] - iStartCodePosVec[iAU]; - if( numNaluBytes ) + if( numNaluBytes >= 2 ) { const uint8_t* naluData = &rcAccessUnit.payload[iStartCodePosVec[iAU]]; const NalUnitType nut = (NalUnitType) ( ( naluData[1] >> 3 ) & 0x1f );