[gnutls-devel] GnuTLS | Verify that cert_list_size > 0 and cert_list != NULL (!1379)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Jan 31 12:49:34 CET 2021




Daiki Ueno commented on a discussion on lib/cert-cred-x509.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1379#note_497876940

>  				  int ca_list_size)
>  {
>  	int ret, i, j;
> -	gnutls_x509_crt_t *new_list = gnutls_malloc(ca_list_size * sizeof(gnutls_x509_crt_t));
> +	gnutls_x509_crt_t *new_list;
> +
> +	if (ca_list == NULL || ca_list_size < 1)
> +		return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
>  
> +	new_list = gnutls_malloc(ca_list_size * sizeof(gnutls_x509_crt_t));

Let's do that later.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1379#note_497876940
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210131/1d814e43/attachment-0001.html>


More information about the Gnutls-devel mailing list