diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-10 20:51:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-10 20:55:20 +0000 |
commit | d3ea20e55ca7d82b6121f7ed3db5fd170fcac94f (patch) | |
tree | 4b9fa44494c57645d9aaea7d5d98e102773b71af | |
parent | b88a5657a95e1b94498ed238e2b4e0fb0418d40b (diff) |
oss-fuzz: handle W_META_CREATEFONTINDIRECT like EMR_EXTCREATEFONTINDIRECTW
Change-Id: Iaa142d5d0ac0f00e89e8b7d7ffdef8137157cec9
(cherry picked from commit e718ac0ae415bba2988c96c36995755bbfd9df7f)
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/wmf/fail/facename-1.wmf | bin | 0 -> 4197 bytes | |||
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/wmf/fail/seek-1.wmf | bin | 0 -> 5082 bytes | |||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 3 |
3 files changed, 2 insertions, 1 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/facename-1.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/facename-1.wmf Binary files differnew file mode 100644 index 000000000000..29c534fdcc65 --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/facename-1.wmf diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/seek-1.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/seek-1.wmf Binary files differnew file mode 100644 index 000000000000..e2fac15234e1 --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/seek-1.wmf diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index a93c79a4dd5c..1544def60881 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -885,7 +885,8 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) case W_META_CREATEFONTINDIRECT: { Size aFontSize; - char lfFaceName[LF_FACESIZE]; + char lfFaceName[LF_FACESIZE+1]; + lfFaceName[LF_FACESIZE] = 0; sal_Int16 lfEscapement = 0; sal_Int16 lfOrientation = 0; sal_Int16 lfWeight = 0; |