Closed
Description
Standard Python signals an error when the specified size is nonzero and bigger than the buffer, which this code doesn't do (yet):
>>> b = bytearray(7)
>>> s = socket.socket()
>>> s.recv_into(b, 8)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: buffer too small for requested bytes```