summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-imf.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-04-19 09:04:49 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-04-19 09:04:49 +0000
commit44c960a3dc90dfdb8fa5d120409303193671a1cf (patch)
tree57125ce0fd43619afc4d82494167c8a471be1c8c /epan/dissectors/packet-imf.c
parent534dfde65ca40f533bf20c22ef1c58c99a6097a1 (diff)
downloadwireshark-44c960a3dc90dfdb8fa5d120409303193671a1cf.tar.gz
Improved dumping when incorrect line ending.
svn path=/trunk/; revision=32512
Diffstat (limited to 'epan/dissectors/packet-imf.c')
-rw-r--r--epan/dissectors/packet-imf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index 3747e18ce0..5cb9662da3 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -588,6 +588,10 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
start_offset = end_offset;
}
+ if (end_offset == -1) {
+ end_offset = 0;
+ }
+
/* specify a content type until we can work it out for ourselves */
/* content_type_str = "multipart/mixed"; */
@@ -607,7 +611,7 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* just show the lines or highlight the rest of the buffer as message text */
- item = proto_tree_add_item(tree, hf_imf_message_text, tvb, start_offset, -1 , FALSE);
+ item = proto_tree_add_item(tree, hf_imf_message_text, tvb, end_offset, -1 , FALSE);
text_tree = proto_item_add_subtree(item, ett_imf_message_text);
start_offset = end_offset;
@@ -623,7 +627,7 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
proto_tree_add_text(text_tree, tvb, start_offset, end_offset - start_offset,
"%s",
- tvb_format_text(tvb, start_offset, end_offset - start_offset - 2));
+ tvb_format_text_wsp(tvb, start_offset, end_offset - start_offset));
/*
* Step to the next line.