[gnutls-devel] GnuTLS | Fix gnutls_pkcs11_token_get_info for short output buffers and fix a memleak (!827)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Sun Dec 2 09:47:14 CET 2018
Nikos Mavrogiannopoulos commented on a discussion on lib/pkcs11.c:
> len = p11_kit_space_strlen(str, str_max);
>
> if (len + 1 > *output_size) {
> - *output_size = len + 1;
The rule in such functions is to return `full_size+1` when returning the short memory buffer error, and the `full_size` when returning the actual data. Is that missing from the function you mention? Is there something we should improve in the documentation?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/827#note_121621969
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/20181202/c0f5a4c9/attachment.html>
More information about the Gnutls-devel
mailing list