]> jfr.im git - irc/ircd-hybrid/bopm.git/commitdiff
Make sure that the param string is at least null terminated when there is
authorandy <redacted>
Sun, 2 Feb 2003 00:44:06 +0000 (00:44 +0000)
committerandy <redacted>
Sun, 2 Feb 2003 00:44:06 +0000 (00:44 +0000)
no parameter (this caused segfault on any oper command for implementations
whose strlen() can't handle null pointers, e.g. sparc-sun-solaris2.8).

src/opercmd.c

index 018574b8162c846db5bfeec5946648de925e3d19..b9c4bf39ced7ef9a504b3204e297fc3aa8eba35d 100644 (file)
@@ -184,6 +184,8 @@ void command_parse(char *command, char *msg, struct ChannelConf *target, struct
       *param = '\0';
       param++;
    }
+   else
+      param = "";
 
    log("COMMAND -> parsed [%s] [%s]", command, param);