From 587c02d2554111528a8c590dad9992bb423305a5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 9 Oct 2015 14:34:30 +0100 Subject: malloc + memset(0,..) -> calloc Change-Id: Ic7c496259258bf36cd885ed68912b43117f348f0 --- vcl/source/fontsubset/ttcr.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index ba52adc46b73..0f24e25ae417 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -412,9 +412,8 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes) sal_uInt32 n; n = (nbytes + 3) & (sal_uInt32) ~3; - sal_uInt8* res = static_cast(malloc(n)); + sal_uInt8* res = static_cast(calloc(n, 1)); assert(res != 0); - memset(res, 0, n); return res; } -- cgit