summaryrefslogtreecommitdiff
path: root/lib/libdrm
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-04-11 18:04:05 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-04-11 18:04:05 +0000
commit858a9d1adc1b0d221499c9b91e7d7bb015f23301 (patch)
tree10ce85bef231f2bc677ac3600dcea8162c3f31ca /lib/libdrm
parent30ea976dcf4ee5934ccb604dac067248e5a5c6fe (diff)
don't allocate an array of pointers to structs when you want an array of
structs. Fixes cases where you need a lot of relocs so you overflow the array. Commited upstream about ten minutes ago. ok matthieu@
Diffstat (limited to 'lib/libdrm')
-rw-r--r--lib/libdrm/intel/intel_bufmgr_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libdrm/intel/intel_bufmgr_gem.c b/lib/libdrm/intel/intel_bufmgr_gem.c
index fdc03cf31..61dc5aedd 100644
--- a/lib/libdrm/intel/intel_bufmgr_gem.c
+++ b/lib/libdrm/intel/intel_bufmgr_gem.c
@@ -436,7 +436,7 @@ drm_intel_setup_reloc_list(drm_intel_bo *bo)
bo_gem->relocs = malloc(max_relocs *
sizeof(struct drm_i915_gem_relocation_entry));
bo_gem->reloc_target_info = malloc(max_relocs *
- sizeof(drm_intel_reloc_target *));
+ sizeof(drm_intel_reloc_target));
if (bo_gem->relocs == NULL || bo_gem->reloc_target_info == NULL) {
bo_gem->has_error = 1;