[server,shadow] fix integer narrow

This commit is contained in:
akallabeth 2024-09-25 03:26:48 +02:00
parent 997ff57301
commit 3a2a65bbed
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
2 changed files with 6 additions and 2 deletions

View File

@ -73,7 +73,10 @@ BOOL shadow_client_audin_init(rdpShadowClient* client)
if (client->subsystem->audinFormats)
{
if (!audin_server_set_formats(client->audin, client->subsystem->nAudinFormats,
if (client->subsystem->nAudinFormats > SSIZE_MAX)
goto fail;
if (!audin_server_set_formats(client->audin, (SSIZE_T)client->subsystem->nAudinFormats,
client->subsystem->audinFormats))
goto fail;
}

View File

@ -801,7 +801,8 @@ static BOOL shadow_server_create_certificate(rdpShadowServer* server, const char
if (!makecert)
goto out_fail;
if (makecert_context_process(makecert, makecert_argc, makecert_argv) < 0)
WINPR_ASSERT(makecert_argc <= INT_MAX);
if (makecert_context_process(makecert, (int)makecert_argc, makecert_argv) < 0)
goto out_fail;
if (makecert_context_set_output_file_name(makecert, "shadow") != 1)