Commit f657361d authored by Nils Philippsen's avatar Nils Philippsen
Browse files

file-psp: fix overflow protection (CVE-2011-1782)

amends commit 48ec1589, related to
CVE-2010-4543
parent 4e6f43a8
......@@ -1200,7 +1200,7 @@ read_channel_data (FILE *f,
fread (buf, runcount, 1, f);
/* prevent buffer overflow for bogus data */
runcount = MIN (runcount, endq - q);
runcount = MIN (runcount, (endq - q) / bytespp);
if (bytespp == 1)
{
......
Supports Markdown
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