summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-20 15:40:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-20 17:25:24 +0200
commitcf0f5d056efe28eb6177fbcfb80efe3337e5c5f2 (patch)
treee4deedb5d67e4dad3b9a4bf68d30d466f93282c9 /filter
parent531600e390ec14f5ac39979d8234283993a85ef9 (diff)
cid#1441466 silence Untrusted loop bound
Change-Id: I692f591cb3bee63ec0a0a77b3d9a4a54973451ad Reviewed-on: https://gerrit.libreoffice.org/81169 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-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 560841037b98..e2d0e9cacd3d 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1094,14 +1094,14 @@ sal_uLong PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bCo
nByteCount++;
}
size_t i = 0;
- while (i < nByteWidth)
+ while (i < aScanline.size())
{
pPict->ReadUChar( nFlagCounterByte );
if ( ( nFlagCounterByte & 0x80 ) == 0)
{
nCount = static_cast<sal_uInt16>(nFlagCounterByte) + 1;
- if ((i + nCount) > nByteWidth)
- nCount = nByteWidth - i;
+ if ((i + nCount) > aScanline.size())
+ nCount = aScanline.size() - i;
if (pPict->remainingSize() < nCount)
return 0xffffffff;
while( nCount-- )
@@ -1115,8 +1115,8 @@ sal_uLong PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bCo
if (pPict->remainingSize() < 1)
return 0xffffffff;
nCount = ( 1 - sal_Int16( static_cast<sal_uInt16>(nFlagCounterByte) | 0xff00 ) );
- if (( i + nCount) > nByteWidth)
- nCount = nByteWidth - i;
+ if (( i + nCount) > aScanline.size())
+ nCount = aScanline.size() - i;
pPict->ReadUChar( nDat );
while( nCount-- )
aScanline[ i++ ] = nDat;
p;id=d7b8a41282800e9e7d2b44deae372dd23435e444'>spurious warning C4701: potentially uninitialized local variableMichael Stahl 2014-11-12coverity#735657 Division or modulo by float zeroCaolán McNamara 2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini 2014-08-26bnc#719994: Fix the duotone filter to actually produce duotoneTor Lillqvist 2014-05-16coverity#705542 Unintentional integer overflowCaolán McNamara 2014-05-14cid#705542 Unintentional integer overflowNoel Grandin 2014-04-02Kill superfluous vertical whitespaceTor Lillqvist 2014-02-28sal_Bool -> bool in mostly vcl moduleChris Sherlock 2014-02-26Remove visual noise from vclAlexander Wilms 2014-02-21vcl: sal_Bool -> boolStephan Bergmann 2013-07-17n#820077: Import images with duotone filter.Muthu Subramanian 2013-06-20-Werror,-Wdeprecated-registerStephan Bergmann 2013-06-19Resolves: #i122418# Added workaround to not use GetBitmap on windowsArmin Le Grand 2013-05-20Resolves: #i122041# Unified and centralized control for Color ValueSetsArmin Le Grand 2013-05-09make conversions between BitmapColor and sal_uInt8 explicitHerbert Dürr 2013-03-16Bin more pointless comments and ASCII graphicsTor Lillqvist 2013-03-02coverity#736569: fix memory leakMarkus Mohrhard 2012-12-10Replacing '__LOADONCALLAPI' with 'SAL_CALL' definitionChristos Strubulis 2012-11-06re-base on ALv2 code. Includes (at least) relevant parts of:Michael Meeks 2012-06-16Separable Gaussian Blur and Unsharpen Mask filter.Tomaž Vajngerl