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

amends commit 48ec15890e, related to
CVE-2010-4543
This commit is contained in:
Nils Philippsen
2011-05-13 17:08:02 +02:00
parent 4e6f43a890
commit f657361db0

View File

@ -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)
{