diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2019-04-12 15:00:20 +1200 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-04-23 19:03:35 +0000 |
commit | 76967b33ebb93a7ef5daa94b123ef9bfdce59ece (patch) | |
tree | cf339e9a56d1e7d4bebaef130eebe0b30ef2f0e7 /.gitlab-ci.yml | |
parent | 1d7dee5815d1eaf43f841231767e19d110551aa3 (diff) | |
download | samba-76967b33ebb93a7ef5daa94b123ef9bfdce59ece.tar.gz |
pyldb: avoid segfault when adding an element with no name
We don't want to see this:
python3 -c "import sys
sys.path.insert(0, 'bin/python')
import ldb
m = ldb.Message()
e = ldb.MessageElement('q')
try:
m.add(e)
except ldb.LdbError:
pass
print(m)
"
Segmentation fault (core dumped)
instead we want this:
Traceback (most recent call last):
File "<string>", line 7, in <module>
ValueError: The element has no name
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Apr 23 19:03:35 UTC 2019 on sn-devel-144
Diffstat (limited to '.gitlab-ci.yml')
0 files changed, 0 insertions, 0 deletions