diff options
-rw-r--r-- | oox/source/ole/vbainputstream.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/ole/vbainputstream.cxx b/oox/source/ole/vbainputstream.cxx index 65eb91c12e37..e3c545231e73 100644 --- a/oox/source/ole/vbainputstream.cxx +++ b/oox/source/ole/vbainputstream.cxx @@ -157,7 +157,7 @@ bool VbaInputStream::updateChunk() sal_uInt16 nCopyToken = mpInStrm->readuInt16(); nChunkPos = nChunkPos + 2; // update bit count used for offset/length in the token - while( static_cast< size_t >( 1 << nBitCount ) < maChunk.size() ) ++nBitCount; + while( ((static_cast<size_t>(1)) << nBitCount ) < maChunk.size() ) ++nBitCount; // extract length from lower (16-nBitCount) bits, plus 3 sal_uInt16 nLength = extractValue< sal_uInt16 >( nCopyToken, 0, 16 - nBitCount ) + 3; // extract offset from high nBitCount bits, plus 1 diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 01060abb3a26..e45df548b94a 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -248,7 +248,7 @@ bool GIFReader::ReadGlobalHeader() bGlobalPalette = ( nRF & 0x80 ); if( bGlobalPalette ) - ReadPaletteEntries( &aGPalette, 1 << ( ( nRF & 7 ) + 1 ) ); + ReadPaletteEntries( &aGPalette, 1UL << ( ( nRF & 7 ) + 1 ) ); else nBackgroundColor = 0; @@ -459,7 +459,7 @@ bool GIFReader::ReadLocalHeader() if( nFlags & 0x80 ) { pPal = &aLPalette; - ReadPaletteEntries( pPal, 1 << ( (nFlags & 7 ) + 1 ) ); + ReadPaletteEntries( pPal, 1UL << ( (nFlags & 7 ) + 1 ) ); } else pPal = &aGPalette; |