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

READ_BUFSIZE should replace hardcoded magic number #30

Open
tedhenry100 opened this issue Mar 16, 2017 · 0 comments · May be fixed by #32
Open

READ_BUFSIZE should replace hardcoded magic number #30

tedhenry100 opened this issue Mar 16, 2017 · 0 comments · May be fixed by #32

Comments

@tedhenry100
Copy link

The reason for the following line is presumably to avoid reading off the end of packetbuffer.

if (replyidx >= 20) break;

In the case that the value of READ_BUFSIZE definition higher in the file is changed to a smaller number, the line would be safer and better if written as

if (replyidx >= READ_BUFSIZE) break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant