diff options
author | Thomas White <taw@physics.org> | 2020-08-18 15:32:57 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-18 15:32:57 +0200 |
commit | 886ae5210de0d4bf1e5e026bdf38226b992764de (patch) | |
tree | 3024946add88b844f526231a32cc5f2c9e2522fb | |
parent | 3cc9876027c090201dfd00c0ba63e477aa5274dd (diff) |
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
-rw-r--r-- | libcrystfel/src/predict-refine.c | 4 |
1 files 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); |