Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect check in atc_comman function #8

Closed
diman-borisoff opened this issue Nov 10, 2023 · 0 comments · Fixed by #9
Closed

Incorrect check in atc_comman function #8

diman-borisoff opened this issue Nov 10, 2023 · 0 comments · Fixed by #9

Comments

@diman-borisoff
Copy link

diman-borisoff commented Nov 10, 2023

Hello!
https://github.com/nimaltd/atc/blob/18f35607481deb2f8a73f7fddde14c86f1a3efdb/atc.c#L188C23-L188C23
if (items >= _ATC_SEARCH_CMD_MAX) break;
It seems to me that there is an error here; when passing items = _ATC_SEARCH_CMD_MAX, memory is allocated only once.
Perhaps such a check is needed at the beginning of the cycle?
if (i >= _ATC_SEARCH_CMD_MAX) break;

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 a pull request may close this issue.

1 participant