aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mip6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-07-24 00:48:41 -0700
committerGuy Harris <guy@alum.mit.edu>2016-07-24 07:49:49 +0000
commitd109a8d62c39aa5caa29d9a2d021d813e82a7a12 (patch)
tree2a6176640bb6d0796c7ec266960dcb81b9098ae3 /epan/dissectors/packet-mip6.c
parent696011f522f6ced8aa6532bd069626a636cdaa33 (diff)
More null pointer checks.
Taken from Ib73410fd8575ad6c836311bbda87a0580e5640ac. Bug: 12645 Change-Id: Ie08c113b6193da40ce0e438faefd78ad36b4d475 Reviewed-on: https://code.wireshark.org/review/16615 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r--epan/dissectors/packet-mip6.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index 96b378bdd9..607c0f0686 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -4229,14 +4229,16 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
if ((type == MIP6_FNA) && (pproto == IP_PROTO_IPV6)) {
col_set_str(pinfo->cinfo, COL_INFO, "Fast Neighbor Advertisement[Fast Binding Update]");
next_tvb = tvb_new_subset_remaining(tvb, len + 8);
- iph->ip_len -= len + 8;
+ if (iph != NULL)
+ iph->ip_len -= len + 8;
ipv6_dissect_next(next_tvb, pinfo, tree, iph);
}
if ((type == MIP6_FBACK) && (pproto == IP_PROTO_AH)) {
col_set_str(pinfo->cinfo, COL_INFO, "Fast Binding Acknowledgment");
next_tvb = tvb_new_subset_remaining(tvb, len + offset);
- iph->ip_len -= len + offset;
+ if (iph != NULL)
+ iph->ip_len -= len + offset;
ipv6_dissect_next(next_tvb, pinfo, tree, iph);
}