diff options
author | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-08-04 10:02:21 +0000 |
---|---|---|
committer | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-08-04 10:02:21 +0000 |
commit | d17ed2794cf1d6f7477272826e1a34871e9ad438 (patch) | |
tree | 7e47f75c2072000c9eae3c75df676641b8468e83 | |
parent | 2f13ee5e89bb15d7bc07c8ec7ccb18cc2c3c116b (diff) |
There may be no icon data
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18834 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/dissectors/packet-aim-sst.c | 7 |
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; |