mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added security check in pqissl::senddata() to avoid SIGSEGV when quitting
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7649 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d8b3a16a50
commit
39e123dbf2
@ -1512,6 +1512,11 @@ int pqissl::senddata(void *data, int len)
|
||||
|
||||
int tmppktlen ;
|
||||
|
||||
// safety check. Apparently this avoids some SIGSEGV.
|
||||
//
|
||||
if(ssl_connection == NULL)
|
||||
return -1;
|
||||
|
||||
#ifdef PQISSL_DEBUG
|
||||
std::cout << "Sending data thread=" << pthread_self() << ", ssl=" << (void*)this << ", size=" << len << std::endl ;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user