Skip to content

lib: Accept signed BSD-style checksums in verify_checksum#27

Merged
cgwalters merged 1 commit into
composefs:mainfrom
cgwalters:compat-fixes
May 18, 2026
Merged

lib: Accept signed BSD-style checksums in verify_checksum#27
cgwalters merged 1 commit into
composefs:mainfrom
cgwalters:compat-fixes

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

Historical BSD tar wrote checksums using signed byte arithmetic (bytes

= 128 treated as negative i8 values), while POSIX standardized unsigned
arithmetic. GNU tar, Python tarfile, Go archive/tar, and libarchive all accept both forms, let's do the same.

Assisted-by: OpenCode (claude-sonnet-4-6@default)

Historical BSD tar wrote checksums using signed byte arithmetic (bytes
>= 128 treated as negative i8 values), while POSIX standardized unsigned
arithmetic. GNU tar, Python tarfile, Go archive/tar, and libarchive all
accept both forms, let's do the same.

Assisted-by: OpenCode (claude-sonnet-4-6@default)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters merged commit 17b6b4a into composefs:main May 18, 2026
1 check passed
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