Fix defragmentation code.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@445 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
a2ee3b528a
commit
e88b67c9ef
@ -156,13 +156,13 @@ channel_process(STREAM s, uint16 mcs_channel)
|
|||||||
in->p = in->data;
|
in->p = in->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
thislength = s->end - s->p;
|
thislength = MIN(s->end - s->p, in->data + in->size - in->p);
|
||||||
memcpy(in->p, s->p, thislength);
|
memcpy(in->p, s->p, thislength);
|
||||||
s->p += thislength;
|
in->p += thislength;
|
||||||
s->end += thislength;
|
|
||||||
|
|
||||||
if (flags & CHANNEL_FLAG_LAST)
|
if (flags & CHANNEL_FLAG_LAST)
|
||||||
{
|
{
|
||||||
|
in->end = in->p;
|
||||||
in->p = in->data;
|
in->p = in->data;
|
||||||
channel->process(in);
|
channel->process(in);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user