[gnutls-devel] GnuTLS | fix invalid unsigned arithmetic. (!1364)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Nov 30 17:10:32 CET 2020




Daiki Ueno started a new discussion on lib/x509/x509_dn.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1364#note_457262256

>  
>  	/* remove spaces from the end */
>  	while(val->size > 0 && c_isspace(val->data[val->size-1])) {
> -		if (val->size-2 > 0 && val->data[val->size-2] == '\\')
> +		if (val->size > 2 && val->data[val->size-2] == '\\')

Not your fault, but I wonder if this logic works when the '\\' appears at the beginning of the data (i.e., shouldn't `val->size > 2` be `val->size > 1`?).

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1364#note_457262256
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/20201130/9c3e0f49/attachment.html>


More information about the Gnutls-devel mailing list