Skip to content

Commit 8d8f779

Browse files
committed
fix more null derefs
1 parent 57f416f commit 8d8f779

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12420,7 +12420,7 @@ int wc_DsaPublicKeyDecode(const byte* input, word32* inOutIdx, DsaKey* key,
1242012420
key->type = DSA_PUBLIC;
1242112421
}
1242212422

12423-
FREE_ASNGETDATA(dataASN, key->heap);
12423+
FREE_ASNGETDATA(dataASN, key != NULL ? key->heap : NULL);
1242412424
return ret;
1242512425
#endif
1242612426
}
@@ -37187,7 +37187,7 @@ int wc_EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key,
3718737187
key, curve_id);
3718837188
}
3718937189

37190-
FREE_ASNGETDATA(dataASN, key->heap);
37190+
FREE_ASNGETDATA(dataASN, key != NULL ? key->heap : NULL);
3719137191
return ret;
3719237192
#endif
3719337193
}
@@ -37625,7 +37625,7 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
3762537625
}
3762637626
}
3762737627

37628-
FREE_ASNGETDATA(dataASN, key->heap);
37628+
FREE_ASNGETDATA(dataASN, key != NULL ? key->heap : NULL);
3762937629
return ret;
3763037630
#endif /* WOLFSSL_ASN_TEMPLATE */
3763137631
}

0 commit comments

Comments
 (0)