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
Bugfix/issue 388 #408
Bugfix/issue 388 #408
Conversation
If we catch an OOM error, set JsonSize, JsonData, and BulkData to 0/null.
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.
This is going to need more unit tests. We need to understand what happens if a BFH can't be created from the data provided
msg.setBulkData(_bulkData); | ||
} | ||
} catch (OutOfMemoryError e){ | ||
Log.e("SdlProtocol", "OOM error due to junk data in BinaryFrameHeader"); |
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.
A TAG variable should be created for this with value of BinaryFrameHeader
. Also, Error message should be a little more generic. Unable to process data to form header
or similar.
Still need to add unit tests or test for actual case
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.
BFH parsing is now working as expected. However, in the MessageFrameAssembler methods need to check if the returned value was null and simply return if it is.
Protecting against OOM error reported in issue #388