[PATCH] drm/i915/gvt: char array initialization overflow

Arun R Murthy arun.r.murthy at intel.com
Tue Mar 25 03:46:43 UTC 2025


Initializer string for array of char is too long, since the char array
is initialized in place leave the length as open and let compiler choose
based on the initialized value.

Signed-off-by: Arun R Murthy <arun.r.murthy at intel.com>
---
 drivers/gpu/drm/i915/gvt/opregion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
index 509f9ccae3a9f09a7596904d88a3ac15cf6b1be7..c5ea490bf2e184c4184e161973675a38436e078c 100644
--- a/drivers/gpu/drm/i915/gvt/opregion.c
+++ b/drivers/gpu/drm/i915/gvt/opregion.c
@@ -222,7 +222,7 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
 	u8 *buf;
 	struct opregion_header *header;
 	struct vbt v;
-	const char opregion_signature[16] = OPREGION_SIGNATURE;
+	const char opregion_signature[] = OPREGION_SIGNATURE;
 
 	gvt_dbg_core("init vgpu%d opregion\n", vgpu->id);
 	vgpu_opregion(vgpu)->va = (void *)__get_free_pages(GFP_KERNEL |

---
base-commit: 9a42bdcde0f77b2c1e947e283cc3b267b1ce2056
change-id: 20250325-gvt-4e9f71337d3f

Best regards,
-- 
Arun R Murthy <arun.r.murthy at intel.com>



More information about the intel-gvt-dev mailing list