diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-08-08 13:21:18 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-08-08 16:45:27 +0200 |
commit | a5fdf05d6cfb45db319bb33cf6f601a71b2507ed (patch) | |
tree | fe5bcfa1fed904daa342b067addd921766f779e5 | |
parent | 43f3d6ad339e7ca914f14e6e8eac3a2cf0ff09db (diff) | |
download | samba-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
-rw-r--r-- | lib/ldb/pyldb.c | 2 |
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; |