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

fix offset when reading and writing fat32 files to avoid overruns #260

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

deitch
Copy link
Collaborator

@deitch deitch commented Sep 26, 2024

Fixes the issue raised by @mrbojangles3.

With thanks to @mrbojangles3, whose tests are now incorporated into fat32_test.go

@deitch deitch force-pushed the fat32-file-offset-int64 branch from b06291e to 24489a6 Compare September 26, 2024 14:59
@deitch deitch merged commit 6ad9db3 into master Sep 26, 2024
20 checks passed
@deitch deitch deleted the fat32-file-offset-int64 branch September 26, 2024 15:03
@@ -258,7 +264,7 @@ func TestFat32Read(t *testing.T) {
corrupted := ""
if tt.bytechange >= 0 {
b := make([]byte, 1)
_, _ = rand.Read(b)
_, _ = chacha.Read(b)
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to switch away from crypto/rand to math/rand/v2 ?
https://pkg.go.dev/math/rand/v2#ChaCha8.Read is not available for Go 1.22

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope. It was done because lint was complaining when go1.23. With 1.22 we should not switch.

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