str->buffer = (uint16 *)prs_alloc_mem(ps,str->buf_len * sizeof(uint16));
if (str->buffer == NULL)
return False;
- memset(str->buffer, '\0', str->buf_len * sizeof(uint16));
}
/* If the string is empty, we don't have anything to stream */
str->buffer = (uint16 *)prs_alloc_mem(ps,str->uni_max_len * sizeof(uint16));
if (str->buffer == NULL)
return False;
- memset(str->buffer, '\0', str->uni_max_len * sizeof(uint16));
}
/* If the string is empty, we don't have anything to stream */
*/
if((psa = (SEC_ACL *)malloc(sizeof(SEC_ACL))) == NULL)
return False;
- ZERO_STRUCTP(psa);
*ppsa = psa;
}
/* reading */
if((psa->ace = malloc(sizeof(psa->ace[0]) * psa->num_aces)) == NULL)
return False;
- ZERO_STRUCTP(psa->ace);
}
for (i = 0; i < psa->num_aces; i++) {
if(UNMARSHALLING(ps)) {
if((psd = (SEC_DESC *)malloc(sizeof(SEC_DESC))) == NULL)
return False;
- ZERO_STRUCTP(psd);
*ppsd = psd;
} else {
/* Marshalling - just ignore. */
/* reading */
if((psd->owner_sid = malloc(sizeof(*psd->owner_sid))) == NULL)
return False;
- ZERO_STRUCTP(psd->owner_sid);
}
if(!smb_io_dom_sid("owner_sid ", psd->owner_sid , ps, depth))
return False;
if((psd->grp_sid = malloc(sizeof(*psd->grp_sid))) == NULL)
return False;
- ZERO_STRUCTP(psd->grp_sid);
}
if(!smb_io_dom_sid("grp_sid", psd->grp_sid, ps, depth))
if (UNMARSHALLING(ps) && psdb == NULL) {
if((psdb = (SEC_DESC_BUF *)malloc(sizeof(SEC_DESC_BUF))) == NULL)
return False;
- ZERO_STRUCTP(psdb);
*ppsdb = psdb;
}
if (UNMARSHALLING(ps)) {
if (!(info1 = (SRV_SHARE_INFO_1 *)prs_alloc_mem(ps, num_entries * sizeof(SRV_SHARE_INFO_1))))
return False;
- memset(info1, '\0', num_entries * sizeof(SRV_SHARE_INFO_1));
ctr->share.info1 = info1;
}
if (UNMARSHALLING(ps)) {
if (!(info2 = (SRV_SHARE_INFO_2 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_2))))
return False;
- memset(info2, '\0', num_entries * sizeof(SRV_SHARE_INFO_2));
ctr->share.info2 = info2;
}
ctr = *pp_ctr = (SRV_SESS_INFO_CTR *)prs_alloc_mem(ps, sizeof(SRV_SESS_INFO_CTR));
if (ctr == NULL)
return False;
- ZERO_STRUCTP(ctr);
}
if (ctr == NULL)
ctr = *pp_ctr = (SRV_CONN_INFO_CTR *)prs_alloc_mem(ps, sizeof(SRV_CONN_INFO_CTR));
if (ctr == NULL)
return False;
- ZERO_STRUCTP(ctr);
}
if (ctr == NULL)
ctr = *pp_ctr = (SRV_FILE_INFO_CTR *)prs_alloc_mem(ps, sizeof(SRV_FILE_INFO_CTR));
if (ctr == NULL)
return False;
- ZERO_STRUCTP(ctr);
}
if (ctr == NULL)