vcl/source/fontsubset/sft.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 50600039f858f86a821bb59b4270d96010b4f779 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Feb 25 12:33:13 2022 +0000 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Mar 1 18:40:34 2022 +0100 lastPoint might be 0xFFFF LIBREOFFICE-KYYAZMB9 Change-Id: Ic0d95bd39a01dc1e5e0fec83dcc2c40b3f23b747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130461 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index bdc7e8208793..de691ad715c1 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -379,7 +379,7 @@ static int GetSimpleTTOutline(AbstractTrueTypeFont const *ttf, sal_uInt32 glyphI 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)