diff options
author | Evan Huus <eapache@gmail.com> | 2013-01-07 22:12:38 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-01-07 22:12:38 +0000 |
commit | 74e5c710cb51dad086ebd8f4dbe9736a4bb310c7 (patch) | |
tree | 2fcd0caa5fd1fe3d00cebdf3cf80275c16b159b5 /epan/dissectors/packet-nwmtp.c | |
parent | 952ccb4b83de86f05d9a951da664aed10f60fbcc (diff) |
Re-fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8169 in a way that
is also (hopefully) valid for 32-bit platforms.
svn path=/trunk/; revision=46993
Diffstat (limited to 'epan/dissectors/packet-nwmtp.c')
-rw-r--r-- | epan/dissectors/packet-nwmtp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-nwmtp.c b/epan/dissectors/packet-nwmtp.c index ff46acc039..d0b6e59c3b 100644 --- a/epan/dissectors/packet-nwmtp.c +++ b/epan/dissectors/packet-nwmtp.c @@ -75,7 +75,7 @@ static void dissect_nwmtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) const gchar *type; proto_item *ti; proto_item *nwmtp_tree; - guint64 len; + guint32 len; tvbuff_t *next_tvb; /* update the info column */ @@ -110,7 +110,8 @@ static void dissect_nwmtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * safe than sorry. See * https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8169 */ - DISSECTOR_ASSERT(offset + len + 12 < G_MAXINT); + DISSECTOR_ASSERT(len < G_MAXUINT32 - 11); + DISSECTOR_ASSERT((guint64)offset + len + 12 < G_MAXINT); offset += len + 12; } } |