From: Dr. Stephen Henson Date: Sun, 22 Jan 2012 13:12:14 +0000 (+0000) Subject: return error if md is NULL X-Git-Tag: master-post-reformat~1974 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=1db5f356f50854b7ca7bc3f4be1dbae652f28225;hp=e6903980af2ca1efbdec5366c197dca9f9bff945;ds=sidebyside return error if md is NULL --- diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 7150171c1d..e4299d89ea 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2279,6 +2279,8 @@ static int tls12_find_nid(int id, tls12_lookup *table, size_t tlen) int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) { int sig_id, md_id; + if (!md) + return 0; md_id = tls12_find_id(EVP_MD_type(md), tls12_md, sizeof(tls12_md)/sizeof(tls12_lookup)); if (md_id == -1)