diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-02-26 12:13:41 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-02-26 12:17:22 +0100 |
commit | 24262b7cfe6607576a38e661553b56596d6164b4 (patch) | |
tree | 9c91810ff3e2362e21c89c36b6f9a27578e39c18 | |
parent | 62061df8964692c4fd14b4b5fd28b1490820c177 (diff) |
Don't abort when myPoints is empty
Change-Id: I6bbb2a1cce1c89b94d027acf94fd712706bff422
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 3e41baf82f0c..e110c1225a12 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; |