[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win
Michael Stahl
mstahl at redhat.com
Mon May 16 14:53:13 UTC 2016
vcl/win/source/gdi/salgdi3.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit cdb0d792d15da3f090b8d1db15bac1cec1a84bec
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 6 00:26:39 2016 +0200
vcl: lstrcpynW actually takes length *including* null terminator
... which is surprising, but means that these arguments are too small.
(cherry picked from commit 5a7b0d2c7f3a305eb5f4eb629c0a08a256cc9ae3)
Change-Id: I9c58e7fefa30d19c701df4f04043ddb474b28986
Reviewed-on: https://gerrit.libreoffice.org/24947
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 964f25f..f755f73 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1466,7 +1466,7 @@ HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontS
&& !bImplSalCourierScalable
&& bImplSalCourierNew
&& (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) )
- lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
+ lstrcpynW( aLogFont.lfFaceName, L"Courier New", 12 );
// #i47675# limit font requests to MAXFONTHEIGHT
// TODO: share MAXFONTHEIGHT font instance
@@ -1503,7 +1503,7 @@ HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontS
{
// the selected font doesn't work => try a replacement
// TODO: use its font fallback instead
- lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
+ lstrcpynW( aLogFont.lfFaceName, L"Courier New", 12 );
aLogFont.lfPitchAndFamily = FIXED_PITCH;
HFONT hNewFont2 = CreateFontIndirectW( &aLogFont );
SelectFont( getHDC(), hNewFont2 );
More information about the Libreoffice-commits
mailing list