[gnutls-devel] GnuTLS | trust: make filesystem path construction flexible (!1493)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Sat Dec 24 14:25:42 CET 2022
Tim Rühsen started a new discussion on lib/pathbuf.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_1220510216
> +
> + len = strlen(component);
> +
> + /* path separator */
> + if (!INT_ADD_OK(len, 1, &len)) {
> + return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
> + }
> +
> + ret = pathbuf_reserve(buffer, len);
> + if (ret < 0) {
> + return ret;
> + }
> +
> + p = stpcpy(&buffer->ptr[buffer->len], "/");
> + p = stpcpy(p, component);
> + *p = '\0';
stpcpy already copies the trailing \0, so this line isn't needed.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_1220510216
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/20221224/e33bd2fc/attachment.html>
More information about the Gnutls-devel
mailing list