Skip to content

Commit 3759573

Browse files
committed
[ci] fix
Signed-off-by: Itai Segall <itai.segall@digitalasset.com>
1 parent c548723 commit 3759573

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/common/src/main/scala/org/lfdecentralizedtrust/splice/store/S3BucketConnection.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ class S3BucketConnection(
4949
.map(_.value())
5050
.getOrElse(throw new RuntimeException("Missing checksum tag"))
5151
} yield {
52-
val bis = new ByteArrayInputStream(data.array())
52+
val bytes = new Array[Byte](data.remaining)
53+
data.duplicate.get(bytes)
54+
val bis = new ByteArrayInputStream(bytes)
5355
// We compare the computed & stored checksum to one we independtly compute via the system's `sha256sum` executable for sanity
5456
val expectedChecksum =
5557
("sha256sum" #| "awk '{print $1}'" #| "xxd -r -p" #| "base64" #< bis).!!.trim

0 commit comments

Comments
 (0)