[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/source

Lionel Elie Mamane lionel at mamane.lu
Tue Feb 26 03:52:21 PST 2013


 vcl/source/fontsubset/sft.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e99ba6c7ed32b97112df174c8986ca2ced919f68
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Tue Feb 26 12:13:41 2013 +0100

    Don't abort when myPoints is empty
    
    Change-Id: I6bbb2a1cce1c89b94d027acf94fd712706bff422
    Reviewed-on: https://gerrit.libreoffice.org/2425
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Tested-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 3e41baf..e110c12 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -752,7 +752,8 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
     pa = (ControlPoint*)calloc(np, sizeof(ControlPoint));
     assert(pa != 0);
 
-    memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
+    if (np > 0)
+        memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
 
     *pointArray = pa;
     return np;


More information about the Libreoffice-commits mailing list