git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43aa546
)
s4:ldb initialise e->values[i].length before use in python bindings
author
Andrew Bartlett
<abartlet@samba.org>
Wed, 5 Aug 2009 00:35:45 +0000
(10:35 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 5 Aug 2009 00:35:45 +0000
(10:35 +1000)
source4/lib/ldb/pyldb.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/pyldb.c
b/source4/lib/ldb/pyldb.c
index a05aab5b8396c9d433ed4aed0ac5f49d5a644b79..8a061c7e8ecf8c2de92dab98db619f2160d3047a 100644
(file)
--- 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,