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>
This commit is contained in:
Alexis La Goutte 2015-01-17 14:55:22 +01:00 committed by Anders Broman
parent aa1057daba
commit a38b714908
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}