Everybody makes mistakes when writing comparison functions

static int dh_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b){  return
ossl_ffc_params_cmp(&a->pkey.dh->params, &a->pkey.dh->params,
a->ameth != &ossl_dhx_asn1_meth);
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrey Karpov

Andrey Karpov

Co-founder of the PVS-Studio project. Microsoft MVP in the ‘Developer Technologies’ nomination and PhD in Physics and Mathematics.