coverity#1242908 Untrusted value as argument
Change-Id: If9dd92c361d406c435329d29870dc8bb07a8ba7b
This commit is contained in:
@@ -217,6 +217,13 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
|
||||
sal_uLong nLastPercent = 0;
|
||||
sal_uInt8 nDat = 0, nCol = 0;
|
||||
|
||||
//sanity check there is enough data before trying allocation
|
||||
if (nPlanes > m_rPCX.remainingSize() / nBytesPerPlaneLin)
|
||||
{
|
||||
nStatus = false;
|
||||
return;
|
||||
}
|
||||
|
||||
for( np = 0; np < nPlanes; np++ )
|
||||
pPlane[ np ] = new sal_uInt8[ nBytesPerPlaneLin ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user