fix: Added judgment on input address format
@@ -292,6 +292,12 @@ BOAT_RESULT BoatEthTxInit(BoatEthWallet *wallet_ptr,
return BOAT_ERROR_COMMON_INVALID_ARGUMENT;
}
+ if (!UtilityStringIsHex(recipient_str))
+ {
+ BoatLog(BOAT_LOG_CRITICAL, "The format of recipient is incorrect");
+ return BOAT_ERROR_COMMON_INVALID_ARGUMENT;
+ }
+
tx_ptr->wallet_ptr = wallet_ptr;
memset(&tx_ptr->rawtx_fields, 0x00, sizeof(tx_ptr->rawtx_fields));
