ridljar/com/sun/star/lib/uno/protocols/urp/urp.java |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 14693204260bb6e19b28ea9994d81f99166ac1cd
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Nov 23 19:24:35 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Jan 7 22:01:54 2025 +0100

    cid#1557414 Unguarded read
    
    Change-Id: I4b0bd74d0841989905dd8034a9352b6d59b40dad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177189
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java 
b/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java
index 0ce9d35be75f..eec830ea3c9c 100644
--- a/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java
+++ b/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java
@@ -408,12 +408,14 @@ public final class urp implements IProtocol {
     {
         boolean internal = PROPERTIES_OID.equals(inL1Oid);
             // inL1Oid may be null in XInstanceProvider.getInstance("")
-        XCurrentContext cc =
-            (currentContext && !internal
-             && functionId != MethodDescription.ID_RELEASE)
-            ? (XCurrentContext) unmarshal.readInterface(
-                new Type(XCurrentContext.class))
-            : null;
+        XCurrentContext cc;
+        synchronized (monitor) {
+            cc = (currentContext && !internal
+                  && functionId != MethodDescription.ID_RELEASE)
+                ? (XCurrentContext) unmarshal.readInterface(
+                    new Type(XCurrentContext.class))
+                : null;
+        }
         MethodDescription desc = inL1Type.getMethodDescription(functionId);
         if (desc == null) {
             throw new IOException(

Reply via email to