gnrc_sixlowpan_iphc: check ptr != NULL in compressible check#11164
Merged
miri64 merged 1 commit intoRIOT-OS:masterfrom Mar 26, 2019
Merged
Conversation
Not only does this leave open a risk to crash the node for the check in `_compressible()` but also is the `tmp` check below getting confused when `ptr` is `NULL`, since `gnrc_pktbuf_start_write()` returns `NULL` in that case.
707bcea to
3582ded
Compare
Member
Author
|
Thanks for the review :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Not only does this leave open a risk to crash the node for the check
in
_compressible()but also is thetmpcheck below getting confusedwhen
ptrisNULL, sincegnrc_pktbuf_start_write()returnsNULLin that case.
Testing procedure
If #11161 was merged and #11163 is fixed you can just send a packet with empty payload like this in
gnrc_networkingon a 6Lo-capable device (e.g.samr21-xprooriotlab-m3)With this PR the packet should be received at the destination (if a server with that port is open), without it the packet will be silently dropped.
If the referenced issues / PRs are not merged / fixed, apply the following patch before flashing:
Issues/PRs references
Requires #11163 to be fixed and #11161 to be merged to test without patch.