[git] GnuPG - branch, master, updated. gnupg-2.1.11-31-gea9cfcf

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Feb 15 03:08:02 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  ea9cfcfbf76de232221f31787c53d5f46361a9f0 (commit)
       via  6fbe12a51e8fe2649ffe5a8a02aa93026a8f02cd (commit)
      from  772f6b29b557e4e80353bc48e34d7214be895f33 (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 ea9cfcfbf76de232221f31787c53d5f46361a9f0
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Feb 15 11:05:29 2016 +0900

    common, g10: Fix indentation to silence GCC-6.
    
    * common/iobuf.c (iobuf_ioctl): Fix.
    * g10/encrypt.c (encrypt_filter): Likewise.
    * g10/keyring.c (prepare_search): Likewise.
    
    --
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/common/iobuf.c b/common/iobuf.c
index 00d1b8d..f5bbfb2 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -1515,11 +1515,11 @@ iobuf_ioctl (iobuf_t a, iobuf_ioctl_t cmd, int intval, void *ptrval)
         log_debug ("iobuf-*.*: ioctl '%s' fsync\n",
                    ptrval? (const char*)ptrval:"<null>");
 
-	if (!a && !intval && ptrval)
-	  {
-	    return fd_cache_synchronize (ptrval);
-	  }
-      }
+      if (!a && !intval && ptrval)
+        {
+          return fd_cache_synchronize (ptrval);
+        }
+    }
 
 
   return -1;
diff --git a/g10/encrypt.c b/g10/encrypt.c
index 46b0be0..49ec65b 100644
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -825,18 +825,18 @@ encrypt_filter (void *opaque, int control,
           if (rc)
             return rc;
 
-	    if(efx->symkey_s2k && efx->symkey_dek)
-	      {
-		rc=write_symkey_enc(efx->symkey_s2k,efx->symkey_dek,
-				    efx->cfx.dek,a);
-		if(rc)
-		  return rc;
-	      }
+          if(efx->symkey_s2k && efx->symkey_dek)
+            {
+              rc=write_symkey_enc(efx->symkey_s2k,efx->symkey_dek,
+                                  efx->cfx.dek,a);
+              if(rc)
+                return rc;
+            }
 
-	    iobuf_push_filter (a, cipher_filter, &efx->cfx);
+          iobuf_push_filter (a, cipher_filter, &efx->cfx);
 
-	    efx->header_okay = 1;
-	}
+          efx->header_okay = 1;
+        }
       rc = iobuf_write (a, buf, size);
 
     }
diff --git a/g10/keyring.c b/g10/keyring.c
index 7c7b355..ee079a9 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -749,8 +749,8 @@ prepare_search (KEYRING_HANDLE hd)
         if (!hd->current.kr) {
           if (DBG_LOOKUP)
             log_debug ("%s: keyring not available!\n", __func__);
-            hd->current.eof = 1;
-            return -1; /* keyring not available */
+          hd->current.eof = 1;
+          return -1; /* keyring not available */
         }
         assert (!hd->current.iobuf);
     }

commit 6fbe12a51e8fe2649ffe5a8a02aa93026a8f02cd
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Feb 15 10:55:34 2016 +0900

    dirmngr: fix for memory alignment.
    
    * dirmngr/dns-stuff.c (get_dns_cert): Cast through void *.
    (getsrv, get_dns_cname): Make sure it's aligned for HEADER.
    
    --
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 40c71f3..191719e 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -821,8 +821,8 @@ get_dns_cert (const char *name, int want_certtype,
                  answer, 65536);
   /* Not too big, not too small, no errors and at least 1 answer. */
   if (r >= sizeof (HEADER) && r <= 65536
-      && (((HEADER *) answer)->rcode) == NOERROR
-      && (count = ntohs (((HEADER *) answer)->ancount)))
+      && (((HEADER *)(void *) answer)->rcode) == NOERROR
+      && (count = ntohs (((HEADER *)(void *) answer)->ancount)))
     {
       int rc;
       unsigned char *pt, *emsg;
@@ -1081,8 +1081,12 @@ getsrv (const char *name,struct srventry **list)
   }
 #else /*!USE_ADNS*/
   {
-    unsigned char answer[2048];
-    HEADER *header = (HEADER *)answer;
+    union {
+      unsigned char ans[2048];
+      HEADER header[1];
+    } res;
+    unsigned char *answer = res.ans;
+    HEADER *header = res.header;
     unsigned char *pt, *emsg;
     int r;
     u16 dlen;
@@ -1305,8 +1309,12 @@ get_dns_cname (const char *name, char **r_cname)
   }
 #else /*!USE_ADNS*/
   {
-    unsigned char answer[2048];
-    HEADER *header = (HEADER *)answer;
+    union {
+      unsigned char ans[2048];
+      HEADER header[1];
+    } res;
+    unsigned char *answer = res.ans;
+    HEADER *header = res.header;
     unsigned char *pt, *emsg;
     int r;
     char *cname;

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

Summary of changes:
 common/iobuf.c      | 10 +++++-----
 dirmngr/dns-stuff.c | 20 ++++++++++++++------
 g10/encrypt.c       | 20 ++++++++++----------
 g10/keyring.c       |  4 ++--
 4 files changed, 31 insertions(+), 23 deletions(-)


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




More information about the Gnupg-commits mailing list