[tpop3d-discuss] tpop3d 1.5.1pre2 (with TLS support)

Angel Marin anmar at gmx.net
Thu, 14 Nov 2002 19:29:08 +0100


Much more funny:

 [...]
Nov 14 18:25:01 falcone tpop3d[1173]: maildir_new: scanned maildir
/var/spool/domains/foo/user (640 messages) in 0.028s
Nov 14 18:25:02 falcone tpop3d[1173]: ioabs_tcp_immediate_write: client
[5]user@foo(x.x.x.x): write: Connection reset by peer; closing connection
Nov 14 18:25:02 falcone tpop3d[1173]: ioabs_tcp_immediate_write: client
[5]user@foo(x.x.x.x): write: Bad file descriptor; closing connection
Nov 14 18:25:02 falcone last message repeated 524 times
 [...]

This error is in the logs since tuesday but I did not see it (argg). I
switched back again to 1.4.2.


> -----Mensaje original-----
>
> On Thu, Nov 14, 2002 at 12:49:38PM +0100, Angel Marin wrote:
> > Ok I've seen something interesting.
> >
> > It is the difference between what a failing mail looks like on
> the server
> > and what client finally receives (OE6).
> "OiA8QSBIUkVGPWh0dHA6Ly93d3cuY" is
> > sent twice.
>
> Oops. That's not good.... Is it reproducible?
>
> > This has happened on a non TLS config, with TLS the same
> meassage failed.
> > With non TLS there was no error, but the client received a
> modified message
> > content.
>
> OK. I've found another potential problem in the buffer
> code, which I've fixed in CVS; alternatively, the diff is
>
> --- buffer.c    13 Nov 2002 20:08:59 -0000      1.3
> +++ buffer.c    14 Nov 2002 12:00:42 -0000      1.4
> @@ -139,7 +139,7 @@
>          size_t i;
>          char *newbuf;
>          size_t newlen;
> -        for (newlen = B->len * 2; newlen < a + num; newlen *= 2);
> +        for (newlen = B->len * 2; newlen <= a + num; newlen *= 2);
>          newbuf = xmalloc(newlen);
>          for (i = 0; i < a; ++i)
>              newbuf[i] = B->buf[(B->get + i) % B->len];
>
> (You'll notice that this is, in fact, the same bug as before but
> in a different
> place. So I can't count.)
>