Skip to content

Fix infinite loop in ASF parser on malformed input (v16 backport) - #792

Closed
mhassan1 wants to merge 1 commit into
sindresorhus:16from
mhassan1:16-asf-loop
Closed

Fix infinite loop in ASF parser on malformed input (v16 backport)#792
mhassan1 wants to merge 1 commit into
sindresorhus:16from
mhassan1:16-asf-loop

Conversation

@mhassan1

Copy link
Copy Markdown

This PR backports 319abf8 to the 16 branch.

A crafted ASF file with a zero-size sub-header would cause `tokenizer.ignore()` to move the position backwards, creating an infinite loop that starves the event loop.
@Borewit

Borewit commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

It does not make sense to update such an old version, just switch to the ESM version.

@mhassan1

Copy link
Copy Markdown
Author

It does not make sense to update such an old version, just switch to the ESM version.

That isn't possible for everyone, unfortunately (v16 still has 5m downloads/week, about 15% of the total), but if that's the official stance, we can close this.

@sindresorhus

Copy link
Copy Markdown
Owner

There will always be projects that don't upgrade to any major version.

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.

3 participants