summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-16 14:02:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-16 14:03:07 +0000
commit9e77785b6fcf5aed2a51b7cbbe1ccd5f5e266851 (patch)
tree6927a637dcf3ed5af39161da34ffac96e0400734 /vcl
parent9a831ada3f57619c4ef0ee24b2dc30e2ac7784c9 (diff)
ofz#880 timeout loading svm
Change-Id: I8b19a66a7cb8d4eda3774ddc32a43e8653e1c6a0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/svmconverter.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 72efcfa7722c..55e1faf5b7c1 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -1034,7 +1034,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, nIndex, nLen ) );
}
- rIStm.Seek( nActBegin + nActionSize );
+
+ if (nActionSize < 28)
+ rIStm.SetError(SVSTREAM_FILEFORMAT_ERROR);
+ else
+ rIStm.Seek(nActBegin + nActionSize);
}
break;