mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 05:22:40 +02:00
plug-ins: Fix PSP vulnerability (ZDI-CAN-22097)
Resolves #10071. When reading RLE compressed data, a buffer was allocated to 127 bytes. However, it can potentially be used to read 128 bytes, leading to a off-by-one vulnerability. This patch allocates 128 bytes to the buffer to prevent this from occurring.
This commit is contained in:
@@ -1649,7 +1649,7 @@ read_channel_data (FILE *f,
|
||||
else
|
||||
endq = q + line_width * height;
|
||||
|
||||
buf = g_malloc (127);
|
||||
buf = g_malloc (128);
|
||||
while (q < endq)
|
||||
{
|
||||
fread (&runcount, 1, 1, f);
|
||||
|
Reference in New Issue
Block a user