QUIC: fix null-ptr dereference in gQUIC version check
authorPeter Wu <peter@lekensteyn.nl>
Fri, 12 Oct 2018 11:20:07 +0000 (13:20 +0200)
committerMartin Kaiser <wireshark@kaiser.cx>
Fri, 12 Oct 2018 15:57:52 +0000 (15:57 +0000)
Bug: 15201
Change-Id: Idc9964347c251fe7f9599b90abc760f26d85a5ba
Fixes: v2.9.0rc0-2173-g9fcb4af6b6 ("QUIC: gQUIC Q044 always use CHLO from gQUIC (with tag)")
Reviewed-on: https://code.wireshark.org/review/30160
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
epan/dissectors/packet-quic.c

index 14f5baac13a13ecfa438a27e1d7146d380d704d4..56e30b819c0357d77ee0979161d70d286a758d61 100644 (file)
@@ -1902,7 +1902,7 @@ dissect_quic_long_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *quic_tre
 
     offset = dissect_quic_long_header_common(tvb, pinfo, quic_tree, offset, quic_packet, &version, &dcid, &scid);
 
-    if (conn->version == 0x51303434) { /* gQUIC Q044 */
+    if (conn && conn->version == 0x51303434) { /* gQUIC Q044 */
         return dissect_gquic_ietf(tvb, pinfo, quic_tree, offset, conn->version);
     }