From 6c16292991728f5c612caabad3f06e047de47b39 Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 12 Apr 2022 19:24:12 +0000 Subject: ripple/fossil: correctly handle the empty blob Change-Id: I6a91a998063e70ec92e8239361a37e3f8033b049 --- ripple/fossil/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ripple') 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"); } -- cgit 1.4.1