mirror of https://github.com/GNOME/gimp.git
file-psp: fix for bogus input data. Fixes bug #639203
This commit is contained in:
parent
7fb0300e1c
commit
48ec15890e
|
@ -1197,6 +1197,10 @@ read_channel_data (FILE *f,
|
|||
}
|
||||
else
|
||||
fread (buf, runcount, 1, f);
|
||||
|
||||
/* prevent buffer overflow for bogus data */
|
||||
runcount = MIN (runcount, endq - q);
|
||||
|
||||
if (bytespp == 1)
|
||||
{
|
||||
memmove (q, buf, runcount);
|
||||
|
|
Loading…
Reference in New Issue