Skip to content

Commit

Permalink
core: fix decoding account from E3 encoded storage (#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat authored Aug 21, 2024
1 parent 9aace13 commit d801290
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions silkworm/core/types/account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ tl::expected<Account, DecodingError> Account::from_encoded_storage_v3(ByteView e
intx::unreachable();
}
pos += len;
if (pos >= encoded_payload.length() && i < 3) {
return tl::unexpected{DecodingError::kInputTooShort};
}
}

return a;
Expand Down

0 comments on commit d801290

Please sign in to comment.