git.samba.org
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
pytest/segfault: abort for generate_random_bytes(-1)
[samba.git]
/
python
/
samba
/
tests
/
segfault.py
diff --git
a/python/samba/tests/segfault.py
b/python/samba/tests/segfault.py
index 6186d60c823a7bed4e555e0f48cd1ab7b526ea1f..a2a42feffdacd4c12ca45aa79b9c41eaeef022d2 100644
(file)
--- a/
python/samba/tests/segfault.py
+++ b/
python/samba/tests/segfault.py
@@
-236,3
+236,9
@@
class SegfaultTests(samba.tests.TestCase):
c = ldb.Control(samdb, 'relax:1')
del c.critical
+
+ @segfault_detector
+ def test_random_bytes(self):
+ # memory error from SIZE_MAX -1 allocation.
+ from samba import generate_random_bytes
+ generate_random_bytes(-1)