diff options
author | Evan Huus <eapache@gmail.com> | 2013-10-12 13:14:30 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-10-12 13:14:30 +0000 |
commit | 137be14b3d68a86868512d6f2e9adcbf8748df16 (patch) | |
tree | 2a3d9726487ca5a7be58f66b61036f007ca9ea18 /epan | |
parent | b581aff2c3d2be55d0adc7902aefce3de8a9e592 (diff) |
We can't use proto_tree_add_uint_* for FT_TIME fields, use proto_tree_add_time_*
instead. Fixes another one of the issues that shows up in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9263
svn path=/trunk/; revision=52565
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-smb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 70d0960973..d8418a0e77 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -1552,8 +1552,10 @@ dissect_smb_datetime(tvbuff_t *tvb, proto_tree *parent_tree, int offset, * No date/time specified. */ if (parent_tree) { - proto_tree_add_uint_format_value(parent_tree, hf_date, tvb, offset, 4, - ((dos_date << 16) | dos_time), "No time specified (0x%08x)", + tv.secs = 0; + tv.nsecs = 0; + proto_tree_add_time_format_value(parent_tree, hf_date, tvb, offset, 4, + &tv, "No time specified (0x%08x)", ((dos_date << 16) | dos_time)); } offset += 4; @@ -1583,8 +1585,10 @@ dissect_smb_datetime(tvbuff_t *tvb, proto_tree *parent_tree, int offset, * Invalid date/time. */ if (parent_tree) { - item = proto_tree_add_uint_format_value(parent_tree, hf_date, tvb, offset, 4, - ((dos_date << 16) | dos_time), "Invalid time"); + tv.secs = 0; + tv.nsecs = 0; + item = proto_tree_add_time_format_value(parent_tree, hf_date, tvb, offset, 4, + &tv, "Invalid time (0x%08x)", ((dos_date << 16) | dos_time)); tree = proto_item_add_subtree(item, ett_smb_time_date); if (time_first) { proto_tree_add_uint_format(tree, hf_dos_time, tvb, offset, 2, dos_time, "DOS Time: %02d:%02d:%02d (0x%04x)", tm.tm_hour, tm.tm_min, tm.tm_sec, dos_time); |