diff options
-rw-r--r-- | source3/libsmb/smb2cli_query_directory.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/smb2cli_query_directory.c b/source3/libsmb/smb2cli_query_directory.c index 3feaa07abb..2286f2ce6f 100644 --- a/source3/libsmb/smb2cli_query_directory.c +++ b/source3/libsmb/smb2cli_query_directory.c @@ -27,6 +27,7 @@ struct smb2cli_query_directory_state { uint8_t fixed[32]; + uint8_t dyn_pad[1]; struct iovec *recv_iov; uint8_t *data; uint32_t data_length; @@ -75,6 +76,11 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx, SSVAL(fixed, 26, dyn_len); SSVAL(fixed, 28, outbuf_len); + if (dyn_len == 0) { + dyn = state->dyn_pad; + dyn_len = sizeof(state->dyn_pad); + } + subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FIND, 0, 0, /* flags */ cli->smb2.pid, |