From 328b7433a47dc0ba3c3fffbe5585927faa5c8aac Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 17 Sep 2024 11:57:50 +0200 Subject: [PATCH] [server,proxy] fix unchecked return values --- server/proxy/pf_server.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index 6955e5229..417a8e094 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -158,13 +158,23 @@ static BOOL pf_server_get_target_info(rdpContext* context, rdpSettings* settings } if (config->TargetUser) - freerdp_settings_set_string(settings, FreeRDP_Username, config->TargetUser); + { + if (!freerdp_settings_set_string(settings, FreeRDP_Username, config->TargetUser)) + return FALSE; + } if (config->TargetDomain) - freerdp_settings_set_string(settings, FreeRDP_Domain, config->TargetDomain); + { + if (!freerdp_settings_set_string(settings, FreeRDP_Domain, config->TargetDomain)) + return FALSE; + } if (config->TargetPassword) - freerdp_settings_set_string(settings, FreeRDP_Password, config->TargetPassword); + { + if (!freerdp_settings_set_string(settings, FreeRDP_Password, + config->TargetPassword)) + return FALSE; + } return TRUE; }