summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-06-17 14:58:16 +0200
committerattilamolnar <attilamolnar@hush.com>2012-06-17 15:06:16 +0200
commit14b7e4c1ab7fd7d9cf71344bb08b211a0aa1ca15 (patch)
tree998a501a9d176eb9f3bebe484ebeaaaf6f67e3b8
parent31182664162ac986a4d3d6283c54daa6f6984156 (diff)
m_shun Fix out of bounds vector access leading to crashes when hiding part reason for a shunned user
-rw-r--r--src/modules/m_shun.cpp4
1 files changed, 2 insertions, 2 deletions
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. */