From a279a145dfe7a4a10fc63047183056dec1046eb5 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 12 Sep 2025 10:04:31 +0200 Subject: [PATCH] [server,proxy] check file exists before library load To avoid spamming the log with errors check if the file exists (and log at debug level) --- server/proxy/pf_modules.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/proxy/pf_modules.c b/server/proxy/pf_modules.c index 27a2a541e..aee04cbab 100644 --- a/server/proxy/pf_modules.c +++ b/server/proxy/pf_modules.c @@ -530,6 +530,12 @@ error: static BOOL pf_modules_load_dynamic_module(const char* module_path, proxyModule* module, void* userdata) { + if (!winpr_PathFileExists(module_path)) + { + WLog_DBG(TAG, "failed loading external library: file '%s' does not exist", module_path); + return FALSE; + } + HANDLE handle = LoadLibraryX(module_path); if (handle == NULL)