Fix Coverity CID 280618 (Dereference before null check).
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 1 Jul 2013 20:25:49 +0000 (20:25 +0000)
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 1 Jul 2013 20:25:49 +0000 (20:25 +0000)
#BACKPORT(1.10,1.8)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@50305 f5534014-38df-0310-8fa8-9805f1628bb7

plugins/asn1/packet-asn1.c

index 0b3d8849a51d129c15c83fd48b8622f948ecbd74..cdde025bea8549d8867447044c1ea3a7c2024ce5 100644 (file)
@@ -2727,7 +2727,7 @@ define_module(GNode *p, GNode *q)
        module->type = TBLTYPE_Module;
 
        p = g_node_first_child(p);
-       
+
        if (!p) {
                return;
        }
@@ -5065,7 +5065,7 @@ getPDUprops(PDUprops *out, guint offset, guint cls, guint tag, guint cons)
                                pos.type = gettype(pos.node); /* the resulting type */
                                info = getinfo(pos.node);
                                tmp = "unknown tag";
-                               if ((info->tclass == BER_CLASS_UNI) && (info->tag < 31)) {
+                               if (info && (info->tclass == BER_CLASS_UNI) && (info->tag < 31)) {
                                        tmp = asn1_tag[info->tag];
                                        pos.type = asn1_uni_type[info->tag]; /* get univsrsal type */
                                }