[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:22 CET 2022
Tim Rühsen started a new discussion on lib/pathbuf.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_1220510193
> + char *p;
> + int ret;
> +
> + memset(buffer, 0, sizeof(*buffer));
> + buffer->cap = sizeof(buffer->base);
> + buffer->ptr = buffer->base;
> +
> + len = strlen(base);
> +
> + ret = pathbuf_reserve(buffer, len);
> + if (ret < 0) {
> + return ret;
> + }
> +
> + p = stpcpy(buffer->ptr, base);
> + *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_1220510193
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/3b4fbd7b/attachment-0001.html>
More information about the Gnutls-devel
mailing list