Hey,

  Good point - that should be a comparison, not assignment.  I
corrected that in the attached patch.

Thanks,
Jesse

---- Original Message ----
From: Ben Gras <[EMAIL PROTECTED]>
To: Jesse Norell <[EMAIL PROTECTED]>
Subject: Re: [Dbmail] High Load Average and dbmail-pop3d ? [PATCH]
Sent: Thu, 22 May 2003 18:38:50 +0200

> Hi Jesse,
> 
> >   After a little discussion with Ryan, the purpose of his patch was
> > to fix the pop3 state machine when returning from apop (which has no
> > plaintext password, creating a problem with a check for password!=NULL
> > at a point), but it created a double free() of a pointer.  According
> > to the man page, that creates undefined behavior, which for Ryan seems
> > to be working fine, but for you is quite nasty.  :)  The attached
> > patch handles that case in the state machine, as well as checking a
> > couple lengths (and fixing a buffer overrun with long USER arg) ... it
> > seems to work fine in a small amount of testing, but give it a try and
> > see if it fixes your problem, etc.  Please report back with your
> > results, as this is something that needs to be fixed in cvs code.
> > (Download latest cvs code, and don't use Ryan's patch with this.)
> 
> This line in your patch looks fishy:
> +       if (session.username != NULL && (session.cmdtype = 11 || 
> session.password != NULL))
> 
> It's either a clever (but unclear) way of assigning 11 to cmdtype
> if the username != NULL, or a bug, which is likely because the 2nd
> part of the conjunction will always be true..
> 
>       =Ben
> 
> 
> 
-- End Original Message --


--
Jesse Norell
jesse (at) kci.net

Attachment: dbmail-20030520-apop-statemachine-fix.patch
Description: Binary data

Reply via email to