diff options
Diffstat (limited to 'lib/x509/x509.c')
-rw-r--r-- | lib/x509/x509.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 2091f3ae64..2b68fe440e 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -360,7 +360,8 @@ static int compare_sig_algorithm(gnutls_x509_crt_t cert) } if (empty1 != empty2 || - sp1.size != sp2.size || safe_memcmp(sp1.data, sp2.data, sp1.size) != 0) { + sp1.size != sp2.size || + (sp1.size > 0 && memcmp(sp1.data, sp2.data, sp1.size) != 0)) { gnutls_assert(); ret = GNUTLS_E_CERTIFICATE_ERROR; goto cleanup; |