rpms/python-crypto/EL-5 python-crypto-fix_buffer_overflow.patch, NONE, 1.1 python-crypto.spec, 1.12, 1.13 python-crypto-x86_64-buildfix.patch, 1.1, NONE

Thorsten Leemhuis thl at fedoraproject.org
Fri Feb 13 16:45:45 UTC 2009


Author: thl

Update of /cvs/pkgs/rpms/python-crypto/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32436

Modified Files:
	python-crypto.spec 
Added Files:
	python-crypto-fix_buffer_overflow.patch 
Removed Files:
	python-crypto-x86_64-buildfix.patch 
Log Message:
* Fri Feb 13 2009 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 2.0.1-4.1
- some improvements from fedora branch
-- add patch to fix #485298 / CVE-2009-0544
-- provide pycrypto
-- drop patch0 and fix libdir handling so it works on more arches than x86_64


python-crypto-fix_buffer_overflow.patch:

--- NEW FILE python-crypto-fix_buffer_overflow.patch ---
diff -Naur pycrypto-2.0.1.org/src/ARC2.c pycrypto-2.0.1/src/ARC2.c
--- pycrypto-2.0.1.org/src/ARC2.c	2009-02-13 17:08:30.000000000 +0100
+++ pycrypto-2.0.1/src/ARC2.c	2009-02-13 17:08:47.000000000 +0100
@@ -11,6 +11,7 @@
  */
 
 #include <string.h>  
+#include "Python.h"
 
 #define MODULE_NAME ARC2
 #define BLOCK_SIZE 8
@@ -146,6 +147,12 @@
 	   We'll hardwire it to 1024. */
 #define bits 1024
 
+	if ((U32)keylength > sizeof(self->xkey)) {
+		PyErr_SetString(PyExc_ValueError,
+				"ARC2 key length must be less than 128 bytes");
+		return;
+	}
+
 	memcpy(self->xkey, key, keylength);
   
 	/* Phase 1: Expand input key to 128 bytes */


Index: python-crypto.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-crypto/EL-5/python-crypto.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- python-crypto.spec	8 Sep 2006 17:18:45 -0000	1.12
+++ python-crypto.spec	13 Feb 2009 16:45:15 -0000	1.13
@@ -4,18 +4,23 @@
 Summary:	Cryptography library for Python
 Name:		python-crypto
 Version:	2.0.1
-Release:	4%{?dist}
-License:	Python License (CNRI Python License)
+Release:	4%{?dist}.1
+License:	Public Domain
 Group:		Development/Libraries
 URL:		http://www.amk.ca/python/code/crypto.html
 Source:		http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz
-Patch0:		%{name}-x86_64-buildfix.patch
+# patch taken from 
+# http://gitweb2.dlitz.net/?p=crypto/pycrypto-2.x.git;a=commitdiff;h=d1c4875e1f220652fe7ff8358f56dee3b2aba31b
+Patch0: 	%{name}-fix_buffer_overflow.patch
+
 BuildRequires:	python >= 2.2
 BuildRequires:	python-devel >= 2.2
 BuildRequires:	gmp-devel >= 4.1
 BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot-%(%{__id_u} -n)
 Requires:	python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
 
+Provides:	pycrypto = %{version}-%{release}
+
 %description
 Python-crypto is a collection of both secure hash functions (such as MD5 and
 SHA), and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal,
@@ -24,10 +29,8 @@
 
 %prep
 %setup -n pycrypto-%{version} -q
-%ifarch x86_64
-%patch0 -b .patch0
-%endif
-
+sed -i s:/lib:/%_lib:g setup.py
+%patch0 -b .patch0 -p1
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
@@ -64,6 +67,12 @@
 
 
 %changelog
+* Fri Feb 13 2009 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 2.0.1-4.1
+- some improvements from fedora branch
+-- add patch to fix #485298 / CVE-2009-0544
+-- provide pycrypto
+-- drop patch0 and fix libdir handling so it works on more arches than x86_64
+
 * Thu Sep 07 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.0.1-4
 - Don't ghost pyo files (#205408)
 


--- python-crypto-x86_64-buildfix.patch DELETED ---




More information about the scm-commits mailing list