[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 9 10:26:21 PST 2015
vcl/source/filter/wmf/enhwmf.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 9e283042477521416af2fc641c1843078d322480
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 9 14:55:35 2015 +0000
asan: stack-buffer-overflow with fdo76216-1.doc
Change-Id: Ica5ebb04ec50c6579f71d1152ae7619dd37b879e
(cherry picked from commit 8f43132c4d68dd2a1af7a4d1088413c2a0064902)
Reviewed-on: https://gerrit.libreoffice.org/13833
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 4047093..e990030 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1235,13 +1235,13 @@ bool EnhWMFReader::ReadEnhWMF()
.ReadUChar( aLogFont.lfQuality )
.ReadUChar( aLogFont.lfPitchAndFamily );
- sal_Unicode lfFaceName[ LF_FACESIZE ];
-
- for ( int i = 0; i < LF_FACESIZE; i++ )
+ sal_Unicode lfFaceName[LF_FACESIZE+1];
+ lfFaceName[LF_FACESIZE] = 0;
+ for (int i = 0; i < LF_FACESIZE; ++i)
{
- sal_uInt16 nChar;
- pWMF->ReadUInt16( nChar );
- lfFaceName[ i ] = nChar;
+ sal_uInt16 nChar(0);
+ pWMF->ReadUInt16(nChar);
+ lfFaceName[i] = nChar;
}
aLogFont.alfFaceName = OUString( lfFaceName );
More information about the Libreoffice-commits
mailing list