vcl/source/fontsubset/sft.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 04edde93cb22da676cf2e8473012742b63cebe55 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Mar 22 11:30:32 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Mar 22 16:16:48 2021 +0100 cid#1474183 Untrusted allocation size instead of allocating a block of zeros, flag via the vector as empty to return zero Change-Id: Ia68b037bb1600ba73f4ea5dcc8892650bede34a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112884 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 61ff497cbde4..65cc77f3ba4b 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1160,6 +1160,8 @@ void CloseTTFont(TrueTypeFont* ttf) { delete ttf; } sal_uInt32 AbstractTrueTypeFont::glyphOffset(sal_uInt32 glyphID) const { + if (m_aGlyphOffsets.empty()) // the O_CFF and Bitmap cases + return 0; return m_aGlyphOffsets[glyphID]; } @@ -1200,13 +1202,11 @@ SFErrCodes AbstractTrueTypeFont::indexGlyphData() m_nGlyphs = k; m_aGlyphOffsets.clear(); - m_aGlyphOffsets.resize(m_nGlyphs + 1, 0); /* TODO: implement to get subsetting */ } else { // Bitmap font, accept for now. m_aGlyphOffsets.clear(); - m_aGlyphOffsets.resize(m_nGlyphs + 1, 0); /* TODO: implement to get subsetting */ } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits