[gnutls-devel] GnuTLS | Fix memleak in 'iov_store_grow' (!1277)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Jun 5 09:05:36 CEST 2020




Daiki Ueno started a new discussion on lib/crypto-api.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1277#note_355871837

>  		s->data = gnutls_realloc(s->data, s->size);
>  		if (s->data == NULL)
>  			return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
> -		s->allocated = 1;
>  	} else {
>  		void *data = s->data;
>  		size_t size = s->size + length;
>  		s->data = gnutls_malloc(size);

Again, an issue in the original code, but we should check `s->data != NULL`.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1277#note_355871837
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/20200605/42fab989/attachment.html>


More information about the Gnutls-devel mailing list