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

Possible out of buffer access #78

Open
krzysiekkajot opened this issue Sep 22, 2023 · 0 comments
Open

Possible out of buffer access #78

krzysiekkajot opened this issue Sep 22, 2023 · 0 comments

Comments

@krzysiekkajot
Copy link

Hi
in legoino/src/Lpf2Hub.cpp, line 82 there is a code:
if (manufacturerDataLength >= 3) <-- check if buffer is at least 3 characters length
{
log_d("manufacturer data hub type: %x", manufacturerData[3]);
//check device type ID
switch (manufacturerData[3]) <-- accessing 4th element in the buffer
should be line 82 changed to: if (manufacturerDataLength >= 4) ?

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

No branches or pull requests

1 participant