Merge pull request #2070 from matt335672/dev_fix

Fix buffer size check #2070
This commit is contained in:
matt335672 2021-12-06 10:36:05 +00:00 committed by GitHub
commit a266d67fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -816,6 +816,9 @@ xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s,
updateHeader = (updateCode & 15) |
((fragmentation & 3) << 4) |
((compression & 3) << 6);
send_s.end = send_s.p + send_len;
send_s.size = send_s.end - send_s.data;
out_uint8(&send_s, updateHeader);
if (compression != 0)
{
@ -824,7 +827,6 @@ xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s,
}
send_len -= header_bytes;
out_uint16_le(&send_s, send_len);
send_s.end = send_s.p + send_len;
LOG_DEVEL(LOG_LEVEL_TRACE, "Adding header [MS-RDPBCGR] TS_FP_UPDATE "
"updateCode %d, fragmentation %d, compression %d, compressionFlags %s, size %d",
updateCode, fragmentation, compression,