diff options
author | Simon McVittie <smcv@collabora.com> | 2022-09-04 21:22:10 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-09-06 14:52:12 +0100 |
commit | f4d8c9f45dff584aec8df0993e1716390d57508c (patch) | |
tree | 4267c26ea312f7c19c3d3b4923b623809f076c82 /test/meson.build | |
parent | f5e4724a3d7c5727ef5550ab95b3c47e290c1376 (diff) | |
download | dbus-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/meson.build')
0 files changed, 0 insertions, 0 deletions