[git] KSBA - branch, master, updated. libksba-1.3.0-12-g5b79ad3

by Werner Koch cvs at cvs.gnupg.org
Tue Apr 15 22:12:04 CEST 2014


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 "KSBA is a library to access X.509 certificates and CMS data.".

The branch, master has been updated
       via  5b79ad34ea2d7a86cfe465c81ff6bcd7fc1c06fc (commit)
       via  6fd166870237d5b913fb59cb2a4356fed1734efa (commit)
      from  f73e671406eefa96aba98f609cb68a9caae6bb7a (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 5b79ad34ea2d7a86cfe465c81ff6bcd7fc1c06fc
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Apr 15 16:40:48 2014 +0200

    tests: Fix warning about unused var.
    
    * tests/t-dnparser.c (main): Drop unneeded var INPUTLEN.

diff --git a/tests/t-dnparser.c b/tests/t-dnparser.c
index 2457767..c8d4b0d 100644
--- a/tests/t-dnparser.c
+++ b/tests/t-dnparser.c
@@ -133,14 +133,13 @@ int
 main (int argc, char **argv)
 {
   char inputbuf[4096];
-  int inputlen;
   unsigned char *buf;
   size_t len;
   gpg_error_t err;
 
   if (argc == 2 && !strcmp (argv[1], "--to-str") )
     { /* Read the DER encoded DN from stdin write the string to stdout */
-      inputlen = fread (inputbuf, 1, sizeof inputbuf, stdin);
+      fread (inputbuf, 1, sizeof inputbuf, stdin);
       if (!feof (stdin))
         fail ("read error or input too large");
 
@@ -149,7 +148,7 @@ main (int argc, char **argv)
     }
   else if (argc == 2 && !strcmp (argv[1], "--to-der") )
     { /* Read the String from stdin write the DER encoding to stdout */
-      inputlen = fread (inputbuf, 1, sizeof inputbuf, stdin);
+      fread (inputbuf, 1, sizeof inputbuf, stdin);
       if (!feof (stdin))
         fail ("read error or input too large");
 

commit 6fd166870237d5b913fb59cb2a4356fed1734efa
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Apr 15 16:40:48 2014 +0200

    Fix possible segv if NULL is passed as cert.
    
    * src/cert.c (ksba_cert_get_digest_algo): Fix !cert case.
    --
    
    Found by Hans-Christoph Steiner with cppcheck.

diff --git a/src/cert.c b/src/cert.c
index 9ce7ea7..7f19dc1 100644
--- a/src/cert.c
+++ b/src/cert.c
@@ -443,10 +443,8 @@ ksba_cert_get_digest_algo (ksba_cert_t cert)
   size_t nread;
 
   if (!cert)
-    {
-       cert->last_error = gpg_error (GPG_ERR_INV_VALUE);
-       return NULL;
-    }
+    return NULL;  /* Ooops (can't set cert->last_error :-().  */
+
   if (!cert->initialized)
     {
        cert->last_error = gpg_error (GPG_ERR_NO_DATA);

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

Summary of changes:
 src/cert.c         |    6 ++----
 tests/t-dnparser.c |    5 ++---
 2 files changed, 4 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
KSBA is a library to access X.509 certificates and CMS data.
http://git.gnupg.org




More information about the Gnupg-commits mailing list