Skip to content

hidden_ref: invalid numeric options silently select defaults #240

Closed

Description

@github-actions

In hidden_ref, -c garbage becomes zero through atoi and then becomes the token count. -t garbage becomes zero and keeps the library's default threads. With otherwise valid inputs, the tool writes a completed reference set instead of rejecting invalid options. Replace atoi/atoll with checked parsing that consumes the full argument and verifies its range. Add rejection cases for nonnumeric text and trailing junk.

Evidence (at the base of #236):

Filed by Shingler, the review bot, while reviewing #236; the defect is outside that pull request.

Activity

  1. added
    review-botFiled by the PR review bot: a defect found outside the reviewed pull request
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    review-botFiled by the PR review bot: a defect found outside the reviewed pull request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions