diff --git a/src/main.c b/src/main.c index e10d779d..3729e88f 100644 --- a/src/main.c +++ b/src/main.c @@ -48,8 +48,10 @@ void handleApdu(volatile unsigned int *flags, volatile unsigned int *tx, int rx) const int ret = apdu_handle_message(G_io_apdu_buffer, rx, &G_command); if (ret != 0) { + MEMCLEAR(G_command); THROW(ret); } + if (G_command.state == ApduStatePayloadInProgress) { THROW(ApduReplySuccess); } diff --git a/src/signMessage.c b/src/signMessage.c index 282a636f..03ba82db 100644 --- a/src/signMessage.c +++ b/src/signMessage.c @@ -143,8 +143,8 @@ void handle_sign_message_parse_message(volatile unsigned int *tx) { if ((G_command.non_confirm || G_called_from_swap) && !(G_command.non_confirm && G_called_from_swap)) { - // Blind sign requested NOT in swap context - // Or no blind sign requested while in swap context + // User validation bypass requested NOT in swap context + // Or user validation requested while in swap context THROW(ApduReplySdkNotSupported); }