mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
Fixing assumtions that malloced memory is zero filled - making
sure it is. Jeremy (jallison@whistle.com)
This commit is contained in:
parent
82cfa6bb7c
commit
59ee0d0c7e
@ -486,6 +486,8 @@ struct name_record *add_netbios_entry(struct subnet_record *d,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bzero((char *)n->ip_flgs, sizeof(*n->ip_flgs) * n->num_ips);
|
||||
|
||||
make_nmb_name(&n->name,name,type,scope);
|
||||
|
||||
if ((n2 = find_name_search(&found_subnet, &n->name, search, new_only?ipzero:ip)))
|
||||
|
@ -104,6 +104,8 @@ struct response_record *make_response_queue_record(enum state_type state,
|
||||
if (!(n = (struct response_record *)malloc(sizeof(*n))))
|
||||
return(NULL);
|
||||
|
||||
bzero((char *)n, sizeof(*n));
|
||||
|
||||
n->response_id = id;
|
||||
n->state = state;
|
||||
n->fd = fd;
|
||||
|
@ -84,7 +84,8 @@ static struct work_record *make_workgroup(char *name)
|
||||
|
||||
work = (struct work_record *)malloc(sizeof(*work));
|
||||
if (!work) return(NULL);
|
||||
|
||||
bzero((char *)work, sizeof(*work));
|
||||
|
||||
StrnCpy(work->work_group,name,sizeof(work->work_group)-1);
|
||||
work->serverlist = NULL;
|
||||
|
||||
@ -92,6 +93,7 @@ static struct work_record *make_workgroup(char *name)
|
||||
SV_TYPE_POTENTIAL_BROWSER : 0 );
|
||||
work->RunningElection = False;
|
||||
work->ElectionCount = 0;
|
||||
work->announce_interval = 0;
|
||||
work->needelection = False;
|
||||
work->needannounce = True;
|
||||
work->mst_state = MST_POTENTIAL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user