diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 14:30:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 14:41:34 +0100 |
commit | 326c93feaa89383ef10e5a9878bb2096c895ed91 (patch) | |
tree | 512420f97b474099822c4c858dba5ee8cbf3f993 /filter | |
parent | d176c0f3040743d470976bf99cbcc5a7b864e50e (diff) |
coverity#1242658 Untrusted loop bound
Change-Id: Idc3b3ce1174537039ce613e2f84f857e94299faa
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index d926079629ab..53b1a09fc4e0 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -835,7 +835,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo BITMAPERROR; if ( nRowBytes < 8 || nPackType == 1 ) { - if (pPict->remainingSize() < sizeof(sal_uInt8) * nHeight * nRowBytes) + if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt8) * nRowBytes)) BITMAPERROR; } @@ -908,7 +908,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo BITMAPERROR; if ( nRowBytes < 8 || nPackType == 1 ) { - if (pPict->remainingSize() < sizeof(sal_uInt16) * nHeight * nWidth) + if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt16) * nWidth)) BITMAPERROR; } |