Off by one

This commit is contained in:
Ignotus Peverell
2019-01-08 22:43:33 +00:00
parent 5caddc01db
commit 1806ee34f5
+1 -1
View File
@@ -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);
}