Consistently check return value from fseek()/lseek(), such as by using a wrapper
Open
Nobody has claimed this yet.
enhancement
maintenance/cleanup
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I have tracked 13 places where you are not using this wrapper.
https://github.com/openwall/john/blob/6dca7c39c56fbf7463de2ef6690ec557b2b51d6e/src/zip2john.c#L160
I think it is quite simple and safer than a direct call to fseek
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/zip2john.c around line 160 and inspect the existing wrapper referenced by the issue. Locate the remaining direct fseek()/lseek() calls, apply the same checked approach to all 13 reported places, and verify that each return value is handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100