libfreerdp-core: fix issue #281 for slow-path pointer PDUs

This commit is contained in:
Marc-André Moreau 2012-01-08 15:22:52 -05:00
parent 78a517f171
commit 2cdf1aa24a
2 changed files with 2 additions and 8 deletions

View File

@ -177,6 +177,7 @@ boolean rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id);
STREAM* rdp_data_pdu_init(rdpRdp* rdp);
boolean rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id);
void rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s);
boolean rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id);
void rdp_recv(rdpRdp* rdp);

View File

@ -280,23 +280,16 @@ void update_recv(rdpUpdate* update, STREAM* s)
if (stream_get_left(s) > RDP_SHARE_DATA_HEADER_LENGTH)
{
uint8 type;
uint16 pduType;
uint16 length;
uint16 source;
uint32 shareId;
uint8 compressed_type;
uint16 compressed_len;
rdp_read_share_control_header(s, &length, &pduType, &source);
if (pduType != PDU_TYPE_DATA)
return;
rdp_read_share_data_header(s, &length, &type, &shareId, &compressed_type, &compressed_len);
if (type == DATA_PDU_TYPE_UPDATE)
update_recv(update, s);
rdp_recv_data_pdu(update->context->rdp, s);
}
}