Skip to content

Commit

Permalink
Do it extra safe
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann committed Jun 10, 2024
1 parent 9c03300 commit bb712cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mod/server.mod/servmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ static int got001(char *from, char *msg)
static void got002(char *from, char *msg)
{
int i;
for (i = strlen(msg) - 1; (msg[i] != ' ') && (i > 0); i--);
for (i = strlen(msg) - 1; (i > 0) && (msg[i] != ' '); i--);
strlcpy(server_version, msg + i + 1, SERVER_VERSION_MAX);

}
Expand Down

0 comments on commit bb712cd

Please sign in to comment.