gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnutls-dev] [PATCH] certificates not initialised in gnutls_certificate_


From: Aleix Conchillo Flaque
Subject: [gnutls-dev] [PATCH] certificates not initialised in gnutls_certificate_set_x509_trust
Date: Thu, 21 Oct 2004 00:51:07 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Just a simple patch to solve a memory bug. _gnutls_x509_crt_cpy needs
the dst certificate to be initialised in gnutls_certificate_set_x509_trust.

aleix

Index: lib/gnutls_x509.c
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/gnutls_x509.c,v
retrieving revision 2.151
diff -u -w -r2.151 gnutls_x509.c
--- lib/gnutls_x509.c   5 Oct 2004 19:23:32 -0000       2.151
+++ lib/gnutls_x509.c   20 Oct 2004 22:45:06 -0000
@@ -1321,6 +1321,7 @@
     }
 
     for (i = 0; i < ca_list_size; i++) {
+       gnutls_x509_crt_init(&res->x509_ca_list[i + res->x509_ncas]);
        ret = _gnutls_x509_crt_cpy(res->x509_ca_list[i + res->x509_ncas],
                                   ca_list[i]);
        if (ret < 0) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]