intel: Disallow relocations to the byte beyond the end of the buffer
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 17 Oct 2009 07:25:48 +0000 (08:25 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 17 Oct 2009 07:26:54 +0000 (08:26 +0100)
src/mesa/drivers/dri/intel/intel_batchbuffer.h

index 9a619fb..d4899aa 100644 (file)
@@ -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)