summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-05-05 15:45:15 -0700
committerEric Anholt <[email protected]>2008-05-05 15:45:15 -0700
commite9a2a67745d46509928263f0556f5c0a4211b94f (patch)
tree70e848e4145ae1118acd0b42acaa7f1403f6b8da /src
parent1decab06d15f0dead0a544dbed2f10041caac844 (diff)
GEM: Allocate the right number of relocs, avoiding heap smashing.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_bufmgr_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c b/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c
index 6f0ecfbdb86..e4e8481b962 100644
--- a/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c
+++ b/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c
@@ -247,7 +247,7 @@ intel_setup_reloc_list(dri_bo *bo)
bo_gem->relocs = calloc(bufmgr_gem->max_relocs,
sizeof(struct drm_i915_gem_relocation_entry));
- bo_gem->reloc_target_bo = calloc(1, sizeof(dri_bo *));
+ bo_gem->reloc_target_bo = calloc(bufmgr_gem->max_relocs, sizeof(dri_bo *));
return 0;
}