diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-11 16:33:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-11 16:33:03 +0000 |
commit | 6d88dc05822d9a8df80927255272fe7c9c0447de (patch) | |
tree | f752b72fff77e33fcb16b7c6d48e9c7a84ff5f9f /src/modules/extra/m_ssl_gnutls.cpp | |
parent | fdfb7f82f786ca1c359b6a39415f2d2c192aa8b5 (diff) |
Added a sanity check that was left out, prevents crash on invalid fd (e.g. via excess flood on oper or connect)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3151 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_ssl_gnutls.cpp')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 50a751412..4ba95f4a1 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -525,7 +525,10 @@ class ModuleSSLGnuTLS : public Module // This will do for setting the ssl flag...it could be done earlier if it's needed. But this seems neater. userrec* extendme = Srv->FindDescriptor(session->fd); - extendme->Extend("ssl", "ON"); + if (extendme) + { + extendme->Extend("ssl", "ON"); + } // Change the seesion state session->status = ISSL_HANDSHAKEN; |