Fix(sign_message): reject P1_MORE after message already finalized
final_process() frees g_msg_hash_ctx on success but leaves signMsgCtx live for the UI. A subsequent P1_MORE with length=0 bypassed the length check ((0 + N) > N is false) and re-entered final_process() with a NULL hash context, causing a null-pointer dereference. Guard against this by checking g_msg_hash_ctx != NULL before processing any further data. (cherry picked from commit 92b1930ba6f36c2983a11f902679ee7cae57ff8c)
C
Charles-Edouard de la Vergne committed
e30230c44830dd89ee51dc61deb39baf17b3780a
Parent: 1e08d85
Committed by Alexandre Paillier <alexandre.paillier@ledger.fr>
on 8/25/2026, 3:25:48 PM