[issue1522400] irda socket support

Charles-François Natali report at bugs.python.org
Mon Apr 30 09:44:31 CEST 2012


Charles-François Natali <neologix at free.fr> added the comment:

> Actually I think it suffers from the same problem as AF_UNIX:
> sockaddr_irda->sir_name, like sockaddr_un->sun_path, don't have to be
> NUL-terminated, and the kernel can return non NUL-terminated strings.

Actually, I've had a look at the Linux and Windows documentation, and sir_name is NUL-terminated. I've also had a look at the kernel source, and it treats sir_name as NUL-terminated, so it should be safe.

Here's a new patch, with a couple new constants, documentation update and some - really basic - tests.
I guess Gregory is right, and we could push this as-is, and wait until some users is interested in improving the support and tests.

----------
keywords: +needs review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1522400>
_______________________________________


More information about the Python-bugs-list mailing list