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

[spec] fromHexInto/fromBase64Into: fix infinite loop #48

Merged
merged 3 commits into from
Jan 28, 2024
Merged

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Jan 28, 2024

Fixes #47

I'm not 100% sure this is the right fix, but it seems to be what your polyfill is doing, and the intention.

@ljharb ljharb requested a review from bakkot January 28, 2024 21:54
Copy link
Collaborator

@bakkot bakkot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! But it's +1, not +2

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@bakkot bakkot merged commit 43885de into main Jan 28, 2024
1 check passed
@bakkot bakkot deleted the fix-loop branch January 28, 2024 22:37
@ljharb
Copy link
Member Author

ljharb commented Jan 28, 2024

ah, i assumed it's +2 because of

@bakkot
Copy link
Collaborator

bakkot commented Jan 28, 2024

That line corresponds to the one in FromHex. The behavior in the loop in this PR is handled in the polyfill by using TA.prototype.set instead of copying one byte at a time.

@ljharb
Copy link
Member Author

ljharb commented Jan 28, 2024

aha, thanks, makes sense.

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.

fromBase64Into and fromHexInto: infinite loop
2 participants