[issue5104] getsockaddrarg() casts port number from int to short without any warning

Gregory P. Smith report at bugs.python.org
Sun Feb 1 00:04:31 CET 2009

Gregory P. Smith <greg at krypto.org> added the comment:

Fixed in trunk (2.7) r69156.

All places in socketmodule that called htons and silently truncated
values that were too large have been changed to raise OverflowError. 
Unit tests included.

I'm leaving this open until it is merged into the py3k branch for 3.1.

keywords: +easy
priority: low -> normal
versions: +Python 3.1 -Python 2.7

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list