diff options
author | shennetsind <ind@henn.et> | 2015-01-17 15:59:12 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-17 15:59:12 -0200 |
commit | 84b88781a0c39f7379ed85f74dc03c4e868a171f (patch) | |
tree | 41f0392d7d872fb038b42ddc82bde56be4582e47 /src/common/console.c | |
parent | 36fa0940d5c97457f7093d81e7d298c88dac14af (diff) | |
download | hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.gz hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.bz2 hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.xz hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.zip |
10 Distinct fixes
Addressing out of bounds read-write.
Special Thanks to 4144, Haruna!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/console.c')
-rw-r--r-- | src/common/console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/console.c b/src/common/console.c index 0b1b9cf93..d9567a313 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -311,12 +311,12 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { for( i = 0; i < cmd->next_count; i++ ) { if( cmd->u.next[i]->next_count ) { memset(msg, '-', depth); - snprintf(msg + depth,CP_CMD_LENGTH * 2, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); + snprintf(msg + depth,( CP_CMD_LENGTH * 2 ) - depth, " '"CL_WHITE"%s"CL_RESET"'",cmd->u.next[i]->cmd); ShowInfo("%s subs\n",msg); console->input->parse_list_subs(cmd->u.next[i],depth + 1); } else { memset(msg, '-', depth); - snprintf(msg + depth,CP_CMD_LENGTH * 2, " %s",cmd->u.next[i]->cmd); + snprintf(msg + depth,(CP_CMD_LENGTH * 2) - depth, " %s",cmd->u.next[i]->cmd); ShowInfo("%s\n",msg); } } |