diff options
author | Karl Mikaelsson <derfian@cendio.se> | 2018-02-02 17:13:36 +0100 |
---|---|---|
committer | Karl Mikaelsson <derfian@cendio.se> | 2018-02-02 17:13:36 +0100 |
commit | 08c293b4050441d3169d9f4de0171241bd291832 (patch) | |
tree | 32414230571b0ed255bb49066341c2427e377313 | |
parent | fe8438d5c316b721c2f073d4429a6b759b95b1d1 (diff) | |
download | rdesktop-08c293b4050441d3169d9f4de0171241bd291832.zip |
Fix Fast-Path PDU decryption regression
This solves a problem where rdesktop would get really confused about
the data read from the server and crash in random places just after
connecting.
-rw-r--r-- | secure.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -844,7 +844,7 @@ sec_process_mcs_data(STREAM s) STREAM sec_recv(RD_BOOL *is_fastpath) { - uint8 fastpath_hdr; + uint8 fastpath_hdr, fastpath_flags; uint16 sec_flags; uint16 channel; STREAM s; @@ -855,7 +855,9 @@ sec_recv(RD_BOOL *is_fastpath) { /* If fastpath packet is encrypted, read data signature and decrypt */ - if (fastpath_hdr & FASTPATH_OUTPUT_ENCRYPTED) + /* FIXME: extracting flags from hdr could be made less obscure */ + fastpath_flags = (fastpath_hdr & 0xC0) >> 6; + if (fastpath_flags & FASTPATH_OUTPUT_ENCRYPTED) { in_uint8s(s, 8); /* signature */ sec_decrypt(s->p, s->end - s->p); |