What changed, and why it matters
This commit fixes a merge conflict in a firmware file for the Keystone 3 hardware wallet. The change adds a missing memory cleanup function (FreeTrxMemory) and restores a missing user-interface entry for TRX swap transactions. Without the cleanup function, memory used during transaction review might not be released, which could contribute to memory leaks or instability over time. The missing UI entry could have caused the TRX swap screen to be absent or misaligned. There is no direct evidence in the commit of an exploitable security vulnerability such as theft of funds or bypass of confirmation.
Treat as a routine bug-fix commit. Review whether the missing FreeTrxMemory caused observable memory leaks during TRX personal-message signing, and verify the restored REMAPVIEW_TRX_SWAP view renders correctly and does not introduce UI state inconsistencies. No urgent security response is indicated by this diff alone.
Security signals we found
Memory cleanup function added (FreeTrxMemory) — possible memory leak mitigation
Missing UI view restored (REMAPVIEW_TRX_SWAP) — possible UI/UX regression fix
Commit title describes the change as a merge-conflict bug fix, not a security fix
Evidence from the diff
The patch modifies src/ui/gui_analyze/multi/web3/gui_general_analyze.h. It inserts FreeTrxMemory into a struct initializer that previously lacked it, and adds a new struct element REMAPVIEW_TRX_SWAP that appears to have been dropped during a merge conflict. The surrounding code is UI JSON layout definitions and function pointers for Tron (TRX) transaction review screens. The fix is structural/corrective rather than a clear security patch. No buffer overflow, injection, or cryptographic flaw is visible in the diff.
Changed components
src/ui/gui_analyze/multi/web3/gui_general_analyze.hTron (TRX) transaction review UITRX personal message and swap viewsInspect captured patch +3 / −0
diff --git a/src/ui/gui_analyze/multi/web3/gui_general_analyze.h b/src/ui/gui_analyze/multi/web3/gui_general_analyze.h
index 96b3535..a997421 100644
--- a/src/ui/gui_analyze/multi/web3/gui_general_analyze.h
+++ b/src/ui/gui_analyze/multi/web3/gui_general_analyze.h
@@ -37,6 +37,9 @@
"{\"table\":{\"utf8_message\":{\"type\":\"container\",\"pos\":[0,39],\"size\":[408,500],\"align\":2,\"bg_color\":16777215,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"exist_func\":\"GetTrxMessageFromExist\",\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxMessageFrom\",\"pos\":[24,54],\"text_width\":360,\"exist_func\":\"GetTrxMessageFromExist\",\"font\":\"openSansEnIllustrate\"},{\"type\":\"custom_container\",\"bg_color\":0,\"bg_opa\":0,\"exist_func\":\"GetTrxMessageFromNotExist\",\"pos\":[0,0],\"custom_show_func\":\"GuiCustomPathNotice\"},{\"type\":\"label\",\"text\":\"Message\",\"pos_func\":\"GetTrxMessagePos\",\"align_to\":-2,\"align\":13,\"text_color\":16777215,\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"container\",\"size\":[360,332],\"pos\":[0,11],\"align_to\":-2,\"align\":13,\"aflag\":16,\"bg_opa\":0,\"children\":[{\"type\":\"label\",\"text_func\":\"GetTrxMessageUtf8\",\"pos\":[0,0],\"text_width\":360,\"font\":\"openSansEnIllustrate\",\"text_color\":16777215}]}]},\"raw_message\":{\"type\":\"container\",\"pos\":[0,39],\"size\":[408,500],\"align\":2,\"bg_color\":16777215,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Raw Message\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"container\",\"pos\":[24,54],\"size\":[360,450],\"align\":1,\"aflag\":16,\"bg_opa\":0,\"children\":[{\"type\":\"label\",\"text_func\":\"GetTrxMessageRaw\",\"pos\":[0,0],\"text_width\":360,\"font\":\"illustrate\"}]}]}}}", \
GuiGetTrxPersonalMessage,\
GetTrxPersonalMessageType,\
+ FreeTrxMemory,\
+ },\
+ {\
REMAPVIEW_TRX_SWAP,\
"{\"name\":\"trx_swap_page\",\"type\":\"tabview\",\"pos\":[36,0],\"size\":[408,900],\"bg_color\":0,\"children\":[{\"type\":\"tabview_child\",\"index\":1,\"tab_name\":\"Overview\",\"font\":\"openSansEnIllustrate\",\"children\":[{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,190],\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Swap\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxValue\",\"pos\":[24,50],\"text_color\":16090890,\"font\":\"openSansEnLittleTitle\"},{\"type\":\"label\",\"text\":\"To\",\"pos\":[24,110],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxSwapDstAsset\",\"pos\":[24,144],\"text_color\":16090890,\"font\":\"openSansEnLittleTitle\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Network\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxNetwork\",\"pos\":[120,16],\"font\":\"openSansEnIllustrate\",\"text_color\":16777215}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,146],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxFromAddress\",\"text_width\":330,\"pos\":[24,54],\"font\":\"openSansEnIllustrate\",\"text_line_space\":8}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,146],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Destination\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxSwapDstAddress\",\"text_width\":330,\"pos\":[24,54],\"font\":\"openSansEnIllustrate\",\"text_line_space\":8}]}]},{\"type\":\"tabview_child\",\"index\":2,\"tab_name\":\"Details\",\"font\":\"openSansEnIllustrate\",\"children\":[{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,62],\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Network\",\"pos\":[24,16],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxNetwork\",\"pos\":[114,16],\"text_color\":16777215}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Method\",\"pos\":[24,16],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxMethod\",\"pos\":[114,16],\"text_color\":16777215}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,320],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxFromAddress\",\"text_width\":360,\"pos\":[24,54],\"text_line_space\":4},{\"type\":\"label\",\"text\":\"To\",\"pos\":[24,130],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxToAddress\",\"text_width\":360,\"pos\":[24,168],\"text_line_space\":4},{\"type\":\"container\",\"name\":\"v_btn\",\"pos\":[24,230],\"size\":[360,45],\"bg_opa\":0,\"cb\":\"TrxCheckVault\",\"children\":[{\"type\":\"label\",\"text\":\"Check the Vault Address\",\"pos\":[0,0],\"text_color\":1827014,\"text_decor\":1},{\"type\":\"img\",\"img_src\":\"imgQrcodeTurquoise\",\"pos\":[255,2]}]}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,106],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"exist_func\":\"GetTrxContractExist\",\"children\":[{\"type\":\"label\",\"text\":\"Contract Address\",\"pos\":[24,16],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxContract\",\"text_width\":360,\"pos\":[24,54]}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,340],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Amount\",\"pos\":[24,16],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxValueRaw\",\"pos\":[24,50]},{\"type\":\"label\",\"text\":\"Memo\",\"pos\":[24,100],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxMemo\",\"text_width\":360,\"pos\":[24,134],\"text_line_space\":4},{\"type\":\"label\",\"text\":\"Expiration\",\"pos\":[24,250],\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetTrxExpiration\",\"pos\":[24,284]}]}]}]}",\
GuiGetTrxData,\
Why this scored 25/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.