]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_shun Fix out of bounds vector access leading to crashes when hiding part reason...
authorattilamolnar <attilamolnar@hush.com>
Sun, 17 Jun 2012 12:58:16 +0000 (14:58 +0200)
committerattilamolnar <attilamolnar@hush.com>
Sun, 17 Jun 2012 13:06:16 +0000 (15:06 +0200)
src/modules/m_shun.cpp

index b3cbbc976be8d1758098cd74afbdaf6d133359bf..fe1c41162b8300157bee3272557a7f44a7306951 100644 (file)
@@ -264,10 +264,10 @@ class ModuleShun : public Module
                        /* Allow QUIT but dont show any quit message */
                        parameters.clear();
                }
-               else if (command == "PART")
+               else if ((command == "PART") && (parameters.size() > 1))
                {
                        /* same for PART */
-                       parameters[1] = "";
+                       parameters[1].clear();
                }
 
                /* if we're here, allow the command. */