From a5fcceedac6aeafe067e0d644940b97a4c926006 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 4 Sep 2014 11:58:29 +0200 Subject: [PATCH] added bug fix for octet string decoding Resolves: rhbz#1138218 --- libtasn1-4.1-octet-string.patch | 20 ++++++++++++++++++++ libtasn1.spec | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 libtasn1-4.1-octet-string.patch diff --git a/libtasn1-4.1-octet-string.patch b/libtasn1-4.1-octet-string.patch new file mode 100644 index 0000000..2f5897a --- /dev/null +++ b/libtasn1-4.1-octet-string.patch @@ -0,0 +1,20 @@ +diff -ur libtasn1-4.1-orig/lib/decoding.c libtasn1-4.1/lib/decoding.c +--- libtasn1-4.1-orig/lib/decoding.c 2014-08-20 21:36:55.000000000 +0200 ++++ libtasn1-4.1/lib/decoding.c 2014-09-04 12:41:11.504502584 +0200 +@@ -731,6 +731,7 @@ + { + int len2, len3, counter, tot_len, indefinite; + int result; ++ int orig_der_len = der_len; + + counter = 0; + +@@ -792,7 +793,7 @@ + asn1_length_der (tot_len, temp, &len2); + _asn1_set_value (node, temp, len2); + +- ret = _asn1_extract_der_octet (node, der, der_len, flags); ++ ret = _asn1_extract_der_octet (node, der, orig_der_len, flags); + if (ret != ASN1_SUCCESS) + return ret; + diff --git a/libtasn1.spec b/libtasn1.spec index 5630c94..e37da6f 100644 --- a/libtasn1.spec +++ b/libtasn1.spec @@ -1,7 +1,7 @@ Summary: The ASN.1 library used in GNUTLS Name: libtasn1 Version: 4.1 -Release: 1%{?dist} +Release: 2%{?dist} # The libtasn1 library is LGPLv2+, utilities are GPLv3+ License: GPLv3+ and LGPLv2+ @@ -10,6 +10,7 @@ URL: http://www.gnu.org/software/libtasn1/ Source0: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz Source1: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz.sig Patch1: libtasn1-3.4-rpath.patch +Patch2: libtasn1-4.1-octet-string.patch BuildRequires: bison, pkgconfig %ifarch %ix86 x86_64 ppc ppc64 BuildRequires: valgrind @@ -52,6 +53,7 @@ data. %setup -q %patch1 -p1 -b .rpath +%patch2 -p1 -b .octet-string %build %configure --disable-static --disable-silent-rules @@ -106,6 +108,9 @@ test "$1" = 0 -a -f %_infodir/%name.info.gz && \ %changelog +* Mon Aug 25 2014 Nikos Mavrogiannopoulos - 4.1-2 +- added bug fix for octet string decoding (#1138218) + * Mon Aug 25 2014 Nikos Mavrogiannopoulos - 4.1-1 - new upstream release