From e7277e259129ff0569e84ad2ddfa27d6bac9072a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Vejpustek?= Date: Thu, 21 Nov 2024 18:35:25 +0100 Subject: [PATCH] fixup! feat(legacy): do not support sortedmulti on legacy --- legacy/firmware/transaction.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/legacy/firmware/transaction.c b/legacy/firmware/transaction.c index ab06361b86..004543f24e 100644 --- a/legacy/firmware/transaction.c +++ b/legacy/firmware/transaction.c @@ -364,6 +364,11 @@ uint32_t compile_script_sig(uint32_t address_type, const uint8_t *pubkeyhash, uint32_t compile_script_multisig(const CoinInfo *coin, const MultisigRedeemScriptType *multisig, uint8_t *out) { + if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) { + fsm_sendFailure(FailureType_Failure_DataError, + _("Sortedmulti is not supported")); + return 0; + } const uint32_t m = multisig->m; const uint32_t n = cryptoMultisigPubkeyCount(multisig); if (m < 1 || m > 15) return 0; @@ -397,6 +402,7 @@ uint32_t compile_script_multisig_hash(const CoinInfo *coin, if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) { fsm_sendFailure(FailureType_Failure_DataError, _("Sortedmulti is not supported")); + return 0; } const uint32_t m = multisig->m; @@ -447,6 +453,7 @@ uint32_t serialize_script_multisig(const CoinInfo *coin, if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) { fsm_sendFailure(FailureType_Failure_DataError, _("Sortedmulti is not supported")); + return 0; } uint32_t r = 0; #if !BITCOIN_ONLY