Commit b98da7cb authored by Luke Bratch's avatar Luke Bratch

Make sure messages aren't too long after combining truncated messages.

parent 726496b1
......@@ -301,6 +301,11 @@ int processrawstring(SSL *server_ssl, char *str, int source, struct client *clie
debugprint(DEBUG_FULL, "...into new string '%s' and clearing currentmsg holding area.\n", messages[0]);
ircdstate->currentmsg[0] = '\0';
// Make sure the resulting message isn't too long
if (strlen(messages[0]) >= MAXDATASIZE - 1) {
debugprint(DEBUG_CRIT, "processrawstring(): combined truncated message '%d' is too long (%ld out of a maximum of %d characters), clearing it.\n", messages[0], strlen(messages[0]), MAXDATASIZE - 1);
messages[0][0] = '\0';
// If the final characters of the raw string weren't \r\n then assume the final token is a truncated message
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment