Skip to content
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

Fix infinite loop in address parsing #746

Merged
merged 7 commits into from
Dec 3, 2024
Merged

Conversation

artursapek
Copy link
Collaborator

A Backpack dev ran into a bug where he was parsing a Sui address with Ethereum as a chain by mistake, and it caused this function to call toNative infinitely.

This change maintains the fallback behavior where it tries to treat unparsed UniversalAddress values as such, but without the potential to loop infinitely.

image

image

@artursapek artursapek changed the title Get rid of try/catch that causes infinite loop Fix infinite loop in address parsing Nov 27, 2024
@artursapek artursapek force-pushed the fix-addr-infinite-loop branch from dbc0411 to 40931b5 Compare November 27, 2024 17:09
@kev1n-peters
Copy link
Collaborator

Nice fix, ran into this before

@artursapek artursapek merged commit d4b2fea into main Dec 3, 2024
1 check passed
@artursapek artursapek deleted the fix-addr-infinite-loop branch December 3, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants