[gnutls-devel] GnuTLS | Fix issues with AGGRESSIVE_REALLOC (!1401)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Mar 10 17:28:35 CET 2021




Alexander Sosedkin started a new discussion on lib/str.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1401#note_526400066

>  
>  	unused = MEMSUB(dest->data, dest->allocd);
>  	dest->allocd =
> -	    gnutls_realloc_fast(dest->allocd, new_size);
> +	    gnutls_realloc_fast(dest->allocd, new_size + unused);
>  	if (dest->allocd == NULL) {
>  		gnutls_assert();
>  		return GNUTLS_E_MEMORY_ERROR;
>  	}
>  	dest->max_length = new_size;

`new_size` or `new_size + unused`?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1401#note_526400066
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/20210310/a0753063/attachment-0001.html>


More information about the Gnutls-devel mailing list