summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-07-11 02:03:01 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-13 10:44:17 +0000
commit444e9e16524af54d67f6131bba96f2faaa66b078 (patch)
tree70f57a5df3c482582c1701912ed4b4bfa40147b3
parentbf466946fd3d434aac4d2e9f284fa28b773358f2 (diff)
tdf#92483 fix initializing JRE on Win 64bit (load java's msvcr100.dll)
problem is that the offsets/sizes are of different type than ptrdiff_t, and when using without casting, the resulting address is way off... Change-Id: I7b1cdd611c8c4b317cd33ca8fbbda2e7e8f5f4fc Reviewed-on: https://gerrit.libreoffice.org/16938 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1b4d27a3badddd2648c3f02cd234ca74c5a40e6b) Reviewed-on: https://gerrit.libreoffice.org/16950 (cherry picked from commit 14bc2d237813b208a176cacece3a27a32145d3b4) Reviewed-on: https://gerrit.libreoffice.org/16956 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 72e17d30822a..000797528daf 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -591,7 +591,7 @@ static void do_msvcr_magic(rtl_uString *jvm_dll)
if (sections->VirtualAddress <= importsVA &&
importsVA < sections->VirtualAddress + sections->SizeOfRawData)
{
- VAtoPhys = sections->PointerToRawData - sections->VirtualAddress;
+ VAtoPhys = static_cast<size_t>(sections->PointerToRawData) - static_cast<size_t>(sections->VirtualAddress);
break;
}
++sections;