1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r4216: fix segfault in idmap_rid

(only ever shows up when the somewhat hidden
IDMAP_RID_SUPPORT_TRUSTED_DOMAINS - define is set).

Thanks to Stephan Martin <sm@suse.de> for reporting this bug.

Guenther
(This used to be commit e7b81d679b)
This commit is contained in:
Günther Deschner 2004-12-15 10:12:10 +00:00 committed by Gerald (Jerry) Carter
parent 9e3453459c
commit 37e5f14089

View File

@ -272,8 +272,8 @@ static NTSTATUS rid_idmap_get_domains(uint32 *num_domains, fstring **domain_name
/* put the results together */
*num_domains = trusted_num_domains + 1;
*domain_names = (fstring *) realloc(domain_names, sizeof(fstring) * *num_domains);
*domain_sids = (DOM_SID *) realloc(domain_sids, sizeof(DOM_SID) * *num_domains);
*domain_names = (fstring *) realloc(*domain_names, sizeof(fstring) * *num_domains);
*domain_sids = (DOM_SID *) realloc(*domain_sids, sizeof(DOM_SID) * *num_domains);
/* first add myself at the end*/
fstrcpy((*domain_names)[0], domain_name);