|
From: | Glenn Morris |
Subject: | Re: master 583995c: GnuTLS HMAC and symmetric cipher support |
Date: | Mon, 17 Jul 2017 18:14:42 -0400 |
User-agent: | Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Paul Eggert wrote: > Glenn Morris wrote: > >> Seems a bit like a happy accident?): > > It's not an accident, as every valid cipher etc. has a name. > >> 1. Fgnutls_ciphers. Can intern NULL and crash. >> const gnutls_cipher_algorithm_t *gciphers = gnutls_cipher_list (); >> for (ptrdiff_t pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++) >> { >> gnutls_cipher_algorithm_t gca = gciphers[pos]; >> Lisp_Object cipher_symbol = intern (gnutls_cipher_get_name (gca)); >> ... >> } > > It's OK, as every cipher other than GNUTLS_CIPHER_NULL has a non-NULL name. But it isn't OK. That's what this thread is about. GNUTLS_CIPHER_UNKNOWN apparently has a NULL name.
[Prev in Thread] | Current Thread | [Next in Thread] |