From 8e096fb21f0e96cbb09009b6806ff1ab337019c0 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 15 Sep 2017 11:35:09 -0400 Subject: [PATCH] Update to upstream release 0.3.4 and modules to 0.1.2 Patch to fixed crash at SequenceOf native decoder Resolves: #1485669 --- .gitignore | 2 + ...d-crash-at-SequenceOf-native-decoder.patch | 40 +++++++++++++++++++ python-pyasn1.spec | 11 ++++- sources | 4 +- 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 0001-Backport-fixed-crash-at-SequenceOf-native-decoder.patch diff --git a/.gitignore b/.gitignore index 4de4025..e4bf478 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ pyasn1-0.0.9a.tar.gz /v0.2.3.tar.gz /v0.3.2.tar.gz /v0.0.11.tar.gz +/v0.3.4.tar.gz +/v0.1.2.tar.gz diff --git a/0001-Backport-fixed-crash-at-SequenceOf-native-decoder.patch b/0001-Backport-fixed-crash-at-SequenceOf-native-decoder.patch new file mode 100644 index 0000000..d3ac583 --- /dev/null +++ b/0001-Backport-fixed-crash-at-SequenceOf-native-decoder.patch @@ -0,0 +1,40 @@ +From 8f2d36aa772b5f83477ceecd0611532895773e0c Mon Sep 17 00:00:00 2001 +From: Rob Crittenden +Date: Fri, 15 Sep 2017 11:17:33 -0400 +Subject: [PATCH] Backport fixed crash at SequenceOf native decoder + +Upstream change 218acc52cd4574df07536e1bc81bc1eb7a410573 +--- +--- + CHANGES.rst | 1 + + pyasn1/codec/native/decoder.py | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CHANGES.rst b/CHANGES.rst +index dfdf3ce..9cf0f50 100644 +--- a/CHANGES.rst ++++ b/CHANGES.rst +@@ -8,6 +8,7 @@ Revision 0.3.4, released 07-09-2017 + - Fixed unnecessary duplicate tags detection at NamesType.tagMap + - Fixed crash at SEQUENCE and SEQUENCE OF CER encoder when running + in schemaless mode ++- Fixed crash at SequenceOf native decoder + - Fixed Character types instantiation from OctetString type -- double + unicode decoding may have scrambled the data + +diff --git a/pyasn1/codec/native/decoder.py b/pyasn1/codec/native/decoder.py +index 4c7df95..ccecb5c 100644 +--- a/pyasn1/codec/native/decoder.py ++++ b/pyasn1/codec/native/decoder.py +@@ -38,7 +38,7 @@ class SequenceOfOrSetOfDecoder(object): + asn1Value = asn1Spec.clone() + + for pyValue in pyObject: +- asn1Value.append(decoderFunc(pyValue, asn1Spec.componentType.asn1Object)) ++ asn1Value.append(decoderFunc(pyValue, asn1Spec.componentType)) + + return asn1Value + +-- +2.9.5 + diff --git a/python-pyasn1.spec b/python-pyasn1.spec index 643cf83..c332918 100644 --- a/python-pyasn1.spec +++ b/python-pyasn1.spec @@ -5,10 +5,10 @@ %endif %global module pyasn1 -%global modules_version 0.0.11 +%global modules_version 0.1.2 Name: python-pyasn1 -Version: 0.3.2 +Version: 0.3.4 Release: 1%{?dist} Summary: ASN.1 tools for Python License: BSD @@ -19,6 +19,7 @@ URL: http://pyasn1.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel python-setuptools +Patch1: 0001-Backport-fixed-crash-at-SequenceOf-native-decoder.patch %if 0%{?with_python3} BuildRequires: python3-devel @@ -73,6 +74,7 @@ BuildRequires: python-sphinx %prep %setup -n %{module}-%{version} -q -b1 +%patch1 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -166,6 +168,11 @@ rm -rf $RPM_BUILD_ROOT %doc doc/build/html/* %changelog +* Fri Sep 15 2017 Rob Crittenden - 0.3.4-1 +- Update to upstream release 0.3.4 (#1485669) +- Update modules to 0.1.2 +- Patch to fixed crash at SequenceOf native decoder + * Wed Aug 16 2017 Rob Crittenden - 0.3.2-1 - Update to upstream release 0.3.2 (#1475594) - Update modules to 0.0.11 diff --git a/sources b/sources index d02e587..faca8d7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (v0.3.2.tar.gz) = 575e8ddf3193a07446a721cec5849e25801f59350c1f14d70d43e17e94e5c93203254397c75e0863e41479c8b77dc7d1d49c373fe3c8f40b19cbf49415b9c00f -SHA512 (v0.0.11.tar.gz) = b14a11b7d3f4790a5be4a618e53c31c5adf2f8566b3c5c870cedf284b1fdc3a762c7ce8d25fbbf404bc557ae710653524d9530ea66e5b532d6ffb2dad70c24a5 +SHA512 (v0.3.4.tar.gz) = f2e8082ef8a1868c1b9dff40b5d3cf576d7ff65472174bc11e8977c25c7012c9f3795117057ea6feae16cf9ecb28284771a049bddf29dc74b169d31f502a8b77 +SHA512 (v0.1.2.tar.gz) = cb35328ef6f0581c3272327dcdbd6b0cf2f98b7e04cd2f4e2e5fe7a22c5800d357055fdc5fa9395996276c6531823e8f89c95ac826f4afdb55b10fb2ff27e4b7