[git] GnuPG - branch, master, updated. gnupg-2.1.11-94-ga68ca5a9

by Justus Winter cvs at cvs.gnupg.org
Mon Mar 7 14:38:20 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  a68ca5a90457ac97eee4efd7fdea596d27c54697 (commit)
      from  7a32f87cccddb40521bfdd4eb2d0dc9c88fb3fe5 (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 a68ca5a90457ac97eee4efd7fdea596d27c54697
Author: Justus Winter <justus at g10code.com>
Date:   Mon Mar 7 14:25:38 2016 +0100

    kbx: Avoid undefined behavior.
    
    * kbx/keybox-file.c (_keybox_read_blob2): Cast to unsigned int before
    shifting.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/kbx/keybox-file.c b/kbx/keybox-file.c
index eaf7565..59dfe0c 100644
--- a/kbx/keybox-file.c
+++ b/kbx/keybox-file.c
@@ -77,7 +77,7 @@ _keybox_read_blob2 (KEYBOXBLOB *r_blob, FILE *fp, int *skipped_deleted)
       return gpg_error_from_syserror ();
     }
 
-  imagelen = (c1 << 24) | (c2 << 16) | (c3 << 8 ) | c4;
+  imagelen = ((unsigned int) c1 << 24) | (c2 << 16) | (c3 << 8 ) | c4;
   if (imagelen < 5)
     return gpg_error (GPG_ERR_TOO_SHORT);
 

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

Summary of changes:
 kbx/keybox-file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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




More information about the Gnupg-commits mailing list