net: ipv6: Make sure not to access null pointer
While very unlikely it might happen that fragment pointer is NULL when going through fragment list. Coverity-CID: 167148 Change-Id: Ic3dbed7ee29c7b864d4830d726f65d7f62dcea84 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
651a0cb269
commit
7ce82fea82
1 changed files with 1 additions and 1 deletions
|
@ -554,7 +554,7 @@ int net_ipv6_find_last_ext_hdr(struct net_buf *buf)
|
|||
}
|
||||
|
||||
out:
|
||||
if (pos > frag->len) {
|
||||
if (!frag || pos > frag->len) {
|
||||
pos = -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue