Skip to content

Commit

Permalink
gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked
Browse files Browse the repository at this point in the history
... for NULL pointer dereference.
  • Loading branch information
miri64 committed Oct 12, 2023
1 parent 149cee4 commit 988db69
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ static gnrc_pktsnip_t *_completed(gnrc_ipv6_ext_frag_rbuf_t *rbuf)
/* clist: first element is second element ;-) (from next of head) */
gnrc_ipv6_ext_frag_limits_t *ptr =
(gnrc_ipv6_ext_frag_limits_t *)rbuf->limits.next->next;
/* ptr should not be NULL at this point so it is safe to dereference with ptr->start here */
if (rbuf->last && (ptr->start == 0)) {
gnrc_pktsnip_t *res = NULL;

Expand Down

0 comments on commit 988db69

Please sign in to comment.