[git] GnuPG - branch, master, updated. gnupg-2.1.11-7-g3d952a2

by Werner Koch cvs at cvs.gnupg.org
Wed Jan 27 14:36:35 CET 2016


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 GNU Privacy Guard".

The branch, master has been updated
       via  3d952a2fe5da9d84c20d3debdcc1e425b08781c6 (commit)
      from  1b90b52a56b4f808ad29a7ef79aeafc03c7424b4 (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 3d952a2fe5da9d84c20d3debdcc1e425b08781c6
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jan 27 14:31:13 2016 +0100

    scd: Fix size_t/int mismatch in libusb
    
    * scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to
    int.
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 4d83b1f..87cec32 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -1952,7 +1952,7 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
          int no_debug)
 {
   int rc;
-  size_t msglen;
+  int msglen;
   int eagain_retries = 0;
 
   /* Fixme: The next line for the current Valgrind without support
@@ -1973,6 +1973,8 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
             }
           return CCID_DRIVER_ERR_CARD_IO_ERROR;
         }
+      if (msglen < 0)
+        return CCID_DRIVER_ERR_INV_VALUE;  /* Faulty libusb.  */
       *nread = msglen;
     }
   else
@@ -2081,7 +2083,7 @@ abort_cmd (ccid_driver_t handle, int seqno)
   int rc;
   char dummybuf[8];
   unsigned char msg[100];
-  size_t msglen;
+  int msglen;
 
   if (!handle->idev)
     {
@@ -2252,7 +2254,7 @@ ccid_poll (ccid_driver_t handle)
 {
   int rc;
   unsigned char msg[10];
-  size_t msglen;
+  int msglen;
   int i, j;
 
   if (handle->idev)

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

Summary of changes:
 scd/ccid-driver.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list