uint64_t seqnum;
uint32_t hdr_offset;
uint32_t flags = 0;
+ bool compound = false;
if (body_dynamic_present) {
if (body_dynamic_size == 0) {
ZERO_STRUCT(req->in);
if (transport->compound.missing > 0) {
+ compound = true;
transport->compound.missing -= 1;
req->out = transport->compound.buffer;
ZERO_STRUCT(transport->compound.buffer);
* if we have a dynamic part, make sure the first byte
* which is always be part of the packet is initialized
*/
- if (body_dynamic_size) {
+ if (body_dynamic_size && !compound) {
req->out.size += 1;
SCVAL(req->out.dynamic, 0, 0);
}
static size_t smb2_padding_fix(struct smb2_request_buffer *buf)
{
if (buf->dynamic == (buf->body + buf->body_fixed)) {
- return 1;
+ if (buf->dynamic != (buf->buffer + buf->size)) {
+ return 1;
+ }
}
return 0;
}