[gnutls-dev] [PATCH] certificates not initialised in
gnutls_certificate_set_x509_trust
Aleix Conchillo Flaque
aleix at member.fsf.org
Thu Oct 21 00:51:07 CEST 2004
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
-------------- next part --------------
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) {
More information about the Gnutls-dev
mailing list