HTTP2: prevent a segmentation fault if HTTP2 dissector was not called on first pass
With HTTP2 heuristics to identify the conversation, a packet can be skipped on first pass and then decoded as HTTP2 on subsequent ones. Check that header data is available before attempting header decompression. Bug: 14869 Change-Id: I8ef7669ca33835b509acb38d797e33d6167a1bd1 Reviewed-on: https://code.wireshark.org/review/28257 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
94bf85ad26
commit
e281ca6f83
|
@ -1699,7 +1699,7 @@ inflate_http2_header_block(tvbuff_t *tvb, packet_info *pinfo, guint offset,
|
|||
wmem_list_append(header_stream_info->stream_header_list, headers);
|
||||
}
|
||||
|
||||
} else {
|
||||
} else if (header_data->current) {
|
||||
headers = (wmem_array_t*)wmem_list_frame_data(header_data->current);
|
||||
|
||||
header_data->current = wmem_list_frame_next(header_data->current);
|
||||
|
@ -1707,6 +1707,8 @@ inflate_http2_header_block(tvbuff_t *tvb, packet_info *pinfo, guint offset,
|
|||
if(!header_data->current) {
|
||||
header_data->current = wmem_list_head(header_list);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if(wmem_array_get_count(headers) == 0) {
|
||||
|
|
Loading…
Reference in New Issue