From 858a9d1adc1b0d221499c9b91e7d7bb015f23301 Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Sun, 11 Apr 2010 18:04:05 +0000 Subject: 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@ --- lib/libdrm/intel/intel_bufmgr_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libdrm/intel') 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; -- cgit v1.2.3