[gnutls-devel] GnuTLS | Allocate pathname on heap instead of on stack (!1493)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Fri Dec 10 12:55:53 CET 2021
Tim Rühsen started a new discussion on lib/fips.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_763228436
> }
> }
>
> hmac_size = hex_data_size(data.size);
>
> /* trim eventual newlines from the end of the data read from file */
> - while ((data.size > 0) && (data.data[data.size - 1] == '\n')) {
> + while (data.size > 0 && data.data[data.size - 1] == '\n') {
> data.data[data.size - 1] = 0;
> data.size--;
> }
>
> ret = gnutls_hex_decode(&data, hmac, &hmac_size);
> - gnutls_free(data.data);
> -
> + _gnutls_free_datum(&data);
`data` is freed in cleanup code a second time, so IMO you can remove this line.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_763228436
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/20211210/278a14cc/attachment-0001.html>
More information about the Gnutls-devel
mailing list