From a38b7149084b1f07a769fe1d49f4fb25089c9b6b Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Sat, 17 Jan 2015 14:55:22 +0100 Subject: RSYNC: Malformed Packet on rsync-version with length 2 RSYNC dissector always think the resync-version length = 4 Bug:10863 Change-Id: I2dee3ff7195af110223903d79b938849666878a7 Reviewed-on: https://code.wireshark.org/review/6584 Reviewed-by: Anders Broman --- epan/dissectors/packet-rsync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-rsync.c') diff --git a/epan/dissectors/packet-rsync.c b/epan/dissectors/packet-rsync.c index b1ff4cab67..e4a2923854 100644 --- a/epan/dissectors/packet-rsync.c +++ b/epan/dissectors/packet-rsync.c @@ -129,8 +129,8 @@ dissect_rsync_version_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rsyn proto_tree_add_item(rsync_tree, &hfi_rsync_hdr_magic, tvb, offset, RSYNCD_MAGIC_HEADER_LEN, ENC_ASCII|ENC_NA); offset += RSYNCD_MAGIC_HEADER_LEN; offset += 1; /* skip the space */ - proto_tree_add_item(rsync_tree, &hfi_rsync_hdr_version, tvb, offset, VERSION_LEN, ENC_ASCII|ENC_NA); - version = tvb_get_string_enc(wmem_packet_scope(),tvb, offset, VERSION_LEN, ENC_ASCII|ENC_NA); + proto_tree_add_item(rsync_tree, &hfi_rsync_hdr_version, tvb, offset, -1, ENC_ASCII|ENC_NA); + version = tvb_get_string_enc(wmem_packet_scope(),tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_ASCII|ENC_NA); col_add_fstr(pinfo->cinfo, COL_INFO, "%s Initialisation (Version %s)", (me == SERVER ? "Server" : "Client"), version); } -- cgit v1.2.3