cURL / Mailing Lists / curl-library / Single Mail



From: James Bursa <>
Date: Tue, 19 Jun 2007 22:13:42 -0500

On Tuesday 19 June 2007 05:08, James Housley wrote:
> On Jun 19, 2007, at 4:43 AM, Daniel Stenberg wrote:
> > Looks fine to me. The only nit might be that it doesn't check for
> > malloc failures in the aprintf(), so if you run the torture tests
> > on the SSH-related cases they may reveal something:
> Actually it does:
> If either fail, then public key authentication is not used. Both are
> freed and the state machine moves on to password authentication.

I would find the behaviour silently changing when out of memory surprising. I
think it would be better if it would return an error:

          state(conn, SSH_SESSION_FREE);
          sshc->actualCode = CURLE_OUT_OF_MEMORY;

Received on 2007-06-20