From bea7274dc2523829d4091ed79c7db6cba4d63bfb Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 19 Feb 2010 14:39:39 +0100 Subject: Don't overrun bounds of sfac buffer This results in Bad Stuff happening. --- src/diffraction-gpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/diffraction-gpu.c') diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index 2408538f..2c7b6884 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -216,9 +216,9 @@ void get_diffraction_gpu(struct image *image, int na, int nb, int nc, } /* Create a single-precision version of the scattering factors */ - sfac_size = IDIM*IDIM*sizeof(cl_float)*2; /* complex */ - sfac_ptr = malloc(IDIM*IDIM*sizeof(cl_float)*2); - for ( i=0; imolecule->reflections[i]); sfac_ptr[2*i+1] = cimag(image->molecule->reflections[i]); } -- cgit v1.2.3