New submission from Michele Orrù: Buggy due to the use of scanf at Modueles/socketmodule.c:868 Broken from python2.7 to tip on my machine (GNU/Linux)
>>> import socket [64481 refs] >>> socket.gethostbyname('4294967306.4294967296.4294967296.1') '10.0.0.1' [67764 refs] >>> socket.gethostbyname('192.168.1.1 ') '192.168.1.1' [67764 refs] >>> socket.gethostbyname(' 192.168.1.1') '192.168.1.1' [67764 refs] >>> socket.gethostbyname(' 192.168.1.1 ') Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.gaierror: [Errno -2] Name or service not known [67805 refs] ---------- components: Library (Lib) messages: 172682 nosy: maker priority: normal severity: normal status: open title: socket.gethostbyname incorrectly parses ip versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16201> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com