From 15d408d6fca68954fced2903bc0caaa0453d7388 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 4 Oct 2024 10:49:23 +0200 Subject: [PATCH] [warnings] fix integer narrowing --- server/proxy/pf_config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/proxy/pf_config.c b/server/proxy/pf_config.c index 216d1e82f..42be9eb66 100644 --- a/server/proxy/pf_config.c +++ b/server/proxy/pf_config.c @@ -930,8 +930,10 @@ static BOOL pf_config_copy_string_list(char*** dst, size_t* size, char** src, si *dst = NULL; *size = 0; - if (srcSize == 0) - return TRUE; + if (srcSize > INT32_MAX) + return FALSE; + + if (srcSize != 0) { char* csv = CommandLineToCommaSeparatedValues(srcSize, src); *dst = CommandLineParseCommaSeparatedValues(csv, size);