gnutls-devel
[Top][All Lists]
Advanced

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

Re: [gnutls-dev] Buglet in `gnutls_certificate_set_openpgp_key ()'


From: Simon Josefsson
Subject: Re: [gnutls-dev] Buglet in `gnutls_certificate_set_openpgp_key ()'
Date: Tue, 10 Apr 2007 11:57:17 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi,
>
> The patch below fixes a (funny) bug in
> `gnutls_certificate_set_openpgp_key ()'.

Hi!  Looks correct to me (the old code never worked at all, right?).
Installed.

Thanks,
Simon

> Thanks,
> Ludovic.
>
> --- orig/libextra/gnutls_openpgp.c
> +++ mod/libextra/gnutls_openpgp.c
> @@ -1257,7 +1257,13 @@ gnutls_certificate_set_openpgp_key (gnut
>        return GNUTLS_E_MEMORY_ERROR;
>      }
>  
> -  res->cert_list[res->ncerts] = NULL;        /* for realloc */
> +  res->cert_list[res->ncerts] = gnutls_calloc (1, sizeof (gnutls_cert));
> +  if (res->cert_list[res->ncerts] == NULL)
> +    {
> +      gnutls_assert ();
> +      return GNUTLS_E_MEMORY_ERROR;
> +    }
> +
>    res->cert_list_length[res->ncerts] = 1;
>  
>    ret = _gnutls_openpgp_key_to_gcert (res->cert_list[res->ncerts], key);
>
> _______________________________________________
> Gnutls-dev mailing list
> address@hidden
> http://lists.gnupg.org/mailman/listinfo/gnutls-dev



reply via email to

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