diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-22 08:22:47 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-07-22 08:46:25 +0000 |
commit | 191e3809f5d62392bf98b940ad8f6937ae5ee6c6 (patch) | |
tree | 3947ae540c3921c3b93fe1a5beccabe0ef19e203 | |
parent | 7524dd59efc9b685548caf7967b24f7758796078 (diff) |
Related: tdf#101057 allow java update version number > 99
Change-Id: Icc37cf248fbf35f108eb5bbb25c36fbd54a9fe85
(cherry picked from commit 64d3270a89fd88d4d0cf70329af2c66f722fd95e)
Reviewed-on: https://gerrit.libreoffice.org/27425
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 47874405b731..b4ad7019d449 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); |