vcl/source/fontsubset/sft.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit e99ba6c7ed32b97112df174c8986ca2ced919f68 Author: Lionel Elie Mamane <lio...@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.me...@suse.com> Tested-by: Michael Meeks <michael.me...@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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits