From 681dc046ef9c9681b48ae1584fb82343757b6bfc Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 23 Jul 2006 15:57:30 +0000 Subject: In the constructor which doesnt set Request::id, we set Request::id explicitly to '\0', which will prevent such a request accidentally breaking an id-supporting module with an uninitialized buffer :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4533 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules.cpp b/src/modules.cpp index 13cc3e740..25062cd47 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -79,11 +79,15 @@ Admin::Admin(std::string name, std::string email, std::string nick) Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { + /* Ensure that because this module doesnt support ID strings, it doesnt break modules that do + * by passing them uninitialized pointers (could happen) + */ + id = '\0'; } Request::Request(Module* src, Module* dst, const char* idstr) : id(idstr), source(src), dest(dst) -{ +{ }; char* Request::GetData() -- cgit v1.2.3