mirror of
https://github.com/samba-team/samba.git
synced 2025-11-02 20:23:50 +03:00
r15744: convert_string_talloc() handles src_len == 0 as error
but it's valid in this case metze
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
012a08cfb9
commit
92c19b1ba4
@@ -522,6 +522,14 @@ NTSTATUS smb2_pull_o16s16_string(struct smb2_request_buffer *buf, TALLOC_CTX *me
|
||||
status = smb2_pull_o16s16_blob(buf, mem_ctx, ptr, &blob);
|
||||
NT_STATUS_NOT_OK_RETURN(status);
|
||||
|
||||
if (blob.length == 0) {
|
||||
char *s;
|
||||
s = talloc_strdup(mem_ctx, "");
|
||||
NT_STATUS_HAVE_NO_MEMORY(s);
|
||||
*str = s;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
size = convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX,
|
||||
blob.data, blob.length, &vstr);
|
||||
data_blob_free(&blob);
|
||||
|
||||
Reference in New Issue
Block a user