From ff60c97f10cac18a5a281ed997cae92a2d9656f1 Mon Sep 17 00:00:00 2001 From: Cai_Jianxing Date: Sat, 16 Nov 2024 22:03:19 +0800 Subject: [PATCH] [VP] fix coverity issue invalid iterator fix coverity issue invalid iterator. --- .../common/vp/hal/pipeline/vp_packet_reuse_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/media_softlet/agnostic/common/vp/hal/pipeline/vp_packet_reuse_manager.cpp b/media_softlet/agnostic/common/vp/hal/pipeline/vp_packet_reuse_manager.cpp index 29d27690c26..9ea0c16e863 100644 --- a/media_softlet/agnostic/common/vp/hal/pipeline/vp_packet_reuse_manager.cpp +++ b/media_softlet/agnostic/common/vp/hal/pipeline/vp_packet_reuse_manager.cpp @@ -953,6 +953,11 @@ MOS_STATUS VpPacketReuseManager::PreparePacketPipeReuse(SwFilterPipe *&swFilterP else { auto pipe_TeamsPacket = m_pipeReused_TeamsPacket.find(index); + if (pipe_TeamsPacket == m_pipeReused_TeamsPacket.end()) + { + VP_PUBLIC_ASSERTMESSAGE("Invalid teams packet pipe for reuse!"); + VP_PUBLIC_CHK_STATUS_RETURN(MOS_STATUS_INVALID_PARAMETER); + } VpCmdPacket *packet = pipe_TeamsPacket->second->GetPacket(0); VP_PUBLIC_CHK_NULL_RETURN(packet);