[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 1 19:30:23 UTC 2019


 vcl/source/font/font.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 56fe42d53a2ac7a1b9c0e4778383d8af25d5eae3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Nov 1 17:09:36 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Nov 1 20:29:34 2019 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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 );
             }
 


More information about the Libreoffice-commits mailing list