Check errno after calling strtol
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2k
- Forks
- 691
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 1
Description
Unrelated, but you have to check errno after calling strtol to detect invalid and out-of-range numbers reliably.
Originally posted by @nwellnhof in https://github.com/commonmark/cmark/issues/613#issuecomment-4553181190
Contributor guide
No contributing guide indexed for this repository
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
Locate the strtol calls involved in parsing numeric input and inspect how errno is handled after conversion. The change is complete when invalid and out-of-range numbers are detected reliably; use the repository's relevant parser tests if available to verify those cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100