diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-08-05 10:35:45 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-08-05 10:35:45 +1000 |
commit | 3e3f64f05fa5d970b058c4b21b6ecd40b883e8e6 (patch) | |
tree | c402115b681e62ff866c1fec1de650d81230608f /source4 | |
parent | 43aa546ecc3f05845793b1a7354685d50a77c170 (diff) | |
download | samba-3e3f64f05fa5d970b058c4b21b6ecd40b883e8e6.tar.gz samba-3e3f64f05fa5d970b058c4b21b6ecd40b883e8e6.tar.bz2 samba-3e3f64f05fa5d970b058c4b21b6ecd40b883e8e6.zip |
s4:ldb initialise e->values[i].length before use in python bindings
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/pyldb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index a05aab5b83..8a061c7e8e 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -1544,9 +1544,9 @@ static PyObject *py_ldb_msg_element_new(PyTypeObject *type, PyObject *args, PyOb el->values = talloc_array(el, struct ldb_val, el->num_values); for (i = 0; i < el->num_values; i++) { PyObject *item = PySequence_GetItem(py_elements, i); + el->values[i].length = PyString_Size(item); el->values[i].data = talloc_memdup(el, (uint8_t *)PyString_AsString(item), el->values[i].length); - el->values[i].length = PyString_Size(item); } } else { PyErr_SetString(PyExc_TypeError, |