summaryrefslogtreecommitdiff
path: root/test/test-standalone.py
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-09-04 21:22:10 +0100
committerSimon McVittie <smcv@collabora.com>2022-09-06 14:52:12 +0100
commitf4d8c9f45dff584aec8df0993e1716390d57508c (patch)
tree4267c26ea312f7c19c3d3b4923b623809f076c82 /test/test-standalone.py
parentf5e4724a3d7c5727ef5550ab95b3c47e290c1376 (diff)
downloaddbus-python-f4d8c9f45dff584aec8df0993e1716390d57508c.tar.gz
unixfd: Fix assertion failure constructing UnixFd for invalid fd
File descriptors are represented as the C int type, but only non-negative values represent a valid fd, with all negative values representing the absence of a fd (a NULL-like value). Previously, make_fd() accepted negative fds, but then UnixFd_tp_new would crash with an assertion failure. Instead, range-check the value according to the semantically valid range. If it isn't, raise the same error we previously raised for values that don't fit in an int. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/test-standalone.py')
0 files changed, 0 insertions, 0 deletions