summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tdr/tdr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/tdr/tdr.c b/source4/lib/tdr/tdr.c
index e55060da25..7f42d0cf15 100644
--- a/source4/lib/tdr/tdr.c
+++ b/source4/lib/tdr/tdr.c
@@ -143,6 +143,11 @@ NTSTATUS tdr_pull_charset(struct tdr_pull *tdr, const char **v, uint32_t length,
}
}
+ if (length == 0) {
+ *v = talloc_strdup(tdr, "");
+ return NT_STATUS_OK;
+ }
+
TDR_PULL_NEED_BYTES(tdr, el_size*length);
ret = convert_string_talloc(tdr, chset, CH_UNIX, tdr->data.data+tdr->offset, el_size*length, discard_const_p(void *, v));