elk: Bounds check access to p->store
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user