From 2d895c0b05a7bb35063a7efbd0ab20b5be720967 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 26 Jun 2015 14:04:01 +0200 Subject: Work round unaligned read with DirAx Ok, just to keep Valgrind quiet. --- libcrystfel/src/dirax.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c index a48cf2e8..05e44d97 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/dirax.c @@ -434,7 +434,9 @@ static int dirax_readable(struct image *image, struct dirax_data *dirax) switch ( type ) { case DIRAX_INPUT_LINE : - block_buffer = malloc(i+1); + /* Make buffer a bit too big to keep Valgrind + * quiet about alignment errors */ + block_buffer = malloc(i+4); memcpy(block_buffer, dirax->rbuffer, i); block_buffer[i] = '\0'; -- cgit v1.2.3