Skip to content

Improve argument validation in hist.c#157

Open
hello8693 wants to merge 1 commit intozsh-users:masterfrom
hello8693:patch-1
Open

Improve argument validation in hist.c#157
hello8693 wants to merge 1 commit intozsh-users:masterfrom
hello8693:patch-1

Conversation

@hello8693
Copy link

This pull request makes a small but important fix to the argument validation logic in the getargs function in Src/hist.c. The change ensures that negative word indices are properly rejected, which improves error handling and prevents potential out-of-bounds access.

  • Improved input validation in getargs by explicitly checking for negative values of arg1 and arg2, preventing invalid negative indices from being processed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant