[gnutls-devel] GnuTLS | Datum.c cleanup (!1002)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Tue May 28 15:28:27 CEST 2019
> If there is code which relied on the behavior of always initializing the output, we may be adding new memory safety issues.
All calls to `_gnutls_set_datum` and `_gnutls_set_strdatum` now check their return value and fail out on error. I also manually skimmed through the places where we call one of those functions. LGTM to me.
`warn_unused_result` immediately warns us if we introduce an unchecked call in the future.
`nonnull((1))` triggers an error on clang's build-scan if the first argument could be NULL.
`_gnutls_set_strdatum` also allows `data == NULL` as long as the `data_size` argument is 0.
So I would say, we are as save as we can be.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1002#note_175346099
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/20190528/74c6d323/attachment.html>
More information about the Gnutls-devel
mailing list