[git] GnuPG - branch, master, updated. gnupg-2.1.16-16-g5c2db9d

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Nov 22 12:59:09 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  5c2db9dedfe9dbb14ffec24751ca23a69cead94e (commit)
      from  a3b258d1d15953816e0567511ecc527a4ccdd626 (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 5c2db9dedfe9dbb14ffec24751ca23a69cead94e
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Nov 22 20:53:57 2016 +0900

    scd: Fix receive buffer size.
    
    * scd/apdu.c (send_le): Fix the size, adding two for status
    bytes to Le.
    
    --
    
    This is long standing bug.  So far, Le was not exact value.
    Since forthcoming change will introduce exact value of expected length
    of response data, this change is needed.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/scd/apdu.c b/scd/apdu.c
index 54f3b30..b32fe80 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -3757,8 +3757,9 @@ send_le (int slot, int class, int ins, int p0, int p1,
 
   if (use_extended_length && (le > 256 || le < 0))
     {
-      result_buffer_size = le < 0? 4096 : le;
-      result_buffer = xtrymalloc (result_buffer_size + 10);
+      /* Two more bytes are needed for status bytes.  */
+      result_buffer_size = le < 0? 4096 : (le + 2);
+      result_buffer = xtrymalloc (result_buffer_size);
       if (!result_buffer)
         {
           xfree (apdu_buffer);

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

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


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




More information about the Gnupg-commits mailing list