[warnings] fix integer narrowing

This commit is contained in:
akallabeth 2024-10-04 10:49:23 +02:00
parent 62e556f4d0
commit 15d408d6fc
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -930,8 +930,10 @@ static BOOL pf_config_copy_string_list(char*** dst, size_t* size, char** src, si
*dst = NULL; *dst = NULL;
*size = 0; *size = 0;
if (srcSize == 0) if (srcSize > INT32_MAX)
return TRUE; return FALSE;
if (srcSize != 0)
{ {
char* csv = CommandLineToCommaSeparatedValues(srcSize, src); char* csv = CommandLineToCommaSeparatedValues(srcSize, src);
*dst = CommandLineParseCommaSeparatedValues(csv, size); *dst = CommandLineParseCommaSeparatedValues(csv, size);