[gnutls-devel] GnuTLS | src/pkcs11.c: Add check for gnutls_malloc and gnutls_strdup (!2002)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Aug 4 02:19:49 CEST 2025




Jiasheng Jiang commented on a discussion on src/pkcs11.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2002#note_2665626370

 >  			objurl = gnutls_malloc(strlen(output) + strlen(vendor) +
 >  					       1);
 > +			if (objurl == NULL) {
 > +				fprintf(stderr, "memory error\n");
 > +				gnutls_free(output);
 > +				continue;
 > +			}
 > +
 >  			strcpy(objurl, output);
 >  			strcat(objurl, vendor);
 >  		} else {
 >  			objurl = gnutls_strdup(output);
 > +			if (objurl == NULL) {
 > +				fprintf(stderr, "memory error\n");
 > +				gnutls_free(output);
 > +				continue;

Thank you. I have fixed it.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2002#note_2665626370
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/20250804/7287f3e0/attachment-0001.html>


More information about the Gnutls-devel mailing list