From 886ae5210de0d4bf1e5e026bdf38226b992764de Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 18 Aug 2020 15:32:57 +0200 Subject: predict-refine: Remove out-of-bounds GSL vector access We got away with this because the GSL error handler is turned off in indexamjig.c, and invalid accesses are defined to return 0. However, these accesses should have been removed when the clen refinement was disabled in predict-refine --- libcrystfel/src/predict-refine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index aff5fc22..e29c4faa 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -540,10 +540,10 @@ static int iterate(struct reflpeak *rps, int n, UnitCell *cell, csz += gsl_vector_get(shifts, 8); update_detector(image->det, gsl_vector_get(shifts, 9), gsl_vector_get(shifts, 10), - gsl_vector_get(shifts, 11)); + 0.0); *total_x += gsl_vector_get(shifts, 9); *total_y += gsl_vector_get(shifts, 10); - *total_z += gsl_vector_get(shifts, 11); + *total_z += 0.0; cell_set_reciprocal(cell, asx, asy, asz, bsx, bsy, bsz, csx, csy, csz); -- cgit v1.2.3