Skip to content

Command line args bounds checking#424

Merged
anzz1 merged 2 commits intomasterfrom
patch-arg-bounds-check
Mar 23, 2023
Merged

Command line args bounds checking#424
anzz1 merged 2 commits intomasterfrom
patch-arg-bounds-check

Conversation

@anzz1
Copy link
Copy Markdown
Contributor

@anzz1 anzz1 commented Mar 23, 2023

Bound check command line argument parameters so it doesn't crash / do out-of-bounds read when entering empty param.
Outputs a "invalid parameter" error in this case.

before: "./main -r " = crash

@anzz1 anzz1 added the bug Something isn't working label Mar 23, 2023
@anzz1 anzz1 requested review from Green-Sky, blackhole89, ggerganov and sw and removed request for ggerganov March 23, 2023 11:52
Comment thread utils.cpp Outdated
@anzz1 anzz1 requested a review from Green-Sky March 23, 2023 12:10
@anzz1
Copy link
Copy Markdown
Contributor Author

anzz1 commented Mar 23, 2023

Hm it got stuck on "change requested" even when it's resolved?

@Green-Sky
Copy link
Copy Markdown
Collaborator

Hm it got stuck on "change requested" even when it's resolved?

wdym?

@anzz1 anzz1 merged commit ea10d3d into master Mar 23, 2023
@j-f1 j-f1 deleted the patch-arg-bounds-check branch March 23, 2023 18:10
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* command line args bounds checking

* unknown and invalid param exit codes 0 -> 1
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
* command line args bounds checking

* unknown and invalid param exit codes 0 -> 1
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants