/* Have we got space to append the '\0' ? */
if (size <= dest_len) {
/* No, realloc. */
- dest = TALLOC_REALLOC(ctx, dest,
+ dest = TALLOC_REALLOC_ARRAY(ctx, dest, char,
dest_len+1);
if (!dest) {
/* talloc fail. */
/* We know a token can't be larger
* than the entire list. */
- tok = SMB_MALLOC(bufsize+1);
+ tok = SMB_MALLOC_ARRAY(char, bufsize+1);
if (!tok) {
return False;
}
{
struct junction_map *jn = NULL;
int i=0;
- size_t jn_count;
+ size_t jn_count = 0;
int sharecount = 0;
*p_num_jn = 0;
*/
dir_name_len = strlen(dir_fsp->fsp_name);
- fname = TALLOC_SIZE(ctx, dir_name_len+2);
+ fname = TALLOC_ARRAY(ctx, char, dir_name_len+2);
if (!fname) {
reply_nterror(
req, NT_STATUS_NO_MEMORY);
*/
dir_name_len = strlen(dir_fsp->fsp_name);
- fname = TALLOC_SIZE(ctx, dir_name_len+2);
+ fname = TALLOC_ARRAY(ctx, char, dir_name_len+2);
if (!fname) {
reply_nterror(
req, NT_STATUS_NO_MEMORY);
case SMB_QUERY_FILE_UNIX_LINK:
{
- char *buffer = TALLOC_SIZE(ctx, 1024);
+ char *buffer = TALLOC_ARRAY(ctx, char, 1024);
if (!buffer) {
reply_nterror(req, NT_STATUS_NO_MEMORY);