diff options
Diffstat (limited to 'source4/libcli/nbt/nbtname.c')
-rw-r--r-- | source4/libcli/nbt/nbtname.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c index af3f62b987..37cdf64023 100644 --- a/source4/libcli/nbt/nbtname.c +++ b/source4/libcli/nbt/nbtname.c @@ -111,7 +111,7 @@ _PUBLIC_ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const NT_STATUS_NOT_OK_RETURN(status); if (component == NULL) break; if (name) { - name = talloc_asprintf_append(name, ".%s", component); + name = talloc_asprintf_append_buffer(name, ".%s", component); NT_STATUS_HAVE_NO_MEMORY(name); } else { name = (char *)component; @@ -149,7 +149,7 @@ _PUBLIC_ NTSTATUS ndr_push_nbt_string(struct ndr_push *ndr, int ndr_flags, const /* see if we have pushed the remaing string allready, * if so we use a label pointer to this string */ - status = ndr_token_retrieve_cmp_fn(&ndr->nbt_string_list, s, &offset, (comparison_fn_t)strcmp, False); + status = ndr_token_retrieve_cmp_fn(&ndr->nbt_string_list, s, &offset, (comparison_fn_t)strcmp, false); if (NT_STATUS_IS_OK(status)) { uint8_t b[2]; @@ -401,7 +401,7 @@ _PUBLIC_ void nbt_choose_called_name(TALLOC_CTX *mem_ctx, n->scope = NULL; n->type = type; - if (is_ipaddress(name)) { + if (is_ipaddress(name) || name == NULL) { n->name = "*SMBSERVER"; return; } |