diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2012-12-07 21:46:59 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2012-12-07 21:46:59 +0000 |
commit | 6a6babe5b0040c2fe398017816fac1ae622a0a8c (patch) | |
tree | b3de4c4ecc4c671494da897c26aca2977bdebc1b /epan/dissectors/packet-ftp.c | |
parent | 48f3309e1431573d826ba38388f3fc287dd79fb2 (diff) | |
download | wireshark-6a6babe5b0040c2fe398017816fac1ae622a0a8c.tar.gz |
at one place, offset was incremented depending on if (tree)
this created a bug when offset was used later on
remove the if (tree) check
svn path=/trunk/; revision=46456
Diffstat (limited to 'epan/dissectors/packet-ftp.c')
-rw-r--r-- | epan/dissectors/packet-ftp.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c index fb0349e2bb..22eb7b0ed3 100644 --- a/epan/dissectors/packet-ftp.c +++ b/epan/dissectors/packet-ftp.c @@ -680,24 +680,22 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) linelen -= (int) (next_token - line); line = next_token; - if (tree) { - /* - * Add the rest of the first line as request or - * reply data. - */ - if (linelen != 0) { - if (is_request) { - proto_tree_add_item(reqresp_tree, + /* + * Add the rest of the first line as request or + * reply data. + */ + if (linelen != 0) { + if (is_request) { + proto_tree_add_item(reqresp_tree, hf_ftp_request_arg, tvb, offset, linelen, ENC_ASCII|ENC_NA); - } else { - proto_tree_add_item(reqresp_tree, + } else { + proto_tree_add_item(reqresp_tree, hf_ftp_response_arg, tvb, offset, linelen, ENC_ASCII|ENC_NA); - } } - offset = next_offset; } + offset = next_offset; /* * If this is a PORT request or a PASV response, handle it. |