aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim-sst.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2006-08-04 10:02:21 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2006-08-04 10:02:21 +0000
commit7d29d978cec90808c2789f40259feed805df62c9 (patch)
tree7e47f75c2072000c9eae3c75df676641b8468e83 /epan/dissectors/packet-aim-sst.c
parent0431e78ccb61bf3328f4401d41c2df1b9b0034fb (diff)
downloadwireshark-7d29d978cec90808c2789f40259feed805df62c9.tar.gz
wireshark-7d29d978cec90808c2789f40259feed805df62c9.tar.bz2
wireshark-7d29d978cec90808c2789f40259feed805df62c9.zip
There may be no icon data
svn path=/trunk/; revision=18834
Diffstat (limited to 'epan/dissectors/packet-aim-sst.c')
-rw-r--r--epan/dissectors/packet-aim-sst.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-aim-sst.c b/epan/dissectors/packet-aim-sst.c
index ca03341629..554f0bef62 100644
--- a/epan/dissectors/packet-aim-sst.c
+++ b/epan/dissectors/packet-aim-sst.c
@@ -93,7 +93,12 @@ static int dissect_aim_sst_buddy_down_repl (tvbuff_t *tvb, packet_info *pinfo _U
icon_size = tvb_get_ntohs(tvb, offset);
offset+=2;
- proto_tree_add_item(tree, hf_aim_sst_icon, tvb, offset, icon_size, FALSE);
+ if (icon_size && (tvb_ensure_length_remaining(tvb, offset) >= icon_size))
+ {
+ /* TODO: this is set to FT_UINT16 - is length fixed, or would
+ FT_BYTES be better? */
+ proto_tree_add_item(tree, hf_aim_sst_icon, tvb, offset, icon_size, FALSE);
+ }
offset+=icon_size;