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 martin.panter
Recipients martin.panter
Date 2016-03-26.07:28:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458977282.91.0.0462711735469.issue26644@psf.upfronthosting.co.za>
In-reply-to
Content
SystemError indicates an internal error that is not supposed to be triggerable from Python code. We should probably raise ValueError like plain sockets instead.

>>> s = create_connection(("python.org", 443))
>>> s.recv(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: negative buffersize in recv
>>> ss = ssl.wrap_socket(s)
>>> ss.recv(-1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/proj/python/cpython/Lib/ssl.py", line 910, in recv
    return self.read(buflen)
  File "/home/proj/python/cpython/Lib/ssl.py", line 787, in read
    return self._sslobj.read(len, buffer)
  File "/home/proj/python/cpython/Lib/ssl.py", line 573, in read
    v = self._sslobj.read(len or 1024)
SystemError: Negative size passed to PyBytes_FromStringAndSize
History
Date User Action Args
2016-03-26 07:28:02martin.pantersetrecipients: + martin.panter
2016-03-26 07:28:02martin.pantersetmessageid: <1458977282.91.0.0462711735469.issue26644@psf.upfronthosting.co.za>
2016-03-26 07:28:02martin.panterlinkissue26644 messages
2016-03-26 07:28:01martin.pantercreate