diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 10:10:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 13:53:55 +0200 |
commit | 955e72f265697c1f6d65b7a57a3ee30106c609e1 (patch) | |
tree | 7bde21d2e974f44a09c17e7e5bcd347dd296de0d /filter | |
parent | f7115dc7efe7c9179a154bcda169cffe51c0bc21 (diff) |
ofz#3741 Integer-overflow
Change-Id: I5059eca94cde52696affbf40753b9db1061a8c2b
Reviewed-on: https://gerrit.libreoffice.org/43740
Tested-by: Jenkins <ci@libreoffice.org>
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/itiff/itiff.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 192f3deae086..7a57097b2ab3 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -1336,7 +1336,9 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) if ( nBitsPerSample == 32 ) // sj: i93300, compiler bug, 1 << 32 gives 1 one 32bit windows platforms, nMaxSampleValue = 0xffffffff; // (up from 80286 only the lower 5 bits are used when shifting a 32bit register) else - nMaxSampleValue = ( 1 << nBitsPerSample ) - 1; + { + nMaxSampleValue = (1U << nBitsPerSample) - 1; + } } if ( nPhotometricInterpretation == 2 || nPhotometricInterpretation == 5 || nPhotometricInterpretation == 6 ) nDstBitsPerPixel = 24; |