summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/crm.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-07-14 16:18:37 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-07-14 16:36:18 -0700
commit05b8b866993b957f5fd575846cf8ea3035e60f7e (patch)
tree7d25217ee1f4c409cb217c52a6bd152dda675b8a /lisp/emacs-lisp/crm.el
parent8b64a80a56c0e15d3313a45022ae60b33dbb4bff (diff)
downloademacs-05b8b866993b957f5fd575846cf8ea3035e60f7e.tar.gz
emacs-05b8b866993b957f5fd575846cf8ea3035e60f7e.tar.bz2
emacs-05b8b866993b957f5fd575846cf8ea3035e60f7e.zip
GnuTLS integer-overflow and style fixes
This tweaks the recently-added GnuTLS improvements so that they avoid some integer-overflow problems and follow typical Emacs style a bit better. * configure.ac (HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD) (HAVE_GNUTLS3_CIPHER): Use AC_CACHE_CHECK so that the configure-time results are displayed. * src/fns.c (extract_data_from_object): Return char *, not char const *, since one gnutls caller wants a non-const pointer. Use CONSP rather than !NILP when testing for conses. Use CAR_SAFE instead of rolling our own code. Prefer signed types to unsigned when either will do. Report problems for lengths out of range, instead of silently mishandling them. * src/gnutls.c (emacs_gnutls_strerror): New function, to simplify callers. All callers of gnutls_sterror changed. (Fgnutls_boot): Check for integers out of range rather than silently truncating them. (gnutls_symmetric_aead): Check for integer overflow in size calculations. (gnutls_symmetric_aead, Fgnutls_macs, Fgnutls_digests): Prefer signed to unsigned integers where either will do. (gnutls_symmetric_aead, gnutls_symmetric): Work even if ptrdiff_t is wider than ‘long’. (gnutls_symmetric, Fgnutls_hash_mac, Fgnutls_hash_digest): Check for integer overflow in algorithm selection.
Diffstat (limited to 'lisp/emacs-lisp/crm.el')
0 files changed, 0 insertions, 0 deletions