gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_7_a-25-g1b7


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_7_a-25-g1b7ea88
Date: Mon, 01 Aug 2011 16:59:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=1b7ea889e87388008001efb8b0b38180da276a94

The branch, gnutls_2_12_x has been updated
       via  1b7ea889e87388008001efb8b0b38180da276a94 (commit)
       via  89a1f28d397d1bcccb8a0f4a2fdf9cfebecb983e (commit)
      from  e336851c74eea10c47f152aae98f742b5bd4f91b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1b7ea889e87388008001efb8b0b38180da276a94
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon Aug 1 18:59:04 2011 +0200

    check the output of fgets.

commit 89a1f28d397d1bcccb8a0f4a2fdf9cfebecb983e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon Aug 1 18:22:30 2011 +0200

    corrected uninitialized warning.

-----------------------------------------------------------------------

Summary of changes:
 lib/pkcs11.c    |    8 ++------
 src/p11common.c |    4 +++-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/pkcs11.c b/lib/pkcs11.c
index f5e4965..b26abe1 100644
--- a/lib/pkcs11.c
+++ b/lib/pkcs11.c
@@ -529,7 +529,7 @@ initialize_automatic_legacy (const char *configfile)
 int
 gnutls_pkcs11_init (unsigned int flags, const char *deprecated_config_file)
 {
-  int ret;
+  int ret = 0;
 
   if (init != 0)
     {
@@ -538,11 +538,7 @@ gnutls_pkcs11_init (unsigned int flags, const char 
*deprecated_config_file)
     }
   init++;
 
-  if (flags == GNUTLS_PKCS11_FLAG_MANUAL)
-    {
-      ret = 0;
-    }
-  else
+  if (flags == GNUTLS_PKCS11_FLAG_AUTO)
     {
       if (deprecated_config_file == NULL)
         ret = initialize_automatic_p11_kit ();
diff --git a/src/p11common.c b/src/p11common.c
index 1ef7c9c..579d489 100644
--- a/src/p11common.c
+++ b/src/p11common.c
@@ -102,6 +102,7 @@ static int
 token_callback (void *user, const char *label, const unsigned retry)
 {
   char buf[32];
+  char *p;
 
   if (retry > 0)
     {
@@ -109,7 +110,8 @@ token_callback (void *user, const char *label, const 
unsigned retry)
       return -1;
     }
   printf ("Please insert token '%s' in slot and press enter\n", label);
-  fgets (buf, sizeof (buf), stdin);
+  p = fgets (buf, sizeof (buf), stdin);
+  if (p==NULL) return -1;
 
   return 0;
 }


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]