Commit 48ec1589 authored by Simon Budig's avatar Simon Budig

file-psp: fix for bogus input data. Fixes bug #639203

parent 7fb0300e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment