aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2020-10-01 07:49:33 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2020-10-01 07:49:33 +1000
commit9ad3d14ea4f437c63350764bb49df9be51ac31c9 (patch)
tree80450754b2ddcffc960432c98cd5e4fc34e5b7b0 /epan/dissectors/packet-http.c
parentdf7d1905eb3196c6f878ffda88d7aa40cc1fefb9 (diff)
http: don't try to dissect zero-length bodies
Closes #16844 Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-http.c')
-rw-r--r--epan/dissectors/packet-http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index e6ae16e5cb..ca9326f8b8 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -1812,6 +1812,9 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_string_format_value(http_tree, hf_http_file_data,
next_tvb, 0, tvb_captured_length(next_tvb), file_data, "%u bytes", tvb_captured_length(next_tvb));
+ if (tvb_captured_length(next_tvb) == 0)
+ goto body_dissected;
+
/*
* Do subdissector checks.
*