summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_group.c17
-rw-r--r--source3/rpc_server/srv_lsa_nt.c1
-rw-r--r--source3/utils/rpccheck.c1
3 files changed, 14 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 2b567f1336..ab693eff63 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -467,7 +467,7 @@ static BOOL get_sam_group_entries(struct getent_state *ent)
{
NTSTATUS status;
uint32 num_entries;
- struct acct_info *name_list = NULL;
+ struct acct_info *name_list = NULL, *tnl;
if (ent->got_all_sam_entries) {
return False;
@@ -510,10 +510,17 @@ static BOOL get_sam_group_entries(struct getent_state *ent)
if (num_entries) {
- name_list = Realloc(name_list,
- sizeof(struct acct_info) *
- (ent->num_sam_entries +
- num_entries));
+ tnl = Realloc(name_list,
+ sizeof(struct acct_info) *
+ (ent->num_sam_entries +
+ num_entries));
+ if(tnl == NULL)
+ {
+ DEBUG(0,("get_sam_group_entries: unable ro realloc a structure!\n"));
+ SAFE_FREE(name_list);
+ return False;
+ }
+ else name_list = tnl;
memcpy(&name_list[ent->num_sam_entries],
sam_grp_entries,
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index eeaf9c6347..3282fbca9f 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -722,6 +722,7 @@ NTSTATUS _lsa_enum_privsaccount(pipes_struct *p, LSA_Q_ENUMPRIVSACCOUNT *q_u, LS
if ( (map.privilege & privs[i].se_priv) == privs[i].se_priv) {
set=(LUID_ATTR *)talloc_realloc(p->mem_ctx, set, (count+1)*sizeof(LUID_ATTR));
+ if (set == NULL) return NT_STATUS_NO_MEMORY;
set[count].luid.low=privs[i].se_priv;
set[count].luid.high=1;
diff --git a/source3/utils/rpccheck.c b/source3/utils/rpccheck.c
index 287b39bd1e..3956310241 100644
--- a/source3/utils/rpccheck.c
+++ b/source3/utils/rpccheck.c
@@ -40,6 +40,7 @@ main()
DEBUGLEVEL=10;
ctx=talloc_init();
+ if (!ctx) exit(1);
prs_init(&ps, 1600, 4, ctx, MARSHALL);