From d69621ccc6e29c793efd767c5595e2b2413350f4 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 24 Apr 2012 10:35:02 +0200 Subject: [PATCH] src/gnutls.c: Fix previous change. (init_gnutls_functions): Protect against (unlikely) manipulation of :loaded-from data. --- src/ChangeLog | 5 +++++ src/gnutls.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 73e54c21a60..30ba6d6c4a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-04-24 Juanma Barranquero + + * gnutls.c (init_gnutls_functions): Protect against (unlikely) + manipulation of :loaded-from data. + 2012-04-23 Juanma Barranquero * gnutls.c (init_gnutls_functions): The value of :loaded-from is diff --git a/src/gnutls.c b/src/gnutls.c index 09268aee397..cf471314849 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -200,8 +200,12 @@ init_gnutls_functions (Lisp_Object libraries) max_log_level = global_gnutls_log_level; - GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", - SDATA (XCAR (Fget (Qgnutls_dll, QCloaded_from)))); + { + Lisp_Object name = CAR_SAFE (Fget (Qgnutls_dll, QCloaded_from)); + GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", + STRINGP (name) ? (const char *) SDATA (name) : "unknown"); + } + return 1; } -- 2.11.4.GIT