From b89024d675247fa9228ed52142c5c833914d1dd1 Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Thu, 14 May 2026 06:10:32 +0000 Subject: [PATCH] fix: V-001 security vulnerability Automated security fix generated by Orbis Security AI --- hdmi/xilinx-hdmirx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdmi/xilinx-hdmirx.c b/hdmi/xilinx-hdmirx.c index 913616c..59b35e9 100644 --- a/hdmi/xilinx-hdmirx.c +++ b/hdmi/xilinx-hdmirx.c @@ -366,7 +366,7 @@ static int xhdmi_set_edid(struct v4l2_subdev *subdev, struct v4l2_edid *edid) { xhdmi_set_hpd(xhdmi, 0); if (edid->blocks) { - memcpy(xhdmi->edid_user, edid->edid, 128 * edid->blocks); + memcpy(xhdmi->edid_user, edid->edid, 128 * min_t(unsigned int, edid->blocks, xhdmi->edid_blocks_max)); XV_HdmiRxSs_LoadEdid(HdmiRxSsPtr, (u8 *)&xhdmi->edid_user, 128 * (u16)xhdmi->edid_user_blocks); /* enable hotplug after 100 ms */