From 317d55f3f1ca3ed75b384ce69dbb696e93c71b22 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 29 Mar 2014 18:18:27 -0400 Subject: Fix ns_set password to read the correct parameter. Even though 1 is past the "end" of the vector, because vectors never shrink and due to how the command parser works, it is always less than the capacity, and almost always contains what is in params[0] (though this is of course implementation dependant), which is why this was not identified sooner, as it executes cleanly under valgrind on every machine I can find. --- modules/commands/ns_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/commands/ns_set.cpp') diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index e6526a913..063b7c4dd 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -119,7 +119,7 @@ class CommandNSSetPassword : public Command void Execute(CommandSource &source, const std::vector ¶ms) anope_override { - const Anope::string ¶m = params[1]; + const Anope::string ¶m = params[0]; unsigned len = param.length(); if (Anope::ReadOnly) -- cgit