[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Wed Sep 20 13:27:24 UTC 2017
filter/source/graphicfilter/itiff/itiff.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 28dcfd26083bb2ce3174f8387b591137f6523f89
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 20 11:38:09 2017 +0100
improve scoping
Change-Id: I82e68bc00780ef37399b30f5374df4ef792546e9
Reviewed-on: https://gerrit.libreoffice.org/42540
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 65db2efaa6d9..b020fb04d3a1 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -368,8 +368,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
break;
case 0x0111: { // Strip Offset(s)
- sal_uInt64* pOldSO = pStripOffsets;
- if ( pOldSO == nullptr )
+ if (pStripOffsets == nullptr)
nNumStripOffsets = 0;
sal_uInt32 nOldNumSO = nNumStripOffsets;
nDataLen += nOldNumSO;
@@ -378,6 +377,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
if (nDataLen > nOldNumSO && nDataLen < nMaxAllocAllowed &&
(nDataLen - nOldNumSO) <= nMaxRecordsAvailable)
{
+ sal_uInt64* pOldSO = pStripOffsets;
nNumStripOffsets = nDataLen;
try
{
More information about the Libreoffice-commits
mailing list