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 nil pointer exception #3

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Fix nil pointer exception #3

merged 2 commits into from
Dec 13, 2023

Conversation

maeb
Copy link
Member

@maeb maeb commented Dec 13, 2023

This PR fixes a nil pointer exception that triggers when a corrupted file is validated.

A test with a corrupted warc file is part of this PR to avoid regressions later.

This commit adds a corrupted WARC file to reproduce a nil-pointer
exception.
This commit fixes a nil-pointer exception that occurs if a corrupted
WARC-file is validated.

The error is that 'wr' is nil if 'wf.Next' returns an error and using
'wr' than triggers the nil-pointer exception.
@maeb maeb merged commit ddbc0b6 into main Dec 13, 2023
4 checks passed
@maeb maeb deleted the fix/nil-pointer-exception branch December 13, 2023 13:50
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