mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for NULL
This commit is contained in:
parent
1b2bd3b348
commit
e239d23e8c
13 changed files with 144 additions and 78 deletions
|
@ -667,6 +667,8 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
type=socket.SOCK_STREAM, proto=0,
|
||||
flags=socket.AI_PASSIVE)
|
||||
self.assertEqual(a, b)
|
||||
# Issue #6697.
|
||||
self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
|
||||
|
||||
def test_getnameinfo(self):
|
||||
# only IP addresses are allowed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue