aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-11-05 18:12:53 +0100
committerThomas White <taw@physics.org>2022-11-05 18:15:03 +0100
commitb5625226829615fa5e7979a81c6770bd116349ce (patch)
tree0fe2be6f547723113a79bc1249fbb612f456408b
parentbfd7c16a8919a6bae5263f5f7cfe2c131e6ba2d9 (diff)
Stream: increase maximum geometry file size to 1 megabyte
The old maximum was 64 kilobytes, and a 68k geometry file has now been seen in the wild. The limit is only needed to prevent runaway memory allocation in the case of a corrupted stream. So it's safe to increase it quite a lot.
-rw-r--r--libcrystfel/src/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 0195e0ff..5fb6b9fa 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -943,7 +943,7 @@ static int read_geometry_file(Stream *st)
{
int done = 0;
size_t len = 0;
- const size_t max_geom_len = 64*1024;
+ const size_t max_geom_len = 1024*1024;
char *geom;
geom = malloc(max_geom_len);