From 79f901e8e6656d82e0afd6931474ec868c71bf9a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 25 Feb 2022 12:33:13 +0000 Subject: lastPoint might be 0xFFFF LIBREOFFICE-KYYAZMB9 Change-Id: Ic0d95bd39a01dc1e5e0fec83dcc2c40b3f23b747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130462 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 21ea1eacd214dbaac8d0ce7f437580d535871415) --- vcl/source/fontsubset/sft.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index fd6e6f96df10..2d2157f6f675 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -394,7 +394,7 @@ static int GetSimpleTTOutline(TrueTypeFont const *ttf, sal_uInt32 glyphID, Contr const sal_uInt8* p = ptr + nOffset; const sal_uInt32 nBytesRemaining = nTableSize - nOffset; - const sal_uInt16 palen = lastPoint+1; + const sal_uInt32 palen = lastPoint+1; //at a minimum its one byte per entry if (palen > nBytesRemaining || lastPoint > nBytesRemaining-1) -- cgit