diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-10-11 15:39:47 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-10-11 15:39:47 +0000 |
commit | 67dda34221232aeb8d136e36cb6825b77630a7c7 (patch) | |
tree | 370ad4924921746829b38180e304f54e5c40798e | |
parent | 13f39288a07baae802f2d3a7f9c261cecd910115 (diff) |
Fix benign bugs wherein proto_tree_add_uint() was intended instead of proto_tree_add_item();
(Replaces changes made in SVN #39351).
svn path=/trunk/; revision=39361
-rw-r--r-- | epan/dissectors/packet-3g-a11.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-9p.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-aim-messaging.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-dec-dnart.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-sbus.c | 47 |
5 files changed, 32 insertions, 25 deletions
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c index ec5bf6cd81..c39aa5618f 100644 --- a/epan/dissectors/packet-3g-a11.c +++ b/epan/dissectors/packet-3g-a11.c @@ -1401,7 +1401,7 @@ dissect_a11_extensions( tvbuff_t *tvb, int offset, proto_tree *tree) "Unknown Extension %u")); ext_tree = proto_item_add_subtree(ti, ett_a11_ext); - proto_tree_add_item(ext_tree, hf_a11_ext_type, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_uint(ext_tree, hf_a11_ext_type, tvb, offset, 1, ext_type); offset++; if (ext_type == SS_EXT) { diff --git a/epan/dissectors/packet-9p.c b/epan/dissectors/packet-9p.c index a1cb9ada50..cab9215200 100644 --- a/epan/dissectors/packet-9p.c +++ b/epan/dissectors/packet-9p.c @@ -580,7 +580,7 @@ static void dissect_9P_mode(tvbuff_t * tvb, proto_item * item,int offset) return; proto_tree_add_boolean(mode_tree, hf_9P_mode_c, tvb, offset, 1, mode); proto_tree_add_boolean(mode_tree, hf_9P_mode_t, tvb, offset, 1, mode); - proto_tree_add_item(mode_tree, hf_9P_mode_rwx, tvb, offset, 1, ENC_NA); + proto_tree_add_uint(mode_tree, hf_9P_mode_rwx, tvb, offset, 1, mode); } /* dissect 9P Qid */ diff --git a/epan/dissectors/packet-aim-messaging.c b/epan/dissectors/packet-aim-messaging.c index 65dc765b77..551d70b68c 100644 --- a/epan/dissectors/packet-aim-messaging.c +++ b/epan/dissectors/packet-aim-messaging.c @@ -495,7 +495,7 @@ dissect_aim_rendezvous_extended_message(tvbuff_t *tvb, proto_tree *msg_tree) /* message_type = tvb_get_guint8(tvb, offset); */ proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset+=1; message_flags = tvb_get_guint8(tvb, offset); - ti_flags = proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_flags, tvb, offset, 1, ENC_BIG_ENDIAN); + ti_flags = proto_tree_add_uint(msg_tree, hf_aim_rendezvous_extended_data_message_flags, tvb, offset, 1, message_flags); flags_entry = proto_item_add_subtree(ti_flags, ett_aim_extended_data_message_flags); proto_tree_add_boolean(flags_entry, hf_aim_rendezvous_extended_data_message_flags_normal, tvb, offset, 1, message_flags); proto_tree_add_boolean(flags_entry, hf_aim_rendezvous_extended_data_message_flags_auto, tvb, offset, 1, message_flags); diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c index 9e4fefef8f..764756288d 100644 --- a/epan/dissectors/packet-dec-dnart.c +++ b/epan/dissectors/packet-dec-dnart.c @@ -505,8 +505,8 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, 1, rt_zero); offset++; } else { - proto_tree_add_item(flags_tree, hf_dec_rt_short_msg, - tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_uint(flags_tree, hf_dec_rt_short_msg, + tvb, offset, 1, msg_flags); proto_tree_add_boolean(flags_tree, hf_dec_rt_rqr, tvb, offset, 1, msg_flags); proto_tree_add_boolean(flags_tree, hf_dec_rt_rts, tvb, diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c index 338317756a..d14ec89443 100644 --- a/epan/dissectors/packet-sbus.c +++ b/epan/dissectors/packet-sbus.c @@ -655,6 +655,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 sbus_web_aid; guint8 sbus_web_seq; guint8 sbus_rdwr_type; + guint8 sbus_rdwr_sequence; guint8 sbus_rdwr_block_tlg; guint8 sbus_rdwr_block_type; guint8 sbus_rdwr_ack_nak; @@ -1173,19 +1174,21 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* WebServer Request */ case SBUS_WEB_SERVER_SERIAL_COMM: sbus_web_size = tvb_get_guint8(tvb,offset); - proto_tree_add_item(sbus_tree, + proto_tree_add_uint(sbus_tree, hf_sbus_web_size, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_web_size); offset += 1; - proto_tree_add_item(sbus_tree, + sbus_web_aid = tvb_get_guint8(tvb,offset); + proto_tree_add_uint(sbus_tree, hf_sbus_web_aid, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_web_aid); offset += 1; - proto_tree_add_item(sbus_tree, + sbus_web_seq = tvb_get_guint8(tvb,offset); + proto_tree_add_uint(sbus_tree, hf_sbus_web_seq, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_web_seq); offset += 1; if (sbus_web_size > 1) { @@ -1216,9 +1219,9 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 1; } sbus_rdwr_type = tvb_get_guint8(tvb,offset); - proto_tree_add_item(sbus_tree, + proto_tree_add_uint(sbus_tree, hf_sbus_rdwr_telegram_type, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_rdwr_type); offset += 1; switch(sbus_rdwr_type) { case SBUS_WR_START_OF_STREAM: @@ -1268,17 +1271,19 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } break; case SBUS_WR_BLOCK_DATA_STREAM: - proto_tree_add_item(sbus_tree, + sbus_rdwr_sequence = tvb_get_guint8(tvb,offset); + proto_tree_add_uint(sbus_tree, hf_sbus_rdwr_telegram_sequence, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_rdwr_sequence); offset += 1; /*do not display a field for block data (skip)*/ offset += (sbus_rdwr_length-1); break; case SBUS_WR_BLOCK_END_OF_STREAM: - proto_tree_add_item(sbus_tree, + sbus_rdwr_sequence = tvb_get_guint8(tvb,offset); + proto_tree_add_uint(sbus_tree, hf_sbus_rdwr_telegram_sequence, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_rdwr_sequence); offset += 1; /*do not display a field for block data (skip it)*/ offset += (sbus_rdwr_length-5); @@ -1709,20 +1714,22 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Response: Webserver request */ case SBUS_WEB_SERVER_SERIAL_COMM: sbus_web_size = tvb_get_guint8(tvb,offset); - proto_tree_add_item(sbus_tree, + proto_tree_add_uint(sbus_tree, hf_sbus_web_size, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_web_size); offset += 1; - proto_tree_add_item(sbus_tree, + sbus_web_aid = tvb_get_guint8(tvb,offset); + proto_tree_add_uint(sbus_tree, hf_sbus_web_aid, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_web_aid); offset += 1; if (sbus_web_size > 1) { - proto_tree_add_item(sbus_tree, + sbus_web_seq = tvb_get_guint8(tvb,offset); + proto_tree_add_uint(sbus_tree, hf_sbus_web_seq, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_web_seq); offset += 1; dt = proto_tree_add_text(sbus_tree, tvb, offset, @@ -1741,9 +1748,9 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case SBUS_RD_WR_PCD_BLOCK: sbus_rdwr_block_tlg = request_val->block_tlg; sbus_rdwr_length = tvb_get_guint8(tvb,offset); - proto_tree_add_item(sbus_tree, + proto_tree_add_uint(sbus_tree, hf_sbus_rdwr_block_length, tvb, offset, - 1, ENC_BIG_ENDIAN); + 1, sbus_rdwr_length); offset += 1; hi = proto_tree_add_item(sbus_tree, hf_sbus_rdwr_acknakcode, tvb, offset, |