From d3d65e5c889fc3922efc7a8c764027763bc4764f Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 16 Dec 2021 09:17:11 +0100 Subject: Prevent loading images that would require too much memory. For most image formats, the header specifies the width/height. PHP allocates an image object from that size, even if the actual image data is much smaller. This image object size is not limited by the limit configured in PHP. The memory limit can be configured through "config.php" setting "preview_max_memory" and defaults to 128 MBytes which should be enough for most images without filling up all memory. Signed-off-by: Joachim Bauch --- tests/data/testimage-badheader.jpg | Bin 0 -> 103 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/data/testimage-badheader.jpg (limited to 'tests/data') diff --git a/tests/data/testimage-badheader.jpg b/tests/data/testimage-badheader.jpg new file mode 100644 index 00000000000..b876804eb4e Binary files /dev/null and b/tests/data/testimage-badheader.jpg differ -- cgit v1.2.3