Skip to content

Commit

Permalink
Restrict rlp formats when decoding transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Jun 4, 2024
1 parent 9aa30b3 commit df09b01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/evm_runtime/transaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct transaction {
eosio::check(rlptx_.has_value(), "no rlptx");
ByteView bv{(const uint8_t*)rlptx_->data(), rlptx_->size()};
silkworm::Transaction tmp;
eosio::check(silkworm::rlp::decode_transaction(bv, tmp, silkworm::rlp::Eip2718Wrapping::kBoth) && bv.empty(), "unable to decode transaction");
eosio::check(silkworm::rlp::decode_transaction(bv, tmp, silkworm::rlp::Eip2718Wrapping::kNone) && bv.empty(), "unable to decode transaction");
tx_.emplace(tmp);
}
return tx_.value();
Expand All @@ -50,4 +50,4 @@ struct transaction {
mutable std::optional<silkworm::Transaction> tx_;
};

} //namespace evm_runtime
} //namespace evm_runtime

0 comments on commit df09b01

Please sign in to comment.