diff options
Diffstat (limited to 'app-office/openoffice/files/2.2.1/itiff.diff')
-rw-r--r-- | app-office/openoffice/files/2.2.1/itiff.diff | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/app-office/openoffice/files/2.2.1/itiff.diff b/app-office/openoffice/files/2.2.1/itiff.diff new file mode 100644 index 000000000000..ab1f3a3e764f --- /dev/null +++ b/app-office/openoffice/files/2.2.1/itiff.diff @@ -0,0 +1,88 @@ +--- goodies/source/filter.vcl/itiff/itiff.cxx-old 2007-06-21 14:17:54.000000000 +0100 ++++ goodies/source/filter.vcl/itiff/itiff.cxx 2007-06-21 14:18:01.000000000 +0100 +@@ -154,7 +154,7 @@ + double ReadDoubleData(); + + void ReadHeader(); +- void ReadTagData( USHORT nTagType, ULONG nDataLen ); ++ void ReadTagData( USHORT nTagType, sal_uInt32 nDataLen ); + + BOOL ReadMap( ULONG nMinPercent, ULONG nMaxPercent ); + // Liesst/dekomprimert die Bitmap-Daten, und fuellt pMap +@@ -310,7 +310,7 @@ + + // --------------------------------------------------------------------------------- + +-void TIFFReader::ReadTagData( USHORT nTagType, ULONG nDataLen) ++void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen) + { + if ( bStatus == FALSE ) + return; +@@ -373,16 +373,25 @@ + case 0x0111: { // Strip Offset(s) + ULONG nOldNumSO, i, * pOldSO; + pOldSO = pStripOffsets; +- if ( pOldSO == NULL ) nNumStripOffsets = 0; // Sicherheitshalber ++ if ( pOldSO == NULL ) ++ nNumStripOffsets = 0; + nOldNumSO = nNumStripOffsets; +- nNumStripOffsets += nDataLen; +- pStripOffsets = new ULONG[ nNumStripOffsets ]; +- for ( i = 0; i < nOldNumSO; i++ ) +- pStripOffsets[ i ] = pOldSO[ i ] + nOrigPos; +- for ( i = nOldNumSO; i < nNumStripOffsets; i++ ) +- pStripOffsets[ i ] = ReadIntData() + nOrigPos; +- if ( pOldSO != NULL ) ++ nDataLen += nOldNumSO; ++ if ( ( nDataLen > nOldNumSO ) && ( nDataLen < SAL_MAX_UINT32 / sizeof( sal_uInt32 ) ) ) ++ { ++ nNumStripOffsets = nDataLen; ++ pStripOffsets = new ULONG[ nNumStripOffsets ]; ++ if ( !pStripOffsets ) ++ nNumStripOffsets = 0; ++ else ++ { ++ for ( i = 0; i < nOldNumSO; i++ ) ++ pStripOffsets[ i ] = pOldSO[ i ] + nOrigPos; ++ for ( i = nOldNumSO; i < nNumStripOffsets; i++ ) ++ pStripOffsets[ i ] = ReadIntData() + nOrigPos; ++ } + delete[] pOldSO; ++ } + OOODEBUG("StripOffsets (Anzahl:)",nDataLen); + break; + } +@@ -404,16 +413,25 @@ + case 0x0117: { // Strip Byte Counts + ULONG nOldNumSBC, i, * pOldSBC; + pOldSBC = pStripByteCounts; +- if ( pOldSBC == NULL ) nNumStripByteCounts = 0; // Sicherheitshalber ++ if ( pOldSBC == NULL ) ++ nNumStripByteCounts = 0; // Sicherheitshalber + nOldNumSBC = nNumStripByteCounts; +- nNumStripByteCounts += nDataLen; +- pStripByteCounts = new ULONG[ nNumStripByteCounts ]; +- for ( i = 0; i < nOldNumSBC; i++ ) +- pStripByteCounts[ i ] = pOldSBC[ i ]; +- for ( i = nOldNumSBC; i < nNumStripByteCounts; i++) +- pStripByteCounts[ i ] = ReadIntData(); +- if ( pOldSBC != NULL ) ++ nDataLen += nOldNumSBC; ++ if ( ( nDataLen > nOldNumSBC ) && ( nDataLen < SAL_MAX_UINT32 / sizeof( sal_uInt32 ) ) ) ++ { ++ nNumStripByteCounts = nDataLen; ++ pStripByteCounts = new ULONG[ nNumStripByteCounts ]; ++ if ( !nNumStripByteCounts ) ++ nNumStripByteCounts = 0; ++ else ++ { ++ for ( i = 0; i < nOldNumSBC; i++ ) ++ pStripByteCounts[ i ] = pOldSBC[ i ]; ++ for ( i = nOldNumSBC; i < nNumStripByteCounts; i++) ++ pStripByteCounts[ i ] = ReadIntData(); ++ } + delete[] pOldSBC; ++ } + OOODEBUG("StripByteCounts (Anzahl:)",nDataLen); + break; + } |