[balsa] Dereference a gchar pointer to compare with '\0'



commit 62732720a1e11f40292648c21d4a4ac52d47047a
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jul 16 13:01:31 2017 -0400

    Dereference a gchar pointer to compare with '\0'
    
        * libbalsa/server.c (libbalsa_server_load_config): dereference
        server->cert_passphrase to compare with '\0'.

 ChangeLog         |    5 +++++
 libbalsa/server.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8c5e244..af59c90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-16  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * libbalsa/server.c (libbalsa_server_load_config): dereference
+       server->cert_passphrase.
+
 2017-07-15  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Do not use local variables that shadow other variables
diff --git a/libbalsa/server.c b/libbalsa/server.c
index be908d8..a3914c2 100644
--- a/libbalsa/server.c
+++ b/libbalsa/server.c
@@ -437,7 +437,7 @@ libbalsa_server_load_config(LibBalsaServer * server)
     server->client_cert = libbalsa_conf_get_bool("NeedClientCert=false");
     server->cert_file = libbalsa_conf_get_string("UserCertificateFile");
     server->cert_passphrase = libbalsa_conf_private_get_string("CertificatePassphrase");
-    if ((server->cert_passphrase != NULL) && (server->cert_passphrase != '\0')) {
+    if ((server->cert_passphrase != NULL) && (server->cert_passphrase[0] != '\0')) {
         gchar *tmp = libbalsa_rot(server->cert_passphrase);
 
         g_free(server->cert_passphrase);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]