mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
development/pycrypto: Updated for version 2.0.1
This commit is contained in:
parent
8f170791e2
commit
e489cc6c13
3 changed files with 31 additions and 3 deletions
24
development/pycrypto/pycrypto-CVE-2009-0544.patch
Normal file
24
development/pycrypto/pycrypto-CVE-2009-0544.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
diff -p -up pycrypto-2.0.1/src/ARC2.c.orig pycrypto-2.0.1/src/ARC2.c
|
||||||
|
--- pycrypto-2.0.1/src/ARC2.c.orig 2002-05-17 10:34:45.000000000 -0300
|
||||||
|
+++ pycrypto-2.0.1/src/ARC2.c 2009-02-20 13:50:28.000000000 -0300
|
||||||
|
@@ -11,6 +11,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
+#include "Python.h"
|
||||||
|
|
||||||
|
#define MODULE_NAME ARC2
|
||||||
|
#define BLOCK_SIZE 8
|
||||||
|
@@ -146,6 +147,12 @@ block_init(block_state *self, U8 *key, i
|
||||||
|
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 */
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Slackware build script for pycrypto
|
# Slackware build script for pycrypto
|
||||||
|
|
||||||
# Copyright 2008 Heinz Wiesinger <pprkut@liwjatan.at>
|
# Copyright 2008-2009 Heinz Wiesinger <pprkut@liwjatan.at>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this script, with or without modification, is
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
PRGNAM=pycrypto
|
PRGNAM=pycrypto
|
||||||
VERSION=2.0.1
|
VERSION=2.0.1
|
||||||
ARCH=${ARCH:-i486}
|
ARCH=${ARCH:-i486}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-2}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
|
@ -56,6 +56,9 @@ find . \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
-exec chmod 644 {} \;
|
-exec chmod 644 {} \;
|
||||||
|
|
||||||
|
# Fixes buffer overflow in the PyCrypto ARC2 module
|
||||||
|
patch -p1 -i $CWD/pycrypto-CVE-2009-0544.patch
|
||||||
|
|
||||||
python setup.py install --root=$PKG
|
python setup.py install --root=$PKG
|
||||||
|
|
||||||
find $PKG | xargs file | grep "shared object" | grep ELF | \
|
find $PKG | xargs file | grep "shared object" | grep ELF | \
|
||||||
|
|
|
@ -5,4 +5,5 @@ DOWNLOAD="http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz"
|
||||||
MD5SUM="4d5674f3898a573691ffb335e8d749cd"
|
MD5SUM="4d5674f3898a573691ffb335e8d749cd"
|
||||||
MAINTAINER="ppr:kut"
|
MAINTAINER="ppr:kut"
|
||||||
EMAIL="pprkut@liwjatan.at"
|
EMAIL="pprkut@liwjatan.at"
|
||||||
APPROVED="David Somero"
|
APPROVED="dsomero"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue