Commit 7ce82fea authored by Jukka Rissanen's avatar Jukka Rissanen
Browse files

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: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent 651a0cb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}