Skip to content

fix: Prevent panics discovered by fuzzing#402

Merged
bodgit merged 1 commit intomainfrom
fuzz
Apr 28, 2026
Merged

fix: Prevent panics discovered by fuzzing#402
bodgit merged 1 commit intomainfrom
fuzz

Conversation

@bodgit
Copy link
Copy Markdown
Owner

@bodgit bodgit commented Oct 16, 2025

A number of uint64 values read from the file are used for sizing
slices however really large values will induce a panic which can happen
when fuzzing.

For now, check these values are no greater than math.MaxUint32 which
is safely within the Golang limit for slices and probably large enough.

Some values also should be greater than zero so add an additional check
for that where necessary.

@coveralls
Copy link
Copy Markdown

coveralls commented Oct 16, 2025

Coverage Status

coverage: 74.815% (+0.2%) from 74.59% — fuzz into main

A number of `uint64` values read from the file are used for sizing
slices however really large values will induce a panic which can happen
when fuzzing.

For now, check these values are no greater than `math.MaxUint32` which
is safely within the Golang limit for slices and probably large enough.

Some values also should be greater than zero so add an additional check
for that where necessary.
@bodgit bodgit merged commit 740fcf9 into main Apr 28, 2026
6 checks passed
@bodgit bodgit deleted the fuzz branch April 28, 2026 22:48
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