commonmark / commonmark/cmark

Check errno after calling strtol

Open
#614 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.