-
Notifications
You must be signed in to change notification settings - Fork 6
Check out of bounds for inactive type1 packet #21
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
Conversation
unitTests/UnitTest24.cpp
Outdated
ElasticFrameMessages result = myEFPReceiver->receiveFragmentFromPtr(reinterpret_cast<uint8_t*>(&lType1Frame), FRAME_SIZE, 0); | ||
EXPECT_EQ(result, ElasticFrameMessages::noError); | ||
|
||
// test with corrup type1 packet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// test with corrup type1 packet | |
// test with corrupt type1 packet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted! Check if this might be an issue for other frame types as well.
db2100b
to
93c3012
Compare
I found that the unit tests did not work as expected so I improved them. |
unitTests/UnitTest24.cpp
Outdated
std::generate(garbage.begin(), garbage.end(), | ||
[&]() { return static_cast<uint8_t>(dis(gen)); }); | ||
|
||
ElasticFrameMessages info = myEFPReceiver->receiveFragment(garbage, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable
bc2947c
to
9a6c166
Compare
No description provided.