Skip to content

Commit

Permalink
fix: read of a uninitialized value in tx_info handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
bboilot-ledger committed Dec 27, 2024
1 parent f86eb28 commit 71be65d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src_features/generic_tx_parser/gtp_tx_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static bool handle_version(const s_tlv_data *data, s_tx_info_ctx *context) {

static bool handle_chain_id(const s_tlv_data *data, s_tx_info_ctx *context) {
uint64_t chain_id;
uint8_t buf[sizeof(chain_id)];
uint8_t buf[sizeof(chain_id)] = {0};

if (data->length > sizeof(buf)) {
return false;
Expand Down Expand Up @@ -165,7 +165,7 @@ static bool handle_contract_name(const s_tlv_data *data, s_tx_info_ctx *context)
}

static bool handle_deploy_date(const s_tlv_data *data, s_tx_info_ctx *context) {
uint8_t buf[sizeof(uint32_t)];
uint8_t buf[sizeof(uint32_t)] = {0};
time_t timestamp;

if (data->length > sizeof(buf)) {
Expand Down

0 comments on commit 71be65d

Please sign in to comment.