http: Check for valid tcpinfo pointer

In dissect_http_tcp() the data pointer may be NULL so ensure
we check for this before dereferencing it.

Bug: 13457
Change-Id: I84f4a0e3b416a2829998f20fe59da8770a34e564
Reviewed-on: https://code.wireshark.org/review/20438
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2017-03-07 22:06:13 +01:00
parent c293842069
commit af8361a90e
1 changed files with 2 additions and 1 deletions

View File

@ -3193,7 +3193,8 @@ dissect_http_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
return tvb_captured_length(tvb);
}
end_of_stream = IS_TH_FIN(tcpinfo->flags);
/* XXX - how to detect end-of-stream without tcpinfo */
end_of_stream = (tcpinfo && IS_TH_FIN(tcpinfo->flags));
dissect_http_on_stream(tvb, pinfo, tree, conv_data, end_of_stream);
return tvb_captured_length(tvb);
}