summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-01 19:31:20 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-01 21:49:02 +0200
commit060f6be53c1813209f4cdd2d39dd11b07e331ec7 (patch)
treeca32534ac1cefd764fcc8067e3e9fb07810ef206 /external
parent9150c8c09645be12849cdb5aad484ee344b7b313 (diff)
cid#1545284 UR: Uninitialized read of field in constructor
and cid#1545614 UR: Uninitialized read of field in constructor Change-Id: I7d801651951fa7243cdd106f54f6a15bdfb0e423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157470 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/java_websocket/UnpackedTarball_java_websocket.mk2
-rw-r--r--external/java_websocket/patches/0001-cid-1545614-UR-Uninitialized-read-of-field-in-constr.patch26
-rw-r--r--external/java_websocket/patches/0002-cid-1545284-UR-Uninitialized-read-of-field-in-constr.patch26
3 files changed, 54 insertions, 0 deletions
diff --git a/external/java_websocket/UnpackedTarball_java_websocket.mk b/external/java_websocket/UnpackedTarball_java_websocket.mk
index d66795511caa..be5af83c4b34 100644
--- a/external/java_websocket/UnpackedTarball_java_websocket.mk
+++ b/external/java_websocket/UnpackedTarball_java_websocket.mk
@@ -17,6 +17,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,java_websocket,\
external/java_websocket/patches/ant-build.patch \
external/java_websocket/patches/no-slf4j.patch \
external/java_websocket/patches/0001-cid-1546192-SIC-Inner-class-could-be-made-static.patch \
+ external/java_websocket/patches/0001-cid-1545614-UR-Uninitialized-read-of-field-in-constr.patch \
+ external/java_websocket/patches/0002-cid-1545284-UR-Uninitialized-read-of-field-in-constr.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/java_websocket/patches/0001-cid-1545614-UR-Uninitialized-read-of-field-in-constr.patch b/external/java_websocket/patches/0001-cid-1545614-UR-Uninitialized-read-of-field-in-constr.patch
new file mode 100644
index 000000000000..f23b3c532336
--- /dev/null
+++ b/external/java_websocket/patches/0001-cid-1545614-UR-Uninitialized-read-of-field-in-constr.patch
@@ -0,0 +1,26 @@
+From b6191d3422873648bebb322d85367647ae7d9dc0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
+Date: Sun, 1 Oct 2023 19:28:15 +0100
+Subject: [PATCH 1/2] cid#1545614 UR: Uninitialized read of field in
+ constructor
+
+---
+ src/main/java/org/java_websocket/WebSocketImpl.java | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main/java/org/java_websocket/WebSocketImpl.java b/src/main/java/org/java_websocket/WebSocketImpl.java
+index c2cd223..85fd413 100644
+--- a/src/main/java/org/java_websocket/WebSocketImpl.java
++++ b/src/main/java/org/java_websocket/WebSocketImpl.java
+@@ -205,7 +205,7 @@ public class WebSocketImpl implements WebSocket {
+ */
+ public WebSocketImpl(WebSocketListener listener, Draft draft) {
+ // socket can be null because we want do be able to create the object without already having a bound channel
+- if (listener == null || (draft == null && role == Role.SERVER)) {
++ if (listener == null) {
+ throw new IllegalArgumentException("parameters must not be null");
+ }
+ this.outQueue = new LinkedBlockingQueue<>();
+--
+2.41.0
+
diff --git a/external/java_websocket/patches/0002-cid-1545284-UR-Uninitialized-read-of-field-in-constr.patch b/external/java_websocket/patches/0002-cid-1545284-UR-Uninitialized-read-of-field-in-constr.patch
new file mode 100644
index 000000000000..a7d67172d6bc
--- /dev/null
+++ b/external/java_websocket/patches/0002-cid-1545284-UR-Uninitialized-read-of-field-in-constr.patch
@@ -0,0 +1,26 @@
+From 04fa9cea4d9d14743ff54ad5faaf7e31f081bacb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
+Date: Sun, 1 Oct 2023 19:29:27 +0100
+Subject: [PATCH 2/2] cid#1545284 UR: Uninitialized read of field in
+ constructor
+
+---
+ src/main/java/org/java_websocket/SSLSocketChannel.java | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/main/java/org/java_websocket/SSLSocketChannel.java b/src/main/java/org/java_websocket/SSLSocketChannel.java
+index b402450..760f643 100644
+--- a/src/main/java/org/java_websocket/SSLSocketChannel.java
++++ b/src/main/java/org/java_websocket/SSLSocketChannel.java
+@@ -130,7 +130,7 @@ public class SSLSocketChannel implements WrappedByteChannel, ByteChannel, ISSLCh
+
+ public SSLSocketChannel(SocketChannel inputSocketChannel, SSLEngine inputEngine,
+ ExecutorService inputExecutor, SelectionKey key) throws IOException {
+- if (inputSocketChannel == null || inputEngine == null || executor == inputExecutor) {
++ if (inputSocketChannel == null || inputEngine == null || executor == null) {
+ throw new IllegalArgumentException("parameter must not be null");
+ }
+
+--
+2.41.0
+