We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c548723 commit 3759573Copy full SHA for 3759573
apps/common/src/main/scala/org/lfdecentralizedtrust/splice/store/S3BucketConnection.scala
@@ -49,7 +49,9 @@ class S3BucketConnection(
49
.map(_.value())
50
.getOrElse(throw new RuntimeException("Missing checksum tag"))
51
} yield {
52
- val bis = new ByteArrayInputStream(data.array())
+ val bytes = new Array[Byte](data.remaining)
53
+ data.duplicate.get(bytes)
54
+ val bis = new ByteArrayInputStream(bytes)
55
// We compare the computed & stored checksum to one we independtly compute via the system's `sha256sum` executable for sanity
56
val expectedChecksum =
57
("sha256sum" #| "awk '{print $1}'" #| "xxd -r -p" #| "base64" #< bis).!!.trim
0 commit comments