Be tolerant of cropped TS_SHARECONTROLHEADER
Old versions of Windows (e.g. XP) sends a cropped packet in some cases. It still contains all the important parts, so let's be tolerant of this misbehaviour.
This commit is contained in:
parent
75215ad90b
commit
a646a5cce2
14
rdp.c
14
rdp.c
@ -124,12 +124,22 @@ rdp_ts_in_share_control_header(STREAM s, uint8 * type, uint16 * length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
in_uint16_le(s, pdu_type); /* pduType */
|
in_uint16_le(s, pdu_type); /* pduType */
|
||||||
in_uint16(s, pdu_source); /* pduSource */
|
|
||||||
|
|
||||||
*type = pdu_type & 0xf;
|
*type = pdu_type & 0xf;
|
||||||
|
|
||||||
|
/* XP omits pduSource for PDUTYPE_DEACTIVATEALLPDU for some reason */
|
||||||
|
if (*length == 4) {
|
||||||
|
logger(Protocol, Debug,
|
||||||
|
"rdp_ts_in_share_control_header(), missing pduSource field for 0x%x PDU",
|
||||||
|
*type);
|
||||||
|
} else {
|
||||||
|
in_uint16(s, pdu_source); /* pduSource */
|
||||||
|
}
|
||||||
|
|
||||||
/* Give just the size of the data */
|
/* Give just the size of the data */
|
||||||
|
if (*length >= 6)
|
||||||
*length -= 6;
|
*length -= 6;
|
||||||
|
else
|
||||||
|
*length = 0;
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user