diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-01 17:09:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-01 20:29:34 +0100 |
commit | 56fe42d53a2ac7a1b9c0e4778383d8af25d5eae3 (patch) | |
tree | 43107ebf844d6e2497de83469d2d9e49bd4419b3 /vcl/source/font/font.cxx | |
parent | dc144f115eb2ef0945837d66fd5ebb1e5a1fa2eb (diff) |
ofz#18660 don't parse past end
Change-Id: I3d18202ec637c0231dcf71f2d02c79fab0dc7403
Reviewed-on: https://gerrit.libreoffice.org/81906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/font/font.cxx')
-rw-r--r-- | vcl/source/font/font.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 81f5c85382ca..4db757cd7532 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -589,7 +589,8 @@ namespace const char* pItalicPos = std::search( pStream, pExecPos, pItalic, pItalic+12 ); if( pItalicPos != pExecPos ) { - sal_Int32 nItalic = rtl_str_toInt32( pItalicPos+12, 10 ); + const char* pItalicEnd = pItalicPos + 12; + auto nItalic = rtl_str_toInt64_WithLength(pItalicEnd, 10, pExecPos - pItalicEnd); o_rResult.SetItalic( (nItalic != 0) ? ITALIC_NORMAL : ITALIC_NONE ); } |