Merge pull request #4154 from hardening/misc_fixes

Fix raw surfaces displaying + misc other changes
This commit is contained in:
akallabeth 2017-09-27 14:56:21 +02:00 committed by GitHub
commit e6d66d9d81
2 changed files with 5 additions and 1 deletions

View File

@ -1065,7 +1065,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context,
format = gdi_get_pixel_format(cmd->bpp); format = gdi_get_pixel_format(cmd->bpp);
if (!freerdp_image_copy(gdi->primary_buffer, gdi->dstFormat, gdi->stride, if (!freerdp_image_copy(gdi->primary_buffer, gdi->dstFormat, gdi->stride,
0, 0, cmd->width, cmd->height, cmd->destLeft, cmd->destTop, cmd->width, cmd->height,
pSrcData, format, 0, 0, 0, pSrcData, format, 0, 0, 0,
&xfc->context.gdi->palette, FREERDP_FLIP_VERTICAL)) &xfc->context.gdi->palette, FREERDP_FLIP_VERTICAL))
goto fail; goto fail;

View File

@ -1471,6 +1471,10 @@ BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs)
Stream_Write_UINT32(s, serverCertLen); /* serverCertLen */ Stream_Write_UINT32(s, serverCertLen); /* serverCertLen */
settings->ServerRandomLength = serverRandomLen; settings->ServerRandomLength = serverRandomLen;
settings->ServerRandom = (BYTE*) malloc(serverRandomLen); settings->ServerRandom = (BYTE*) malloc(serverRandomLen);
if (!settings->ServerRandom)
{
return FALSE;
}
winpr_RAND(settings->ServerRandom, serverRandomLen); winpr_RAND(settings->ServerRandom, serverRandomLen);
Stream_Write(s, settings->ServerRandom, serverRandomLen); Stream_Write(s, settings->ServerRandom, serverRandomLen);
sigData = Stream_Pointer(s); sigData = Stream_Pointer(s);