summaryrefslogtreecommitdiff
path: root/lib/ldb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-08-08 13:21:18 +0200
committerStefan Metzmacher <metze@samba.org>2011-08-08 16:45:27 +0200
commita5fdf05d6cfb45db319bb33cf6f601a71b2507ed (patch)
treefe5bcfa1fed904daa342b067addd921766f779e5 /lib/ldb
parent43f3d6ad339e7ca914f14e6e8eac3a2cf0ff09db (diff)
downloadsamba-a5fdf05d6cfb45db319bb33cf6f601a71b2507ed.tar.gz
samba-a5fdf05d6cfb45db319bb33cf6f601a71b2507ed.tar.bz2
samba-a5fdf05d6cfb45db319bb33cf6f601a71b2507ed.zip
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
Diffstat (limited to 'lib/ldb')
-rw-r--r--lib/ldb/pyldb.c2
1 files changed, 1 insertions, 1 deletions
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;