forked from osmocom/wireshark
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:
parent
00961a0df2
commit
284aed2c66
|
@ -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);
|
next_tvb = tvb_new_subset_remaining(tvb, ah_hdr_len);
|
||||||
|
|
||||||
iph->ip_nxt = ah_nxt;
|
if (iph != NULL) {
|
||||||
iph->ip_len -= ah_hdr_len;
|
iph->ip_nxt = ah_nxt;
|
||||||
|
iph->ip_len -= ah_hdr_len;
|
||||||
|
}
|
||||||
|
|
||||||
if (pinfo->dst.type == AT_IPv6) {
|
if (pinfo->dst.type == AT_IPv6) {
|
||||||
ipv6_dissect_next(ah_nxt, next_tvb, pinfo, tree, iph);
|
ipv6_dissect_next(ah_nxt, next_tvb, pinfo, tree, iph);
|
||||||
|
|
|
@ -1152,8 +1152,10 @@ dissect_routing6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
iph->ip_nxt = rt.ip6r_nxt;
|
if (iph != NULL) {
|
||||||
iph->ip_len -= len;
|
iph->ip_nxt = rt.ip6r_nxt;
|
||||||
|
iph->ip_len -= len;
|
||||||
|
}
|
||||||
next_tvb = tvb_new_subset_remaining(tvb, len);
|
next_tvb = tvb_new_subset_remaining(tvb, len);
|
||||||
ipv6_dissect_next(rt.ip6r_nxt, next_tvb, pinfo, tree, iph);
|
ipv6_dissect_next(rt.ip6r_nxt, next_tvb, pinfo, tree, iph);
|
||||||
return tvb_captured_length(tvb);
|
return tvb_captured_length(tvb);
|
||||||
|
|
|
@ -663,8 +663,10 @@ dissect_shim6(tvbuff_t *tvb, packet_info * pinfo, proto_tree *tree, void* data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iph->ip_nxt = shim.ip6s_nxt;
|
if (iph != NULL) {
|
||||||
iph->ip_len -= len;
|
iph->ip_nxt = shim.ip6s_nxt;
|
||||||
|
iph->ip_len -= len;
|
||||||
|
}
|
||||||
next_tvb = tvb_new_subset_remaining(tvb, len);
|
next_tvb = tvb_new_subset_remaining(tvb, len);
|
||||||
ipv6_dissect_next(shim.ip6s_nxt, next_tvb, pinfo, tree, iph);
|
ipv6_dissect_next(shim.ip6s_nxt, next_tvb, pinfo, tree, iph);
|
||||||
return tvb_captured_length(tvb);
|
return tvb_captured_length(tvb);
|
||||||
|
|
|
@ -543,7 +543,7 @@ dissect_stt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
ws_ip *iph = (ws_ip*)data;
|
ws_ip *iph = (ws_ip*)data;
|
||||||
|
|
||||||
/* Make sure we at least have a TCP header */
|
/* 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) {
|
tvb_captured_length(tvb) < STT_TCP_HDR_LEN) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue