[Pkg-gnutls-commits] r1049 - in /packages/gnutls26/branches/branch2.11.x/debian: changelog patches/17_sizeof_gnutls_openpgp_keyid_t.diff patches/18_ext_mod_iadef.diff patches/19_uninitializedvar.diff patches/20_access_freedmemory.diff patches/series

ametzler at users.alioth.debian.org ametzler at users.alioth.debian.org
Sun Mar 27 07:29:18 UTC 2011


Author: ametzler
Date: Sun Mar 27 07:29:16 2011
New Revision: 1049

URL: http://svn.debian.org/wsvn/pkg-gnutls/?sc=1&rev=1049
Log:
Pull bugfixes from upstream gnutls_2_12_x branch

Added:
    packages/gnutls26/branches/branch2.11.x/debian/patches/17_sizeof_gnutls_openpgp_keyid_t.diff
    packages/gnutls26/branches/branch2.11.x/debian/patches/18_ext_mod_iadef.diff
    packages/gnutls26/branches/branch2.11.x/debian/patches/19_uninitializedvar.diff
    packages/gnutls26/branches/branch2.11.x/debian/patches/20_access_freedmemory.diff
Modified:
    packages/gnutls26/branches/branch2.11.x/debian/changelog
    packages/gnutls26/branches/branch2.11.x/debian/patches/series

Modified: packages/gnutls26/branches/branch2.11.x/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls26/branches/branch2.11.x/debian/changelog?rev=1049&op=diff
==============================================================================
--- packages/gnutls26/branches/branch2.11.x/debian/changelog (original)
+++ packages/gnutls26/branches/branch2.11.x/debian/changelog Sun Mar 27 07:29:16 2011
@@ -1,9 +1,12 @@
 gnutls26 (2.12.0-1) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
-  * New upstream stable realease.
+  * New upstream stable release.
     + Drop superceded patches 17_goldhotfix.patch
       18_libgnutls-openssl_soname.diff.
+  * Pull a couple of post release fixes from upstream gnutls_2_12_x branch:
+    17_sizeof_gnutls_openpgp_keyid_t.diff 18_ext_mod_iadef.diff
+    19_uninitializedvar.diff 20_access_freedmemory.diff
 
  -- Andreas Metzler <ametzler at debian.org>  Fri, 11 Mar 2011 17:57:25 +0100
 

Added: packages/gnutls26/branches/branch2.11.x/debian/patches/17_sizeof_gnutls_openpgp_keyid_t.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls26/branches/branch2.11.x/debian/patches/17_sizeof_gnutls_openpgp_keyid_t.diff?rev=1049&op=file
==============================================================================
--- packages/gnutls26/branches/branch2.11.x/debian/patches/17_sizeof_gnutls_openpgp_keyid_t.diff (added)
+++ packages/gnutls26/branches/branch2.11.x/debian/patches/17_sizeof_gnutls_openpgp_keyid_t.diff Sun Mar 27 07:29:16 2011
@@ -1,0 +1,105 @@
+From 93dee00c4ece2ff287ef6c6e60d8a8d8c057dfbf Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
+Date: Fri, 25 Mar 2011 20:18:00 +0100
+Subject: [PATCH] Fix size of gnutls_openpgp_keyid_t by using the GNUTLS_OPENPGP_KEYID_SIZE definition.
+ Reported by Andreas Metzler.
+
+---
+ lib/includes/gnutls/openpgp.h |    3 ++-
+ lib/openpgp/gnutls_openpgp.c  |    6 +++---
+ lib/openpgp/pgp.c             |    4 ++--
+ lib/openpgp/privkey.c         |    4 ++--
+ 4 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/lib/includes/gnutls/openpgp.h b/lib/includes/gnutls/openpgp.h
+index 4b0d853..6dfa786 100644
+--- a/lib/includes/gnutls/openpgp.h
++++ b/lib/includes/gnutls/openpgp.h
+@@ -53,7 +53,8 @@ extern "C"
+     GNUTLS_OPENPGP_FMT_BASE64
+   } gnutls_openpgp_crt_fmt_t;
+ 
+-  typedef unsigned char gnutls_openpgp_keyid_t[8];
++#define GNUTLS_OPENPGP_KEYID_SIZE 8
++  typedef unsigned char gnutls_openpgp_keyid_t[GNUTLS_OPENPGP_KEYID_SIZE];
+ 
+ /* gnutls_openpgp_cert_t should be defined in gnutls.h
+  */
+diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/gnutls_openpgp.c
+index ba7cd27..5917447 100644
+--- a/lib/openpgp/gnutls_openpgp.c
++++ b/lib/openpgp/gnutls_openpgp.c
+@@ -321,7 +321,7 @@ gnutls_certificate_set_openpgp_key_file (gnutls_certificate_credentials_t res,
+ static int
+ get_keyid (gnutls_openpgp_keyid_t keyid, const char *str)
+ {
+-  size_t keyid_size = sizeof (keyid);
++  size_t keyid_size = GNUTLS_OPENPGP_KEYID_SIZE;
+ 
+   if (strlen (str) != 16)
+     {
+@@ -744,7 +744,7 @@ _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, gnutls_openpgp_crt_t cert)
+ 
+       _gnutls_debug_log
+         ("Importing Openpgp cert and using openpgp sub key: %s\n",
+-         _gnutls_bin2hex (keyid, sizeof (keyid), err_buf, sizeof (err_buf),
++         _gnutls_bin2hex (keyid, GNUTLS_OPENPGP_KEYID_SIZE, err_buf, sizeof (err_buf),
+                           NULL));
+ 
+       KEYID_IMPORT (kid32, keyid);
+@@ -762,7 +762,7 @@ _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, gnutls_openpgp_crt_t cert)
+       gnutls_openpgp_crt_get_subkey_usage (cert, idx, &gcert->key_usage);
+       gcert->use_subkey = 1;
+ 
+-      memcpy (gcert->subkey_id, keyid, sizeof (keyid));
++      memcpy (gcert->subkey_id, keyid, GNUTLS_OPENPGP_KEYID_SIZE);
+ 
+       ret =
+         _gnutls_openpgp_crt_get_mpis (cert, kid32, gcert->params,
+diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c
+index 229b69d..77a931d 100644
+--- a/lib/openpgp/pgp.c
++++ b/lib/openpgp/pgp.c
+@@ -1568,7 +1568,7 @@ gnutls_openpgp_crt_get_preferred_key_id (gnutls_openpgp_crt_t key,
+       return GNUTLS_E_INVALID_REQUEST;
+     }
+ 
+-  memcpy (keyid, key->preferred_keyid, sizeof (gnutls_openpgp_keyid_t));
++  memcpy (keyid, key->preferred_keyid, GNUTLS_OPENPGP_KEYID_SIZE);
+ 
+   return 0;
+ }
+@@ -1606,7 +1606,7 @@ gnutls_openpgp_crt_set_preferred_key_id (gnutls_openpgp_crt_t key,
+     }
+ 
+   key->preferred_set = 1;
+-  memcpy (key->preferred_keyid, keyid, sizeof (gnutls_openpgp_keyid_t));
++  memcpy (key->preferred_keyid, keyid, GNUTLS_OPENPGP_KEYID_SIZE);
+ 
+   return 0;
+ }
+diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c
+index 4b26a8c..7fef5ad 100644
+--- a/lib/openpgp/privkey.c
++++ b/lib/openpgp/privkey.c
+@@ -1186,7 +1186,7 @@ gnutls_openpgp_privkey_get_preferred_key_id (gnutls_openpgp_privkey_t key,
+       return GNUTLS_E_INVALID_REQUEST;
+     }
+ 
+-  memcpy (keyid, key->preferred_keyid, sizeof (gnutls_openpgp_keyid_t));
++  memcpy (keyid, key->preferred_keyid, GNUTLS_OPENPGP_KEYID_SIZE);
+ 
+   return 0;
+ }
+@@ -1224,7 +1224,7 @@ gnutls_openpgp_privkey_set_preferred_key_id (gnutls_openpgp_privkey_t key,
+     }
+ 
+   key->preferred_set = 1;
+-  memcpy (key->preferred_keyid, keyid, sizeof (gnutls_openpgp_keyid_t));
++  memcpy (key->preferred_keyid, keyid, GNUTLS_OPENPGP_KEYID_SIZE);
+ 
+   return 0;
+ }
+-- 
+1.7.2.5
+

Added: packages/gnutls26/branches/branch2.11.x/debian/patches/18_ext_mod_iadef.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls26/branches/branch2.11.x/debian/patches/18_ext_mod_iadef.diff?rev=1049&op=file
==============================================================================
--- packages/gnutls26/branches/branch2.11.x/debian/patches/18_ext_mod_iadef.diff (added)
+++ packages/gnutls26/branches/branch2.11.x/debian/patches/18_ext_mod_iadef.diff Sun Mar 27 07:29:16 2011
@@ -1,0 +1,39 @@
+From 504f2a10130b5c9592e3b570eab50dfcaa3d3456 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
+Date: Fri, 25 Mar 2011 20:23:35 +0100
+Subject: [PATCH 1/8] Define ext_mod_ia in gnutls_ia.c only.
+
+---
+ libextra/ext_inner_application.h |    2 +-
+ libextra/gnutls_ia.c             |    2 ++
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/libextra/ext_inner_application.h b/libextra/ext_inner_application.h
+index a137c08..c641a99 100644
+--- a/libextra/ext_inner_application.h
++++ b/libextra/ext_inner_application.h
+@@ -31,7 +31,7 @@
+ #define IA_ENABLE (1 << 3)
+ #define IA_ALLOW_SKIP (1 << 4)
+ 
+-extension_entry_st ext_mod_ia;
++extern extension_entry_st ext_mod_ia;
+ 
+ typedef struct
+ {
+diff --git a/libextra/gnutls_ia.c b/libextra/gnutls_ia.c
+index e692bde..12a049f 100644
+--- a/libextra/gnutls_ia.c
++++ b/libextra/gnutls_ia.c
+@@ -30,6 +30,8 @@
+ 
+ #define CHECKSUM_SIZE 12
+ 
++extension_entry_st ext_mod_ia;
++
+ struct gnutls_ia_client_credentials_st
+ {
+   gnutls_ia_avp_func avp_func;
+-- 
+1.7.2.5
+

Added: packages/gnutls26/branches/branch2.11.x/debian/patches/19_uninitializedvar.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls26/branches/branch2.11.x/debian/patches/19_uninitializedvar.diff?rev=1049&op=file
==============================================================================
--- packages/gnutls26/branches/branch2.11.x/debian/patches/19_uninitializedvar.diff (added)
+++ packages/gnutls26/branches/branch2.11.x/debian/patches/19_uninitializedvar.diff Sun Mar 27 07:29:16 2011
@@ -1,0 +1,25 @@
+From 24a7f63c4abb84786dec5d2eaeaa455b7bf24cb0 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
+Date: Fri, 25 Mar 2011 20:31:11 +0100
+Subject: [PATCH 2/8] Corrected uninitialized var deinitiation. Reported by Vitaly Kruglikov.
+
+---
+ lib/opencdk/verify.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/lib/opencdk/verify.c b/lib/opencdk/verify.c
+index 957eb98..397b3ed 100644
+--- a/lib/opencdk/verify.c
++++ b/lib/opencdk/verify.c
+@@ -179,6 +179,8 @@ file_verify_clearsign (cdk_ctx_t hd, const char *file, const char *output)
+   int err;
+   cdk_error_t rc;
+ 
++  memset(&md, 0, sizeof(md));
++
+   if (output)
+     {
+       rc = cdk_stream_create (output, &out);
+-- 
+1.7.2.5
+

Added: packages/gnutls26/branches/branch2.11.x/debian/patches/20_access_freedmemory.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls26/branches/branch2.11.x/debian/patches/20_access_freedmemory.diff?rev=1049&op=file
==============================================================================
--- packages/gnutls26/branches/branch2.11.x/debian/patches/20_access_freedmemory.diff (added)
+++ packages/gnutls26/branches/branch2.11.x/debian/patches/20_access_freedmemory.diff Sun Mar 27 07:29:16 2011
@@ -1,0 +1,41 @@
+From e8df5a70b7ee05e7f835348350e06533732d05aa Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
+Date: Sat, 26 Mar 2011 01:01:17 +0100
+Subject: [PATCH 6/8] Corrected access to freed memory location. Reported by Vitaly Kruglikov.
+
+---
+ lib/opencdk/stream.c |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/lib/opencdk/stream.c b/lib/opencdk/stream.c
+index 29bea09..a9e0af3 100644
+--- a/lib/opencdk/stream.c
++++ b/lib/opencdk/stream.c
+@@ -761,6 +761,7 @@ stream_fp_replace (cdk_stream_t s, FILE ** tmp)
+   rc = fclose (s->fp);
+   if (rc)
+     {
++      s->fp = NULL;
+       gnutls_assert ();
+       return CDK_File_Error;
+     }
+@@ -822,6 +823,7 @@ stream_filter_write (cdk_stream_t s)
+         {
+           _gnutls_read_log ("filter [close]: fd=%d\n", fileno (f->tmp));
+           fclose (f->tmp);
++          f->tmp = NULL;
+           break;
+         }
+     }
+@@ -960,7 +962,7 @@ cdk_stream_read (cdk_stream_t s, void *buf, size_t buflen)
+       if (rc)
+         {
+           s->error = rc;
+-          if (feof (s->fp))
++          if (s->fp && feof (s->fp))
+             s->flags.eof = 1;
+           gnutls_assert ();
+           return EOF;
+-- 
+1.7.2.5
+

Modified: packages/gnutls26/branches/branch2.11.x/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls26/branches/branch2.11.x/debian/patches/series?rev=1049&op=diff
==============================================================================
--- packages/gnutls26/branches/branch2.11.x/debian/patches/series (original)
+++ packages/gnutls26/branches/branch2.11.x/debian/patches/series Sun Mar 27 07:29:16 2011
@@ -1,2 +1,6 @@
 14_version_gettextcat.diff
 16_unnecessarydep.diff
+17_sizeof_gnutls_openpgp_keyid_t.diff
+18_ext_mod_iadef.diff
+19_uninitializedvar.diff
+20_access_freedmemory.diff




More information about the Pkg-gnutls-commits mailing list