[PATCH] A grab bag of trivial things.

Darren Tucker dtucker at dtucker.net
Tue Apr 23 20:39:08 AEST 2019


Hi.

On Tue, 23 Apr 2019 at 19:26, Markus Schmidt <markus at blueflash.cc> wrote:
> During porting I found a couple of things in the source, like slightly
> wrong types (int vs. LogLevel), a leaking field and

Most of these changes look reasonable, however:

> calls c-library functions where x-functions exist (xrecallocarray, xasprintf).

Those ones look wrong. The "x" functions call fatal if their
allocations fail, but the instances you have changed do handle the
cases where the failure case is handled without having to call fatal,
eg:

> - if (asprintf(&file, "%s-cert.pub", filename) == -1)
> + if (xasprintf(&file, "%s-cert.pub", filename) == -1)
>   return SSH_ERR_ALLOC_FAIL;

Thanks.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list