Skip to content

Commit 2c21642

Browse files
Dylan-debugintel-mediadev
authored andcommitted
[VP] Fix height validation in FC kernel composition
Fixed a copy-paste error in VpRenderFcKernel::UpdateCompParams() where dwWidth was checked twice instead of checking both dwWidth and dwHeight. The condition now correctly validates that neither width nor height is zero before proceeding with surface composition. This bug could have allowed invalid surfaces with zero height to pass validation, potentially causing rendering issues or crashes.
1 parent 80321f0 commit 2c21642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,7 @@ MOS_STATUS VpRenderFcKernel::UpdateCompParams()
27262726
VP_RENDER_CHK_STATUS_RETURN(MOS_STATUS_NULL_POINTER);
27272727
}
27282728

2729-
if (0 == layer.surfaceEntries[0]->dwWidth || 0 == layer.surfaceEntries[0]->dwWidth)
2729+
if (0 == layer.surfaceEntries[0]->dwWidth || 0 == layer.surfaceEntries[0]->dwHeight)
27302730
{
27312731
VP_RENDER_ASSERTMESSAGE("width or height in surface entry is 0!");
27322732
VP_RENDER_CHK_STATUS_RETURN(MOS_STATUS_INVALID_PARAMETER);

0 commit comments

Comments
 (0)