From b5625226829615fa5e7979a81c6770bd116349ce Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 5 Nov 2022 18:12:53 +0100 Subject: 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. --- libcrystfel/src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel') 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); -- cgit v1.2.3