summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_iso.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxrdp/xrdp_iso.c')
-rw-r--r--libxrdp/xrdp_iso.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c
index 8369226c..ce3baf70 100644
--- a/libxrdp/xrdp_iso.c
+++ b/libxrdp/xrdp_iso.c
@@ -355,11 +355,18 @@ xrdp_iso_incoming(struct xrdp_iso *self)
{
text[cookie_index] = cc_type;
cookie_index++;
+ if (cookie_index > 255)
+ {
+ cookie_index = 255;
+ }
if ((s->p[0] == 0x0D) && (s->p[1] == 0x0A))
{
in_uint8s(s, 2);
text[cookie_index] = 0;
cookie_index = 0;
+ if (g_strlen(text) > 0)
+ {
+ }
break;
}
in_uint8(s, cc_type);