Maybe there's no dynamic part on the wire.
metze
* body and let the caller deal with the error
*/
invalid = true;
- } else if (body_size > (full_size - SMB2_HDR_BODY)) {
+ }
+
+ if ((body_size % 2) != 0) {
+ body_size -= 1;
+ }
+
+ if (body_size > (full_size - SMB2_HDR_BODY)) {
/*
* this is invalid, just return a zero
* body and let the caller deal with the error
body_size = 2;
}
- if ((body_size % 2) != 0) {
- body_size -= 1;
- }
-
dyn_size = full_size - (SMB2_HDR_BODY + body_size);
state->missing -= (body_size - 2) + dyn_size;