diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-10-09 23:04:03 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-10-09 23:04:03 -0700 |
commit | a31234539a6a12f5c646c82ac0c2c78020e6f65b (patch) | |
tree | 22acde6cd3d416f2b61ea47fadf8f07e23c62ca3 /libxrdp/xrdp_iso.c | |
parent | f8e876a8f70bcd4968b6e43fd3894515835323d8 (diff) | |
download | xrdp-proprietary-a31234539a6a12f5c646c82ac0c2c78020e6f65b.tar.gz xrdp-proprietary-a31234539a6a12f5c646c82ac0c2c78020e6f65b.zip |
libxrdp: ISO_PDU_CR len fix
Diffstat (limited to 'libxrdp/xrdp_iso.c')
-rw-r--r-- | libxrdp/xrdp_iso.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index bee00f27..69c242d3 100644 --- a/libxrdp/xrdp_iso.c +++ b/libxrdp/xrdp_iso.c @@ -316,7 +316,7 @@ xrdp_iso_incoming(struct xrdp_iso *self) return 1; } - if (code != ISO_PDU_CR) + if ((code != ISO_PDU_CR) || (len < 6)) { free_stream(s); return 1; @@ -325,7 +325,7 @@ xrdp_iso_incoming(struct xrdp_iso *self) self->selectedProtocol = -1; self->requestedProtocol = PROTOCOL_RDP; - pend = s->p + len; + pend = s->p + (len - 6); cookie_index = 0; while (s->p < pend) { |