aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-yhoo.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-05-23 03:22:51 +0000
committerBill Meier <wmeier@newsguy.com>2012-05-23 03:22:51 +0000
commite72c6574ef3f513e6f3a44160a3dae059f257653 (patch)
tree0fc87c0ad70682527aba8547af490375d0c9a77c /epan/dissectors/packet-yhoo.c
parente6a57c8e93e7356b10f218d2d322e57b3d1e2116 (diff)
From Evan Huus: "Fix Potential padding issues in Yahoo dissectors"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7276 svn path=/trunk/; revision=42801
Diffstat (limited to 'epan/dissectors/packet-yhoo.c')
-rw-r--r--epan/dissectors/packet-yhoo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-yhoo.c b/epan/dissectors/packet-yhoo.c
index 45b68140ac..bc4f654780 100644
--- a/epan/dissectors/packet-yhoo.c
+++ b/epan/dissectors/packet-yhoo.c
@@ -103,6 +103,9 @@ static gint ett_yhoo = -1;
#define YAHOO_MSGTYPE_STATUS 4
#define YAHOO_MSGTYPE_OFFLINE 1515563606 /* yuck! */
+#define YAHOO_RAWPACKET_LEN 105
+
+#if 0
struct yahoo_rawpacket
{
char version[8]; /* 7 chars and trailing null */
@@ -116,6 +119,7 @@ struct yahoo_rawpacket
char nick2[36];
char content[1]; /* was zero, had problems with aix xlc */
};
+#endif
static const value_string yhoo_service_vals[] = {
{YAHOO_SERVICE_LOGON, "Pager Logon"},
@@ -183,7 +187,7 @@ dissect_yhoo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* get at least a full packet structure */
- if ( tvb_length(tvb) < sizeof(struct yahoo_rawpacket) ) {
+ if ( tvb_length(tvb) < YAHOO_RAWPACKET_LEN ) {
/* Not enough data captured; maybe it is a Yahoo
Messenger packet, but it contains too little data to
tell. */