coverity#1242908 Untrusted value as argument

Change-Id: If9dd92c361d406c435329d29870dc8bb07a8ba7b
This commit is contained in:
Caolán McNamara
2014-10-21 17:23:17 +01:00
parent 29474c7a22
commit d0be09322d
@@ -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 ];