aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tftp.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-08-05 20:59:29 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2014-08-05 19:52:47 +0000
commit7f030bb0659b92dc29218ccc1ac8cf2ec41b46f5 (patch)
tree80ea4b09fa954b69dbf63d6b379a15606fd5a708 /epan/dissectors/packet-tftp.c
parentad20fd63fee11e7ff4a3ae12d92603fbf222b8e2 (diff)
we either have a source or a destination file name
when we set one, we clear the other Change-Id: I7c316dc9cc7b2c93cfa1b00eb617553f55a58715 Reviewed-on: https://code.wireshark.org/review/3449 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-tftp.c')
-rw-r--r--epan/dissectors/packet-tftp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index aaf0a860ae..d690169af6 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -243,6 +243,10 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tvb, offset, i1, ENC_ASCII|ENC_NA);
tftp_info->source_file = tvb_get_string_enc(wmem_file_scope(), tvb, offset, i1, ENC_ASCII);
+ /* we either have a source file name (for read requests) or a
+ destination file name (for write requests)
+ when we set one of the names, we clear the other */
+ tftp_info->destination_file = NULL;
col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
tvb_format_stringzpad(tvb, offset, i1));
@@ -269,6 +273,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tftp_info->destination_file =
tvb_get_string_enc(wmem_file_scope(), tvb, offset, i1, ENC_ASCII);
+ tftp_info->source_file = NULL; /* see above */
col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
tvb_format_stringzpad(tvb, offset, i1));