This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients benjamin.peterson, vajrasky
Date 2014-01-14.05:18:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389676738.57.0.767136106555.issue20251@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import socket
>>> r, w = socket.socketpair()
>>> w.send(b'X' * 1024)
1024
>>> buffer = bytearray()
>>> r.recvfrom_into(buffer)
python: /home/sky/Code/python/cpython3.4/Modules/socketmodule.c:2867: sock_recvfrom_into: Assertion `buf != 0 && buflen > 0' failed.
Aborted (core dumped)

Attached the fix to handle the empty bytearray gracefully. The fix is for Python 3.4.
History
Date User Action Args
2014-01-14 05:18:58vajraskysetrecipients: + vajrasky, benjamin.peterson
2014-01-14 05:18:58vajraskysetmessageid: <1389676738.57.0.767136106555.issue20251@psf.upfronthosting.co.za>
2014-01-14 05:18:58vajraskylinkissue20251 messages
2014-01-14 05:18:58vajraskycreate