Re: [PATCH] dropbear-051: errno bug fix

2008-09-22 Thread Jamie Lokier
Matt Johnston wrote: > > is that errno is already set to non-zero > > before strol is called, then strol is successful but since strol doesn't > > reset errno to zero, the next line thinks that strol failed. > > I've applied this now in a more general form with a new > function m_str_to_int(). Fun

Re: [PATCH] dropbear-051: errno bug fix

2008-09-22 Thread Matt Johnston
On Fri, Sep 19, 2008 at 06:15:41PM -0400, Farrell Aultman wrote: > The code assumed that when strol is successful, that it will set errno to > zero. This is not the case, at least > under uClinux. The man page does not indicate this either. What can happen > is that errno is already set to non-z

Re: [PATCH] dropbear-051: errno bug fix

2008-09-21 Thread Ming-Ching Tiew
Farrell Aultman wrote: > Thanks Jamie, I agree with everything you said. The code would be > better modified as you indicate. > And also I wonder if the maillist accept attachment ? The patches should be sent as attachment. It will be way too much work to rework the message content as a patch. T

Re: [PATCH] dropbear-051: errno bug fix

2008-09-21 Thread Farrell Aultman
Thanks Jamie, I agree with everything you said. The code would be better modified as you indicate. On Sat, Sep 20, 2008 at 11:58 AM, Jamie Lokier <[EMAIL PROTECTED]> wrote: > Farrell Aultman wrote: > > The code assumed that when strol is successful, that it will set > > errno to zero. This is n

Re: [PATCH] dropbear-051: errno bug fix

2008-09-20 Thread Jamie Lokier
Farrell Aultman wrote: > The code assumed that when strol is successful, that it will set > errno to zero. This is not the case, at least under uClinux. It's not the case in general, POSIX doesn't require it to be set to zero. > The man page does not indicate this either. What can happen is tha

[PATCH] dropbear-051: errno bug fix

2008-09-19 Thread Farrell Aultman
The code assumed that when strol is successful, that it will set errno to zero. This is not the case, at least under uClinux. The man page does not indicate this either. What can happen is that errno is already set to non-zero before strol is called, then strol is successful but since strol does