cid#1546292 DLS: Dead local store

Change-Id: Id3afb3c3541f55da5e1bff6f139c7320d6760b0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157471
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2023-10-01 19:41:13 +01:00
parent 109eab34a6
commit d96f8e8761
3 changed files with 82 additions and 0 deletions

View file

@ -19,6 +19,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,java_websocket,\
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 \
external/java_websocket/patches/0001-cid-1546292-DLS-Dead-local-store.patch \
external/java_websocket/patches/0001-cid-1545227-Dm-Dubious-method-used.patch \
))
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1,55 @@
From 695aacc67345bf1f9d311972f864751c135d4047 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:42:26 +0100
Subject: [PATCH] cid#1545227 Dm: Dubious method used
and
cid#1545310 Dm: Dubious method used
cid#1545513 Dm: Dubious method used
---
src/main/java/org/java_websocket/drafts/Draft_6455.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/java_websocket/drafts/Draft_6455.java b/src/main/java/org/java_websocket/drafts/Draft_6455.java
index f9f960d..1e08448 100644
--- a/src/main/java/org/java_websocket/drafts/Draft_6455.java
+++ b/src/main/java/org/java_websocket/drafts/Draft_6455.java
@@ -26,6 +26,7 @@
package org.java_websocket.drafts;
import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -470,7 +471,7 @@
if (log.isLoggable(Level.FINE)) {
log.fine("afterEnconding({}): {}" + " : " + framedata.getPayloadData().remaining() + " : " +
(framedata.getPayloadData().remaining() > 1000 ? "too big to display"
- : new String(framedata.getPayloadData().array())));
+ : new String(framedata.getPayloadData().array(), StandardCharsets.US_ASCII)));
}
return createByteBufferFromFramedata(framedata);
}
@@ -590,7 +591,7 @@
if (log.isLoggable(Level.FINE)) {
log.fine("afterDecoding({}): {}" + " : " + frame.getPayloadData().remaining() + " : " +
(frame.getPayloadData().remaining() > 1000 ? "too big to display"
- : new String(frame.getPayloadData().array())));
+ : new String(frame.getPayloadData().array(), StandardCharsets.US_ASCII)));
}
frame.isValid();
return frame;
@@ -838,7 +839,7 @@
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException(e);
}
- return Base64.encodeBytes(sh1.digest(acc.getBytes()));
+ return Base64.encodeBytes(sh1.digest(acc.getBytes(StandardCharsets.US_ASCII)));
}
private byte[] toByteArray(long val, int bytecount) {
--
2.41.0

View file

@ -0,0 +1,25 @@
From 01a9d917f7f595a191f67a876ee67f3276dbf7cc 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:39:22 +0100
Subject: [PATCH] cid#1546292 DLS: Dead local store
---
.../permessage_deflate/PerMessageDeflateExtension.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java b/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
index f24f9b6..9947da0 100644
--- a/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
+++ b/src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java
@@ -304,7 +304,7 @@ public class PerMessageDeflateExtension extends CompressionExtension {
}
// Holds parameters that are sent by the server, as a response to our initial extension request.
- Map<String, String> headers = extensionData.getExtensionParameters();
+ // Map<String, String> headers = extensionData.getExtensionParameters();
// After this point, parameters that the server sent back can be configured, but we don't use them for now.
return true;
}
--
2.41.0