[git] GnuPG - branch, master, updated. gnupg-2.2.7-209-gf80346f

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Sep 10 06:58:34 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, master has been updated
       via  f80346f42df4bdc7d0a9741c3922129aceae4f81 (commit)
      from  adce73b86fd49d5bbb8884231a26cc7533d400e2 (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 f80346f42df4bdc7d0a9741c3922129aceae4f81
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.
    
    --
    
    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 02c9b49..8f52f7f 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -878,9 +878,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