mirror of
https://github.com/curl/curl.git
synced 2026-04-15 07:11:40 +03:00
gtls: fix NULL pointer dereference
gnutls_x509_crt_import() must not be called with a NULL certificate Bug: http://curl.haxx.se/mail/lib-2014-04/0145.html Reported-by: Damian Dixon
This commit is contained in:
parent
5b463e97fa
commit
386ed2d590
1 changed files with 4 additions and 3 deletions
|
|
@ -735,9 +735,10 @@ gtls_connect_step3(struct connectdata *conn,
|
|||
/* initialize an X.509 certificate structure. */
|
||||
gnutls_x509_crt_init(&x509_cert);
|
||||
|
||||
/* convert the given DER or PEM encoded Certificate to the native
|
||||
gnutls_x509_crt_t format */
|
||||
gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER);
|
||||
if(chainp)
|
||||
/* convert the given DER or PEM encoded Certificate to the native
|
||||
gnutls_x509_crt_t format */
|
||||
gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER);
|
||||
|
||||
if(data->set.ssl.issuercert) {
|
||||
gnutls_x509_crt_init(&x509_issuer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue