diff options
| author | 2023-03-24 11:45:19 +0000 | |
|---|---|---|
| committer | 2023-03-24 12:01:33 +0000 | |
| commit | 6465ff70e51bf87f107c7827fb7141e75812199b (patch) | |
| tree | eaede1261fe8279eff44ce47360e773c2166f0e8 /src | |
| parent | Send ERR_PASSWDMISMATCH when the user specifies the wrong password. (diff) | |
Fix a segfault when sending data to a user without a connect class.
Diffstat (limited to 'src')
| -rw-r--r-- | src/users.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 646949b5a..7d63659ea 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -301,8 +301,9 @@ void UserIOHandler::AddWriteBuf(const std::string& data) if (user->quitting_sendq) return; - if (!user->quitting && GetSendQSize() + data.length() > user->GetClass()->hardsendqmax && - !user->HasPrivPermission("users/flood/increased-buffers")) + if (!user->quitting + && (user->GetClass() && GetSendQSize() + data.length() > user->GetClass()->hardsendqmax) + && !user->HasPrivPermission("users/flood/increased-buffers")) { user->quitting_sendq = true; ServerInstance->GlobalCulls.AddSQItem(user); |
