IPv6 and commit d882add695bbd5ea03961c08ac2c0380fbf2947b

Nathaniel W. Turner nathanielwyliet at gmail.com
Sun Sep 25 02:17:07 UTC 2022


On Fri, Sep 23, 2022 at 6:22 PM Jeremy Allison <jra at samba.org> wrote:

> This code:
>
>          * We're only returning up to 2 addresses per
>          * DC name, so just allocate size numdcs x 2.
>          */
>
>         dclist = talloc_zero_array(mem_ctx,
>                                    struct ip_service_name,
>                                    numdcs * 2);
>         if (!dclist) {
>                 TALLOC_FREE(dcs);
>
> needs an integer wrap tests for numdcs * 2 before
> passing it to an allocation function. Something
> like:
>
>         if (numdcs + numdcs < numdcs) {
>                 TALLOC_FREE(dcs);
>                 return NT_STATUS_INVALID_PARAMETER;
>         }
>

Oh, good point. Updated.

Does the overall approach seem like an OK compromise for now? Changing
process_dc_dns()
to do parallel pings does seem like a natural next step, but is also much
larger in scope. I might be able to work on that at some point, but my time
(and risk tolerance) is pretty limited at the moment.

n


More information about the samba-technical mailing list