diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-10-24 14:22:29 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-10-24 14:22:29 +0000 |
commit | eef91967446429fb84b0c0663d4647bf8a31c471 (patch) | |
tree | 1a37efb2236b47377ec09aab42ab02205155b384 /lib | |
parent | 3853c22ec5e9f47fd61f764deceec464abe9e94d (diff) | |
download | gnutls-eef91967446429fb84b0c0663d4647bf8a31c471.tar.gz |
(gnutls_certificate_set_x509_trust): Fix memory bug, tiny patch by
Aleix Conchillo Flaque <aleix@member.fsf.org>.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gnutls_x509.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index f5d59e2958..5fa0e5e2dc 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2002,2003 Nikos Mavroyanopoulos * Copyright (C) 2004 Free Software Foundation + * Copyright (C) 2002,2003 Nikos Mavroyanopoulos * * This file is part of GNUTLS. * @@ -1321,7 +1321,8 @@ int gnutls_certificate_set_x509_trust(gnutls_certificate_credentials_t res, } for (i = 0; i < ca_list_size; i++) { - ret = _gnutls_x509_crt_cpy(res->x509_ca_list[i + res->x509_ncas], + 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) { gnutls_assert(); |