summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-02-05 09:33:45 +0100
committerAnders Broman <a.broman58@gmail.com>2015-02-05 08:53:00 +0000
commitfb9dc13fb6e9b8e5ba6d15045694a9f1faf8f082 (patch)
tree2370228f6ebf87cc69beb8036dfe55de23c7092e
parent2bcd38fec409357d463193b55cecc446b5065b3f (diff)
downloadwireshark-fb9dc13fb6e9b8e5ba6d15045694a9f1faf8f082.tar.gz
MySQL: fix assert when the Connect Attrs capability is set, but no attributes
From <http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse> (emphasis mine): Starting with MySQL 5.6.6 the client **may** send attributes if CLIENT_CONNECT_ATTRS is set: Does this mean that the capability *may* be set, but the list of attributes can be empty? Issue reported by Peter Wu Ping-Bug:10351 Change-Id: Ib83c27f4a15341f791c443471d7a3bdbd942aef4 Reviewed-on: https://code.wireshark.org/review/6965 Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-mysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c
index a5fca6289d..959ace714c 100644
--- a/epan/dissectors/packet-mysql.c
+++ b/epan/dissectors/packet-mysql.c
@@ -1064,7 +1064,7 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
/* optional: connection attributes */
- if (conn_data->clnt_caps_ext & MYSQL_CAPS_CA)
+ if (conn_data->clnt_caps_ext & MYSQL_CAPS_CA && tvb_reported_length_remaining(tvb, offset))
{
proto_tree *connattrs_tree;
int lenfle;