diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-01-17 14:55:22 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-01-17 15:47:21 +0000 |
commit | a38b7149084b1f07a769fe1d49f4fb25089c9b6b (patch) | |
tree | 4498321d911e00b4359626a6f4416bbebcd22c3d /epan/dissectors/packet-rsync.c | |
parent | aa1057daba372e6c4461abfb26f604d7894b39d5 (diff) |
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 <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rsync.c')
-rw-r--r-- | epan/dissectors/packet-rsync.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |