summaryrefslogtreecommitdiffstats
path: root/lib/ldb/tests/python/api.py
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2014-11-12 01:17:56 +0100
committerAndrew Bartlett <abartlet@samba.org>2014-11-25 05:04:08 +0100
commit2d67335f681a60a636e48107d908778806a0b15f (patch)
tree651bbaf3e8e8b31ade9dd5bbd69fb7abaa9eec65 /lib/ldb/tests/python/api.py
parent7f121d3860ee3289f5fd397ab3312634d11cb2f2 (diff)
downloadsamba-2d67335f681a60a636e48107d908778806a0b15f.tar.gz
samba-2d67335f681a60a636e48107d908778806a0b15f.tar.xz
samba-2d67335f681a60a636e48107d908778806a0b15f.zip
lib-pyldb: Avoid crash when copying MessageElements between Python Message objects
This patch allows for following snipets in Python: res = ldb.search(...) m_from = res[0] m_to = Message() m_to.add(m_from["attrName"]) The problem previously is that we are trying to reference a ldb_message_element that may not be a memory context on its own. For instance, when search request from above example returns Messages with more than one attribute, this leads immediately to "Bad talloc magic value" crash, every message element beside the first one is not a memory context Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/tests/python/api.py')
0 files changed, 0 insertions, 0 deletions