summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/libkirc
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-05-24 22:09:12 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-05-24 22:10:49 +0200
commit835518cc8492fd32a626b4fc1ab8e272ce032b04 (patch)
tree89724a53dde5eb2d9af80a2765464ad84c96ef35 /kopete/protocols/irc/libkirc
parent79ca211e6bd156373974dc7cf718024eedd6a789 (diff)
downloadtdenetwork-835518cc8492fd32a626b4fc1ab8e272ce032b04.tar.gz
tdenetwork-835518cc8492fd32a626b4fc1ab8e272ce032b04.zip
kopete: Fix crash due to null pointer dereference in IRC protocol.
This manifests itself only if SSL/TLS is used for IRC. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 71415aad02f1e60c8e3c788bd0d844e4da034eb4)
Diffstat (limited to 'kopete/protocols/irc/libkirc')
-rw-r--r--kopete/protocols/irc/libkirc/ksslsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kopete/protocols/irc/libkirc/ksslsocket.cpp b/kopete/protocols/irc/libkirc/ksslsocket.cpp
index 23e7a10c..c64eb21a 100644
--- a/kopete/protocols/irc/libkirc/ksslsocket.cpp
+++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp
@@ -103,7 +103,7 @@ int KSSLSocket::peekBlock( char* data, uint maxLen )
TQ_LONG KSSLSocket::writeBlock( const char* data, TQ_ULONG len )
{
- return d->kssl->write( data, len );
+ return d->kssl ? (d->kssl->write(data, len)) : -1;
}
#ifdef USE_QT4