More null "IP information" pointer checks.

Bug: 12645
Change-Id: Iac662bec3c23b0b3d228766ad7a094f615770072
Reviewed-on: https://code.wireshark.org/review/16618
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-07-24 01:21:26 -07:00
parent 00961a0df2
commit 284aed2c66
4 changed files with 13 additions and 7 deletions

View File

@ -1137,8 +1137,10 @@ dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
next_tvb = tvb_new_subset_remaining(tvb, ah_hdr_len);
iph->ip_nxt = ah_nxt;
iph->ip_len -= ah_hdr_len;
if (iph != NULL) {
iph->ip_nxt = ah_nxt;
iph->ip_len -= ah_hdr_len;
}
if (pinfo->dst.type == AT_IPv6) {
ipv6_dissect_next(ah_nxt, next_tvb, pinfo, tree, iph);

View File

@ -1152,8 +1152,10 @@ dissect_routing6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
break;
}
iph->ip_nxt = rt.ip6r_nxt;
iph->ip_len -= len;
if (iph != NULL) {
iph->ip_nxt = rt.ip6r_nxt;
iph->ip_len -= len;
}
next_tvb = tvb_new_subset_remaining(tvb, len);
ipv6_dissect_next(rt.ip6r_nxt, next_tvb, pinfo, tree, iph);
return tvb_captured_length(tvb);

View File

@ -663,8 +663,10 @@ dissect_shim6(tvbuff_t *tvb, packet_info * pinfo, proto_tree *tree, void* data)
}
}
iph->ip_nxt = shim.ip6s_nxt;
iph->ip_len -= len;
if (iph != NULL) {
iph->ip_nxt = shim.ip6s_nxt;
iph->ip_len -= len;
}
next_tvb = tvb_new_subset_remaining(tvb, len);
ipv6_dissect_next(shim.ip6s_nxt, next_tvb, pinfo, tree, iph);
return tvb_captured_length(tvb);

View File

@ -543,7 +543,7 @@ dissect_stt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ws_ip *iph = (ws_ip*)data;
/* Make sure we at least have a TCP header */
if (iph->ip_nxt != IP_PROTO_TCP ||
if (iph == NULL || iph->ip_nxt != IP_PROTO_TCP ||
tvb_captured_length(tvb) < STT_TCP_HDR_LEN) {
return FALSE;
}