From 14b7e4c1ab7fd7d9cf71344bb08b211a0aa1ca15 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 17 Jun 2012 14:58:16 +0200 Subject: m_shun Fix out of bounds vector access leading to crashes when hiding part reason for a shunned user --- src/modules/m_shun.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_shun.cpp') diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index b3cbbc976..fe1c41162 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -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. */ -- cgit v1.2.3