projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1decab0
)
GEM: Allocate the right number of relocs, avoiding heap smashing.
author
Eric Anholt
<eric@anholt.net>
Mon, 5 May 2008 22:45:15 +0000
(15:45 -0700)
committer
Eric Anholt
<eric@anholt.net>
Mon, 5 May 2008 22:45:15 +0000
(15:45 -0700)
src/mesa/drivers/dri/intel/intel_bufmgr_gem.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c
b/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c
index 6f0ecfbdb8647d2a7c995f10a7908a99bc5be29a..e4e8481b962b3661374d389b52fc5b4abfcd620d 100644
(file)
--- 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;
}