diff options
author | Thomas White <taw@physics.org> | 2022-11-05 18:12:53 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-11-05 18:15:03 +0100 |
commit | b5625226829615fa5e7979a81c6770bd116349ce (patch) | |
tree | 0fe2be6f547723113a79bc1249fbb612f456408b | |
parent | bfd7c16a8919a6bae5263f5f7cfe2c131e6ba2d9 (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.c | 2 |
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); |