From a5fdf05d6cfb45db319bb33cf6f601a71b2507ed Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 8 Aug 2011 13:21:18 +0200 Subject: pyldb: fix uninitialized memory bug in PyArg_ParseTuple() argument "s#", &str, &len) required 'len' as 'int' not as 'Py_ssize_t'. With Py_ssize_t the 2nd half of a 64bit Py_ssize_t, will be uninitialized as 'int' is only 32bit. metze --- lib/ldb/pyldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ldb/pyldb.c') diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 87b2307896..218505dd8c 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -3201,7 +3201,7 @@ static PyObject *py_valid_attr_name(PyObject *self, PyObject *args) static PyObject *py_binary_encode(PyObject *self, PyObject *args) { char *str, *encoded; - Py_ssize_t size; + int size = 0; struct ldb_val val; PyObject *ret; -- cgit