[git] GnuPG - branch, master, updated. gnupg-2.1.9-204-g9c34711

by Justus Winter cvs at cvs.gnupg.org
Tue Dec 1 13:33:36 CET 2015


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  9c34711539fc2c34aea8da0fd49ae6aa28991518 (commit)
      from  9f4f77bc4b8bf17010796fe3c2d23024047154ea (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 9c34711539fc2c34aea8da0fd49ae6aa28991518
Author: Justus Winter <justus at g10code.com>
Date:   Tue Dec 1 13:24:38 2015 +0100

    dirmngr: Improve error handling.
    
    * dirmngr/dns-stuff.c (getsrv): Avoid looking at 'header' before
    checking for errors, but silently ignore errors when looking up SRV
    records.
    --
    This is a follow-up to 946faaff.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index b3ad9bc..1bf6cfc 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -1086,10 +1086,9 @@ getsrv (const char *name,struct srventry **list)
       return -1;
 
     r = res_query (name, C_IN, T_SRV, answer, sizeof answer);
-    if (header->rcode != NOERROR || !(count=ntohs (header->ancount)))
+    if (r < sizeof (HEADER) || r > sizeof answer
+        || header->rcode != NOERROR || !(count=ntohs (header->ancount)))
       return 0; /* Error or no record found.  */
-    if (r < sizeof (HEADER) || r > sizeof answer)
-      return -1;
 
     emsg = &answer[r];
     pt = &answer[sizeof(HEADER)];

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

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


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




More information about the Gnupg-commits mailing list