git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43f3d6a
)
pyldb: fix uninitialized memory bug in PyArg_ParseTuple() argument
author
Stefan Metzmacher
<metze@samba.org>
Mon, 8 Aug 2011 11:21:18 +0000
(13:21 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 8 Aug 2011 14:45:27 +0000
(16:45 +0200)
"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
patch
|
blob
|
history
diff --git
a/lib/ldb/pyldb.c
b/lib/ldb/pyldb.c
index 87b23078964fab27b3b3d2ef3fd319b5d111833e..218505dd8c5e91bf899c3a38247b3bc1c9e19a6e 100644
(file)
--- 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;