diff options
| author | Luke Bratch <luke@bratch.co.uk> | 2019-05-27 17:32:46 +0100 | 
|---|---|---|
| committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-27 17:32:46 +0100 | 
| commit | c3f58fdccc4a6019ca7b53c67f272f9c3c576051 (patch) | |
| tree | c7ae72fa1deb194dcc52a23e4e696d56a23957ac /blabouncer.c | |
| parent | 55f0010f89fe62928b8aef29bfbf73407380ad69 (diff) | |
Correct mistake in previous MAXTOKENS buffer overflow commit.
Diffstat (limited to 'blabouncer.c')
| -rw-r--r-- | blabouncer.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/blabouncer.c b/blabouncer.c index e958828..a180b5a 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -1894,7 +1894,7 @@ int processrawstring(SSL *server_ssl, char *str, int source, struct client *clie    while ((token = strsep(&strcopy, "\r\n")) != NULL) {      if (*token == '\0') continue; // Skip consecutive matches -    if (counter >= MAXTOKENS) break; // Too many tokens +    if (messagecount >= MAXTOKENS) break; // Too many tokens      printf("String Token: \"%s\", length %zd.\n", token, strlen(token));      // Copy into the token array (strlen + 1 to get the NULL terminator)      strncpy(messages[messagecount], token, strlen(token) + 1); | 
