From: Chris Wilson Date: Sat, 17 Oct 2009 07:25:48 +0000 (+0100) Subject: intel: Disallow relocations to the byte beyond the end of the buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60a39b6799c72430851d92f93758e2f25487a0f4;p=mesa.git intel: Disallow relocations to the byte beyond the end of the buffer --- diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h index 9a619fbd5cf..d4899aab7fa 100644 --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h @@ -157,7 +157,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch, #define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel->batch, d) #define OUT_RELOC(buf, read_domains, write_domain, delta) do { \ - assert((unsigned) (delta) <= buf->size); \ + assert((unsigned) (delta) < buf->size); \ intel_batchbuffer_emit_reloc(intel->batch, buf, \ read_domains, write_domain, delta); \ } while (0)