aboutsummaryrefslogtreecommitdiff
path: root/pow
diff options
context:
space:
mode:
Diffstat (limited to 'pow')
-rw-r--r--pow/POW-0.7/POW.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/pow/POW-0.7/POW.c b/pow/POW-0.7/POW.c
index 3e244bb1..7740872a 100644
--- a/pow/POW-0.7/POW.c
+++ b/pow/POW-0.7/POW.c
@@ -7531,12 +7531,9 @@ pow_module_pem_read (PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "is#|s", &object_type, &src, &len, &pass))
goto error;
- if ((in = BIO_new_mem_buf(src, -1)) == NULL)
+ if ((in = BIO_new_mem_buf(src, len)) == NULL)
lose("unable to create new BIO");
- if (!BIO_write(in, src, len))
- lose("unable to write to BIO");
-
switch(object_type) {
case RSA_PRIVATE_KEY:
obj = (PyObject*)asymmetric_object_pem_read(object_type, in, pass);