aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-06-26 14:04:01 +0200
committerThomas White <taw@physics.org>2015-06-26 15:49:53 +0200
commit2d895c0b05a7bb35063a7efbd0ab20b5be720967 (patch)
treecea2f570833d099c1a40b2fee642455dff0fd277 /libcrystfel/src
parent849ba7c62e2ae83ed8d4240cbbca769429d7d3bf (diff)
Work round unaligned read with DirAx
Ok, just to keep Valgrind quiet.
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';