[gnutls-devel] GnuTLS | tools: suppress ctime() error from lgtm warnings (!994)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Fri May 10 22:19:59 CEST 2019
Tim Rühsen commented on a discussion on src/certtool.c: https://gitlab.com/gnutls/gnutls/merge_requests/994#note_168872621
>
> if (ca_crt && (secs > gnutls_x509_crt_get_expiration_time(ca_crt))) {
> time_t exp = gnutls_x509_crt_get_expiration_time(ca_crt);
> - fprintf(stderr, "\nExpiration time: %s", ctime(&secs));
> - fprintf(stderr, "CA expiration time: %s", ctime(&exp));
> + fprintf(stderr, "\nExpiration time: %s", ctime(&secs)); //lgtm [cpp/potentially-dangerous-function]
@nmav Fun fact: Just randomly detected ctime() in multi-threaded code in Wget2, copied long time ago from gnutls-cli. So much to copy&paste stuff ;-)
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/994#note_168872621
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/20190510/52262be2/attachment.html>
More information about the Gnutls-devel
mailing list