diff options
author | edef <edef@unfathomable.blue> | 2022-04-12 19:24:12 +0000 |
---|---|---|
committer | edef <edef@unfathomable.blue> | 2022-04-12 20:02:38 +0000 |
commit | 6c16292991728f5c612caabad3f06e047de47b39 (patch) | |
tree | f3ef504c8f12353b5c62220f21d749e8515efecc /ripple/fossil/src | |
parent | fec77c4fa95f9c4684796c3b4e60bddaaa128fd2 (diff) | |
download | unf-legacy-6c16292991728f5c612caabad3f06e047de47b39.tar.zst |
ripple/fossil: correctly handle the empty blob
Change-Id: I6a91a998063e70ec92e8239361a37e3f8033b049
Diffstat (limited to 'ripple/fossil/src')
-rw-r--r-- | ripple/fossil/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ripple/fossil/src/lib.rs b/ripple/fossil/src/lib.rs index 008240a..6576847 100644 --- a/ripple/fossil/src/lib.rs +++ b/ripple/fossil/src/lib.rs @@ -108,11 +108,10 @@ impl Store { buffer.extend_from_slice(&chunk); } - if buffer.is_empty() { - panic!("blob not found"); - } - if h.finalize() != r#ref { + if buffer.is_empty() { + panic!("blob not found"); + } panic!("hash mismatch"); } |