summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-22 08:22:47 +0100
committerTor Lillqvist <tml@collabora.com>2016-08-02 16:46:50 +0300
commitc07d83c4655e83758d4ca9a6555595cda0ba7b9a (patch)
tree7e453b69fbecece2d9efe1f550078829cd7a909c
parentResolves: tdf#101054 crash on options->path with non-native file picker (diff)
downloadcore-c07d83c4655e83758d4ca9a6555595cda0ba7b9a.tar.gz
core-c07d83c4655e83758d4ca9a6555595cda0ba7b9a.zip
Related: tdf#101057 allow java update version number > 99
Change-Id: Icc37cf248fbf35f108eb5bbb25c36fbd54a9fe85 (cherry picked from commit 64d3270a89fd88d4d0cf70329af2c66f722fd95e) Reviewed-on: https://gerrit.libreoffice.org/27426 Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 16d60f0632ea16ac5ad8dae2a3781195fef50d9d)
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx6
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);