mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Mail: optimized discarding invalid SMTP commands.
There is no need to scan buffer from s->buffer->pos, as we already scanned the buffer till "p" and wasn't able to find an LF. There is no real need for this change in SMTP, since it is at most a microoptimization of a non-common code path. Similar code in IMAP, however, will have to start scanning from "p" to be correct, since there can be newlines in IMAP literals.
This commit is contained in:
parent
204f944add
commit
317223cb56
@ -843,7 +843,7 @@ invalid:
|
||||
|
||||
/* skip invalid command till LF */
|
||||
|
||||
for (p = s->buffer->pos; p < s->buffer->last; p++) {
|
||||
for ( /* void */ ; p < s->buffer->last; p++) {
|
||||
if (*p == LF) {
|
||||
s->state = sw_start;
|
||||
s->buffer->pos = p + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user