IPv6 and commit d882add695bbd5ea03961c08ac2c0380fbf2947b

Jeremy Allison jra at samba.org
Fri Sep 23 22:22:42 UTC 2022


On Fri, Sep 23, 2022 at 06:11:00PM -0400, Nathaniel W. Turner via samba-technical wrote:
>On Fri, Sep 23, 2022 at 6:09 PM Jeremy Allison <jra at samba.org> wrote:
>
>> I'm getting 404's on those links, sorry.
>>
>
>Sorry, I had inadvertently made my fork private. Fixed now.

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;
	}

Jeremy.



More information about the samba-technical mailing list