[gnutls-devel] GnuTLS | trust: make filesystem path construction flexible (!1493)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Dec 25 12:06:24 CET 2022




Tim Rühsen started a new discussion on lib/pathbuf.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_1220614559

> +	len = buffer->len;
> +
> +	if (!INT_ADD_OK(len, to_add, &len)) {
> +		return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
> +	}
> +
> +	/* NUL terminator.  */
> +	if (!INT_ADD_OK(len, 1, &len)) {
> +		return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
> +	}
> +
> +	if (len <= buffer->cap) {
> +		return 0;
> +	}
> +
> +	if (!INT_MULTIPLY_OK(len, 2, &cap)) {

Btw, the fedora-static-analyzer runs since 83 minutes, hanging in cppcheck. Last message is
```
'sizeofwithnumericparameter:lib/pathbuf.c:52,warning,Suspicious usage of 'sizeof' with a numeric constant as parameter.'
```
Maybe you take a look at this, not sure what it means =)

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_1220614559
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/20221225/53bf0024/attachment-0001.html>


More information about the Gnutls-devel mailing list