-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing state->address_step=3;
in michelson_read_address
?
#160
Comments
Thanks for opening this issue, this is indeed a bug! Did you encounter this while attempting an operation with a Michelson address in binary format or were you inspecting code? The reason I ask - As we think about the best solution for this, if the code is dead in practice since only ASCII is used, the best solution could be to remove it and avoid the unnecessary feature (and the testing challenges that come from not being able to create binary formatted addresses from tezos-client). Additional feedback on how you encountered this will help us make the right decision here. This will most likely be done as part of a batch of changes, whenever that may be. Thanks again! |
Thanks for your quick reply! I am working on a fuzzing+code coverage tool and wanted to test it on some Ledger Nano applications. I found this bug while investigating why some lines of code appeared to never be reached according to the code coverage report. So I do not know whether a real Tezos transaction runs the buggy code path. |
tz1dk5tsD3vr1ib7XY2CULdWa81vMBbVbjDj |
Hello,
While reading the state machine in
src/operations.c
I am wondering how this code works:ledger-app-tezos/src/operations.c
Lines 199 to 213 in 58797b2
More precisely after
case 0: ... state->address_step=1;
andcase 1: ... state->address_step=2;
, why is there nostate->address_step=3;
on line 209, at the end ofcase 2:
? The case block "falls through" intocase 3
and then the function returns inCALL_SUBPARSER
(line 212). When I add someprintf
statements in this function to analyze where the flow goes, it seems that the "subparsing" goes back to line 207 instead of line 212 and that the code in lines 213-215 is never executed. Did I understand the code correctly or did I miss something?The text was updated successfully, but these errors were encountered: