aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/dirax.c4
1 files changed, 3 insertions, 1 deletions
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';