From: Victor Duchovni (no email)
Date: Mon Aug 08 2005 - 11:32:41 EDT
On Mon, Aug 08, 2005 at 03:39:03PM +0100, Andrew Wood wrote:
> [2] - http://www.ivarch.com/programs/sources/postprox-0.0.1.tar.gz
This code does not handle long lines correctly:
...
} else if (state.linelen == 0) {
state.eof_stdin = 1;
#ifdef DEBUG
if (opts->debug > 0)
log_line(LOGPRI_DEBUG, "EOF on input server");
#endif
smtp_write_out(&state, "QUIT\r\n", 6);
continue;
} ...
but linelen = 0 when the first 1024 bytes of a partial line are read:
/*
* Look for a newline in the buffered data. If one isn't found, then
* either there isn't a full line to read yet, or we've filled the
* buffer, so we have to return a partial line.
*/
ptr = memchr(line->buf, '\n', line->bufused);
if (ptr == NULL) {
if (line->bufused < sizeof(line->buf))
return 0;
linelen = sizeof(line->buf);
} else {
linelen = (ptr + 1) - line->buf;
}
-- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.
|
|
|