From 8bae73c7d25fec7e243cb31dd9150e0fa6a5db23 Mon Sep 17 00:00:00 2001 From: zfeixiang Date: Tue, 16 Jul 2024 11:07:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9so=E6=96=87=E4=BB=B6=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E7=AD=89=E4=BA=8E4096=E6=97=B6=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E7=94=9F=E6=88=90rootHash=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zfeixiang --- .../hapsigntool/codesigning/fsverity/MerkleTreeBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/MerkleTreeBuilder.java b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/MerkleTreeBuilder.java index 90531c52..6c5f2731 100644 --- a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/MerkleTreeBuilder.java +++ b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/MerkleTreeBuilder.java @@ -306,7 +306,7 @@ public class MerkleTreeBuilder implements AutoCloseable { dataBuffer.flip(); byte[] rootHash = null; byte[] tree = null; - if (inputDataSize < FSVERITY_HASH_PAGE_SIZE) { + if (inputDataSize <= FSVERITY_HASH_PAGE_SIZE) { ByteBuffer fsVerityHashPageBuffer = slice(dataBuffer, 0, digestSize); rootHash = new byte[digestSize]; fsVerityHashPageBuffer.get(rootHash); -- Gitee