[gnutls-devel] GnuTLS | Add check for memory allocation APIs to avoid NULL pointer dereference (!2006)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Aug 7 20:39:59 CEST 2025




Jiasheng Jiang commented on a discussion on tests/rehandshake-switch-srp-id.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2006#note_2676183758

 >  		printf("srp: username %s\n", username);
 >  
 >  	generator->data = gnutls_malloc(1);
 > +	if (generator->data == NULL) {
 > +		fail("gnutls_malloc failed\n");
 > +		return GNUTLS_E_MEMORY_ERROR;

I have fixed all the above issues.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2006#note_2676183758
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/20250807/f94fefb2/attachment.html>


More information about the Gnutls-devel mailing list