Skip to content

Conversation

@josieang
Copy link

@josieang josieang commented Apr 9, 2025

The NewReader method in reader.go doesn't check that the magic header is correct, this leads to some strange things, like ascii text files being parsed without any error.

This change is a suggestion to add a NewStrictReader which checks for the magic header.

josieang added 3 commits April 9, 2025 11:31
This strict reader checks that the magic header is correct.
I've observed this happening.
chrisnovakovic added a commit to chrisnovakovic/ar that referenced this pull request Oct 8, 2025
…h#14)

The GNU variant of the ar format expects all real file names to have
trailing slashes, regardless of whether they are stored in the string
table or in the file name header field.
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.

1 participant