[git] Pinentry - branch, master, updated. pinentry-0.9.5-13-g1532bf3

by Neal H. Walfield cvs at cvs.gnupg.org
Tue Aug 11 14:29:50 CEST 2015


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 "The standard pinentry collection".

The branch, master has been updated
       via  1532bf3fa57f624c80ea1e9f958d88fedc377e68 (commit)
       via  ffd37b673b3cbe05fac037ac02c1424a76772b3f (commit)
      from  abb59f50abf698ff1e56490fb39bcc98c26ab44b (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 1532bf3fa57f624c80ea1e9f958d88fedc377e68
Author: Neal H. Walfield <neal at gnu.org>
Date:   Tue Aug 11 14:26:26 2015 +0200

    tty: Correctly implement the repeat passphrase functionality.
    
    * tty/pinentry-tty.c (password): If the user repeated the passphrase
    and they matched, then set PINENTRY->REPEAT_OKAY.

diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c
index 4315430..edec16f 100644
--- a/tty/pinentry-tty.c
+++ b/tty/pinentry-tty.c
@@ -377,7 +377,10 @@ password (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
 	    }
 
 	  if (strcmp (passphrase, passphrase2) == 0)
-	    done = 1;
+	    {
+	      pinentry->repeat_okay = 1;
+	      done = 1;
+	    }
 	  else
 	    fprintf (ttyfo, "*** %s%s%s ***\n",
 		     ALERT_START,

commit ffd37b673b3cbe05fac037ac02c1424a76772b3f
Author: Neal H. Walfield <neal at gnu.org>
Date:   Tue Aug 11 14:25:05 2015 +0200

    tty: Fix buffer resizing bug.
    
    * tty/pinentry-tty.c (read_password): Fix buffer resizing bug.

diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c
index 22713eb..4315430 100644
--- a/tty/pinentry-tty.c
+++ b/tty/pinentry-tty.c
@@ -246,6 +246,8 @@ read_password (FILE *ttyfi, FILE *ttyfo)
   int count = 0;
   char *buffer;
 
+  (void) ttyfo;
+
   if (cbreak (fileno (ttyfi)) == -1)
     {
       int err = errno;
@@ -267,13 +269,15 @@ read_password (FILE *ttyfi, FILE *ttyfo)
 	   1 and not len so that we always have space for the NUL
 	   character.  */
 	{
-	  char *tmp = secmem_realloc (buffer, 2 * len);
+	  int new_len = 2 * len;
+	  char *tmp = secmem_realloc (buffer, new_len);
 	  if (! tmp)
 	    {
 	      secmem_free (tmp);
 	      return NULL;
 	    }
 	  buffer = tmp;
+	  len = new_len;
 	}
 
       c = fgetc (ttyfi);

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

Summary of changes:
 tty/pinentry-tty.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The standard pinentry collection
http://git.gnupg.org




More information about the Gnupg-commits mailing list