vcl/source/gdi/svmconverter.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 5155267e64d796c7920d64b697eeccefc68240f7 Author: Caolán McNamara <[email protected]> Date: Wed Jan 18 09:03:23 2017 +0000 ofz#419 same problem as wmf and emf this is the *third* effective copy of this, see the other two uses of LF_FACESIZE in wmf parsing Change-Id: I475b18314784ad072fe58730c361fc5ca6e65819 Reviewed-on: https://gerrit.libreoffice.org/33254 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 6b6bc65..c1161a4 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -491,6 +491,8 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uLong nConver } } +#define LF_FACESIZE 32 + void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) { const sal_uLong nPos = rIStm.Tell(); @@ -855,11 +857,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case GDI_FONT_ACTION: { vcl::Font aFont; - char aName[ 32 ]; + char aName[LF_FACESIZE+1]; ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor ); - rIStm.ReadBytes( aName, 32 ); + size_t nRet = rIStm.ReadBytes(aName, LF_FACESIZE); + aName[nRet] = 0; aFont.SetFamilyName( OUString( aName, strlen(aName), rIStm.GetStreamCharSet() ) ); sal_Int32 nWidth(0), nHeight(0);
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
