aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/command.c b/command.c
index 01aff9e..1b70369 100644
--- a/command.c
+++ b/command.c
@@ -362,7 +362,8 @@ bool handle_input_line(struct conn_data *data,char *line,size_t linelen){
size_t cmdlen=sepp-line;
size_t cmdi;
for(cmdi=0;cmdi<NCOMMANDS;cmdi++){
- if(strncmp(line,commands[cmdi].cmdname,cmdlen)==0){
+ if(cmdlen==strlen(commands[cmdi].cmdname)&&
+ memcmp(line,commands[cmdi].cmdname,cmdlen)==0){
break;
}
}