[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-5-g0383e7f

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Sep 10 06:59:43 CEST 2018


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, STABLE-BRANCH-2-2 has been updated
       via  0383e7fed7b2a45c7f0ae4c11415c6a9a3a3ddb7 (commit)
      from  213379debe5591dad6339aa95aa7282e0de620f9 (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 0383e7fed7b2a45c7f0ae4c11415c6a9a3a3ddb7
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Sep 10 13:44:47 2018 +0900

    common: Use iobuf_get_noeof to avoid undefined behaviors.
    
    * common/iobuf.c (block_filter): Use iobuf_get_noeof.
    
    --
    
    Cherry-pick from master commit of:
    	f80346f42df4bdc7d0a9741c3922129aceae4f81
    
    When singed integer has negative value, left shift computation is
    undefined in C.
    
    GnuPG-bug-id: 4093
    Reported-by: Philippe Antoine
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/common/iobuf.c b/common/iobuf.c
index 5a9fd7c..8de46f4 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -856,9 +856,9 @@ block_filter (void *opaque, int control, iobuf_t chain, byte * buffer,
 		    }
 		  else if (c == 255)
 		    {
-		      a->size = (size_t)iobuf_get (chain) << 24;
-		      a->size |= iobuf_get (chain) << 16;
-		      a->size |= iobuf_get (chain) << 8;
+		      a->size = iobuf_get_noeof (chain) << 24;
+		      a->size |= iobuf_get_noeof (chain) << 16;
+		      a->size |= iobuf_get_noeof (chain) << 8;
 		      if ((c = iobuf_get (chain)) == -1)
 			{
 			  log_error ("block_filter: invalid 4 byte length\n");

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

Summary of changes:
 common/iobuf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list