]> git.eshelyaron.com Git - emacs.git/commit
Port memory-full checking to GnuTLS 3.3
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 28 Dec 2014 07:44:25 +0000 (23:44 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 28 Dec 2014 07:45:46 +0000 (23:45 -0800)
commitb54f5721bfb6bf21cac5402cf34a8130e11bfb70
tree69b72a16ac4ad7522ef061870f85c95b1e60caac
parent433af0a06089885f5a57ef0f3e7d6283e8d51bd5
Port memory-full checking to GnuTLS 3.3

Instead of using gnutls_global_set_mem_functions, check every call
to a GnuTLS function that might return an indication of memory
exhaustion.  Suggested by Dmitry Antipov in:
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
* src/gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
(init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
(fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
All uses removed.
(check_memory_full): New function.
(emacs_gnutls_handshake, emacs_gnutls_handle_error)
(gnutls_make_error, Fgnutls_boot): Use it.
(emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
src/ChangeLog
src/gnutls.c