summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter/ipict/ipict.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/graphicfilter/ipict/ipict.cxx')
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 8b99ccbd1aa8..01e6fe296685 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -923,7 +923,7 @@ sal_uLong PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bCo
if (nRowBytes < 8 || nPackType == 1)
{
- if (nWidth && nHeight > pPict->remainingSize() / (sizeof(sal_uInt16) * nWidth))
+ if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt16) * nWidth))
return 0xffffffff;
}
else
@@ -1021,10 +1021,10 @@ sal_uLong PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bCo
if ( nRowBytes < 8 || nPackType == 1 )
{
const size_t nMaxPixels = pPict->remainingSize() / 4;
- const size_t nMaxRows = nWidth ? nMaxPixels / nWidth : SAL_MAX_UINT16;
+ const size_t nMaxRows = nMaxPixels / nWidth;
if (nHeight > nMaxRows)
return 0xffffffff;
- const size_t nMaxCols = nHeight ? nMaxPixels / nHeight : SAL_MAX_UINT16;
+ const size_t nMaxCols = nMaxPixels / nHeight;
if (nWidth > nMaxCols)
return 0xffffffff;
@@ -1044,10 +1044,10 @@ sal_uLong PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bCo
else if ( nPackType == 2 )
{
const size_t nMaxPixels = pPict->remainingSize() / 3;
- const size_t nMaxRows = nWidth ? nMaxPixels / nWidth : SAL_MAX_UINT16;
+ const size_t nMaxRows = nMaxPixels / nWidth;
if (nHeight > nMaxRows)
return 0xffffffff;
- const size_t nMaxCols = nHeight ? nMaxPixels / nHeight : SAL_MAX_UINT16;
+ const size_t nMaxCols = nMaxPixels / nHeight;
if (nWidth > nMaxCols)
return 0xffffffff;