aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ajp13.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2011-11-08 12:50:13 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2011-11-08 12:50:13 +0000
commit5fe097a8c3e882619ee4c569f5e090b2a9e9e429 (patch)
tree7b3bb24fb8a9d6e811d7b771dc81109799e70c95 /epan/dissectors/packet-ajp13.c
parent7d442f4c22c58a970a6d00c2affac1659cdb81f6 (diff)
From Iain Arnell via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6546
packet-ajp13 fails to detect end of request body AJP13 may use two different packets to signify end of request body; either zero length packet, or packet with zero length content. The ajp13 dissector already recognizes the former; this patch adds support for the latter. svn path=/trunk/; revision=39752
Diffstat (limited to 'epan/dissectors/packet-ajp13.c')
-rw-r--r--epan/dissectors/packet-ajp13.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 8fed44fd05..9b5570d0d7 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -516,6 +516,11 @@ display_req_body(tvbuff_t *tvb, proto_tree *ajp13_tree, ajp13_conv_data* cd)
/* BODY (AS STRING)
*/
content_length = tvb_get_ntohs( tvb, pos);
+ if (content_length == 0) {
+ /* zero length content also signals no more body data */
+ cd->content_length = 0;
+ return;
+ }
cd->content_length -= content_length;
proto_tree_add_item(ajp13_tree, hf_ajp13_data, tvb, pos+2, content_length, ENC_UTF_8|ENC_NA);
}