Use stream_attach() so that the 'size' field in the stream structure

is properly set. This allows to assert in stream API that we don't
try to access memory outside stream buffer.
This commit is contained in:
Pawel Jakub Dawidek 2012-01-31 12:06:35 +01:00
parent 413fc774c5
commit d2860f3210

View File

@ -427,7 +427,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8*
uint32 dwVersion;
s = stream_new(0);
s->p = s->data = server_cert;
stream_attach(s, server_cert, length);
if (length < 1)
{