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

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Sat Jul 11 07:53:27 PDT 2015


 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1b4d27a3badddd2648c3f02cd234ca74c5a40e6b
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Jul 11 02:03:01 2015 +0200

    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 at ostrovsky.org>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index a19b26a..c7a273c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -588,7 +588,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;


More information about the Libreoffice-commits mailing list