[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 27 11:13:43 UTC 2021
vcl/source/font/fontcharmap.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit b2a782b7258715c8e677adb8902b603a825f24e4
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 26 17:22:14 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Mar 27 12:13:05 2021 +0100
cid#1209863 silence Untrusted loop bound, it *is* tested here
Change-Id: Ie7e1bc3d8cfa8029569259487ea8f8a0d1b6245b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113173
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index e68939d3885e..ac4336137735 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -23,6 +23,7 @@
#include <algorithm>
#include <vector>
+#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
CmapResult::CmapResult( bool bSymbolic,
@@ -112,6 +113,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
int nSubTables = GetUShort( pCmap + 2 );
if( (nSubTables <= 0) || (nLength < (24 + 8*nSubTables)) )
return false;
+ nSubTables = o3tl::deem_sanitized(nSubTables);
const unsigned char* pEndValidArea = pCmap + nLength;
More information about the Libreoffice-commits
mailing list