[Libreoffice-commits] core.git: jvmfwk/plugins

Caolán McNamara caolanm at redhat.com
Fri Jul 22 07:23:47 UTC 2016


 jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 64d3270a89fd88d4d0cf70329af2c66f722fd95e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 22 08:22:47 2016 +0100

    Related: tdf#101057 allow java update version number > 99
    
    Change-Id: Icc37cf248fbf35f108eb5bbb25c36fbd54a9fe85

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 4787440..b4ad701 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -135,9 +135,9 @@ bool SunVersion::init(const char *szVersion)
             {
                 if ( ! isdigit(*pCur))
                 {
-                    //1.4.1_01-, 1.4.1_01a, the numerical part may only be 2 chars.
-                    int len = pCur - pLast;
-                    if (len > 2)
+                    //1.8.0_102-, 1.8.0_01a,
+                    size_t len = pCur - pLast;
+                    if (len > sizeof(buf) - 1)
                         return false;
                     //we've got the update: 01, 02 etc
                     strncpy(buf, pLast, len);


More information about the Libreoffice-commits mailing list