diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-29 10:08:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-29 12:33:29 +0200 |
commit | e83d52015a43c869467d584194b111c9ed6e6f82 (patch) | |
tree | 6193ddab344c2c6415b6755297ea666882215788 /vcl | |
parent | fc4881aafd70326830cd4e2b51cd09b55ea03ced (diff) |
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@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/font/fontcharmap.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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; |