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 90531c52abff999cfc3e2f7272cb0b24128ced02..6c5f2731e2ba0f80e56a2bf6d0f0c3a9081b03f4 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);