Kaydet (Commit) eb6d2732 authored tarafından Caolán McNamara's avatar Caolán McNamara

afl: divide-by-zero

Change-Id: Ided311873f654c0f40dae57c8876a6412ee97d3e
üst 6ca5cc5b
...@@ -2357,7 +2357,14 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) ...@@ -2357,7 +2357,14 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
pOS2MET->SeekRel(4); pOS2MET->SeekRel(4);
nStartIndex=ReadBigEndianWord(); nStartIndex=ReadBigEndianWord();
pOS2MET->SeekRel(3); pOS2MET->SeekRel(3);
pOS2MET->ReadUChar( nbyte ); nBytesPerCol=((sal_uInt16)nbyte) & 0x00ff; pOS2MET->ReadUChar( nbyte );
nBytesPerCol=((sal_uInt16)nbyte) & 0x00ff;
if (nBytesPerCol == 0)
{
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=4;
break;
}
nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol; nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol;
for (i=nStartIndex; i<nEndIndex; i++) { for (i=nStartIndex; i<nEndIndex; i++) {
if (nBytesPerCol > 3) pOS2MET->SeekRel(nBytesPerCol-3); if (nBytesPerCol > 3) pOS2MET->SeekRel(nBytesPerCol-3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment