From 82330eca3cc062087f22890ef1a8bea75fce9143 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 16 Jan 2025 16:45:10 -0500 Subject: [PATCH] elk: Bounds check access to `p->store` Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/elk/elk_eu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/compiler/elk/elk_eu.h b/src/intel/compiler/elk/elk_eu.h index c003258830f..15f868fd9de 100644 --- a/src/intel/compiler/elk/elk_eu.h +++ b/src/intel/compiler/elk/elk_eu.h @@ -1918,6 +1918,7 @@ static inline int next_offset(struct elk_codegen *p, void *store, int offset) { const struct intel_device_info *devinfo = p->devinfo; + assert((char *)store + offset < (char *)p->store + p->next_insn_offset); elk_inst *insn = (elk_inst *)((char *)store + offset); if (elk_inst_cmpt_control(devinfo, insn))