[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 29 10:34:06 UTC 2021
vcl/source/font/fontcharmap.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e83d52015a43c869467d584194b111c9ed6e6f82
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 29 10:08:03 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 29 12:33:29 2021 +0200
cid#1209863 rearrange Untrusted loop bound
Change-Id: Ib800cc06352f6d885e9530ecee51d7152561570a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113297
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..90a08d617a86 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -110,7 +110,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
return false;
int nSubTables = GetUShort( pCmap + 2 );
- if( (nSubTables <= 0) || (nLength < (24 + 8*nSubTables)) )
+ if( (nSubTables <= 0) || (nSubTables > (nLength - 24) / 8) )
return false;
const unsigned char* pEndValidArea = pCmap + nLength;
More information about the Libreoffice-commits
mailing list