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.

classification
Title: [_ssl.c] SSL_write() called with -1 as size
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: illo, loewis
Priority: normal Keywords: patch

Created on 2003-09-10 20:51 by illo, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_ssl.diff illo, 2003-09-10 20:51 patch against python/dist/src/Modules/_ssl.c
Messages (4)
msg44589 - (view) Author: Ilario Nardinocchi (illo) Date: 2003-09-10 20:51
In the inner do/while loop of PySSL_SSLwrite(), whenever a 
SSL_write() needs to be called again after a 
SSL_ERROR_WANT_{READ,WRITE} error, its "len" parameter  
is set to -1, leading to a segfault.
I can't believe nobody ever noticed that :)
msg44590 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-26 16:51
Logged In: YES 
user_id=21627

Why are you passing the address of count, and not the value
of count, to SSL_write?
msg44591 - (view) Author: Ilario Nardinocchi (illo) Date: 2003-10-26 17:17
Logged In: YES 
user_id=626684

since there is no '&count' in the _ssl.c code I'm using, I assume it's 
a typo I fixed just after uploading the patch, but I cannot recall it, 
it happened a long ago. Sorry.
I don't upload the patch because from what I'm seeing it's just a 
matter of deleting the '&'.
msg44592 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-27 14:25
Logged In: YES 
user_id=21627

Thanks for the patch. Committed (with that change) as _ssl.c
1.13.6.2 and 1.15; NEWS 1.831.4.69.
History
Date User Action Args
2022-04-10 16:11:05adminsetgithub: 39211
2003-09-10 20:51:31illocreate