1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r10013: Support zero-sized strings.

(This used to be commit cf3be71c33)
This commit is contained in:
Jelmer Vernooij 2005-09-03 22:56:02 +00:00 committed by Gerald (Jerry) Carter
parent e9b5bf90e6
commit 6a2c9e729f

View File

@ -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));