Fix omitted selector handling.
[openssl.git] / crypto / asn1 / tasn_utl.c
index f03f9e9ed04b5684daaa71463fc2b07b641569f6..c215891a439e952d50527919a083b70b31def8f6 100644 (file)
@@ -189,7 +189,7 @@ const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt,
     sfld = offset2ptr(*pval, adb->offset);
 
     /* Check if NULL */
-    if (!sfld) {
+    if (*sfld == NULL) {
         if (!adb->null_tt)
             goto err;
         return adb->null_tt;