file-psp: fix overflow protection (CVE-2011-1782)
amends commit 48ec15890e
, related to
CVE-2010-4543
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user