[gnutls-devel] GnuTLS | Datum.c cleanup (!1002)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue May 28 16:49:18 CEST 2019

I've amended my previous patch, to avoid the `assert()`.

> `_gnutls_set_strdatum` also allows `data == NULL` as long as the `data_size` argument is 0.

I'll comment inline.

> `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.

My concern was a function calling `set()`, then acting assuming the value is initialized to either `NULL` or something else irrespective of failure or success.

> 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.

Thank you for that.

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1002#note_175390188
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/23f46d43/attachment-0001.html>

More information about the Gnutls-devel mailing list