From 1806ee34f5beba7ba9511e640fd7bc1e83075970 Mon Sep 17 00:00:00 2001 From: Ignotus Peverell Date: Tue, 8 Jan 2019 22:43:33 +0000 Subject: [PATCH] Off by one --- core/src/pow/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/pow/types.rs b/core/src/pow/types.rs index 51e059dd..6d71a321 100644 --- a/core/src/pow/types.rs +++ b/core/src/pow/types.rs @@ -416,7 +416,7 @@ impl Readable for Proof { // check the last bits of the last byte are zeroed, we don't use them but // still better to enforce to avoid any malleability - for n in (bits_len+1)..(bytes_len*8) { + for n in bits_len..(bytes_len * 8) { if bitvec.bit_at(n) { return Err(ser::Error::CorruptedData); }