diff options
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/request.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c index fddf63b1f7..8e83ea31b3 100644 --- a/source4/smb_server/request.c +++ b/source4/smb_server/request.c @@ -489,6 +489,11 @@ static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const } src_len2 = utf16_len_n(src, src_len); + if (src_len2 == 0) { + *dest = talloc_strdup(req, ""); + return src_len2 + alignment; + } + ret = convert_string_talloc(req, CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2); if (ret == -1) { |