freerdp_assistance_encrypt_pass_stub:
  875|    320|{
  876|    320|	BOOL rc = 0;
  877|    320|	size_t cbPasswordW = 0;
  878|    320|	size_t cbPassStubW = 0;
  879|    320|	BYTE PasswordHash[WINPR_MD5_DIGEST_LENGTH] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    320|	{                      \
  |  |   85|    320|	} /** @since version 3.24.0 */
  ------------------
  880|    320|	WINPR_RC4_CTX* rc4Ctx = nullptr;
  881|    320|	BYTE* pbIn = nullptr;
  882|    320|	BYTE* pbOut = nullptr;
  883|    320|	BYTE* res = nullptr;
  884|    320|	WCHAR* PasswordW = ConvertUtf8ToWCharAlloc(password, &cbPasswordW);
  885|    320|	WCHAR* PassStubW = ConvertUtf8ToWCharAlloc(passStub, &cbPassStubW);
  886|       |
  887|    320|	cbPasswordW = cbPasswordW * sizeof(WCHAR);
  888|    320|	cbPassStubW = cbPassStubW * sizeof(WCHAR);
  889|    320|	const size_t EncryptedSize = cbPassStubW + 4;
  890|       |
  891|    320|	if (!PasswordW || !PassStubW)
  ------------------
  |  Branch (891:6): [True: 0, False: 320]
  |  Branch (891:20): [True: 74, False: 246]
  ------------------
  892|     74|		goto fail;
  893|       |
  894|    246|	if (!winpr_Digest(WINPR_MD_MD5, (BYTE*)PasswordW, cbPasswordW, (BYTE*)PasswordHash,
  ------------------
  |  Branch (894:6): [True: 0, False: 246]
  ------------------
  895|    246|	                  sizeof(PasswordHash)))
  896|      0|		goto fail;
  897|       |
  898|    246|	pbIn = (BYTE*)calloc(1, EncryptedSize);
  899|    246|	pbOut = (BYTE*)calloc(1, EncryptedSize);
  900|       |
  901|    246|	if (!pbIn || !pbOut)
  ------------------
  |  Branch (901:6): [True: 0, False: 246]
  |  Branch (901:15): [True: 0, False: 246]
  ------------------
  902|      0|		goto fail;
  903|       |
  904|    246|	WINPR_ASSERT(cbPasswordW <= UINT32_MAX);
  ------------------
  |  |   76|    246|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    246|	do                                                                                             \
  |  |  |  |   61|    246|	{                                                                                              \
  |  |  |  |   62|    246|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    246|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    246|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    246|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    246|                                                                                                   \
  |  |  |  |   70|    246|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    246|	do                                                      \
  |  |  |  |  |  |   32|    246|	{                                                       \
  |  |  |  |  |  |   33|    246|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    246|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    246|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    246|                                                                                                   \
  |  |  |  |   72|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    246|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    246|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    246|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 246]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  905|    246|	winpr_Data_Write_UINT32(pbIn, (UINT32)cbPassStubW);
  906|    246|	CopyMemory(&pbIn[4], PassStubW, cbPassStubW);
  ------------------
  |  |  123|    246|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  907|    246|	rc4Ctx = winpr_RC4_New(PasswordHash, sizeof(PasswordHash));
  908|       |
  909|    246|	if (!rc4Ctx)
  ------------------
  |  Branch (909:6): [True: 0, False: 246]
  ------------------
  910|      0|	{
  911|      0|		WLog_ERR(TAG, "winpr_Cipher_New failure");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  912|      0|		goto fail;
  913|      0|	}
  914|       |
  915|    246|	rc = winpr_RC4_Update(rc4Ctx, EncryptedSize, pbIn, pbOut);
  916|       |
  917|    246|	if (!rc)
  ------------------
  |  Branch (917:6): [True: 0, False: 246]
  ------------------
  918|      0|	{
  919|      0|		WLog_ERR(TAG, "winpr_Cipher_Update failure");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  920|      0|		goto fail;
  921|      0|	}
  922|    246|	res = pbOut;
  923|    320|fail:
  924|    320|	winpr_RC4_Free(rc4Ctx);
  925|    320|	free(PasswordW);
  926|    320|	free(PassStubW);
  927|    320|	free(pbIn);
  928|    320|	if (!res)
  ------------------
  |  Branch (928:6): [True: 74, False: 246]
  ------------------
  929|     74|		free(pbOut);
  930|    246|	else
  931|    246|		*pEncryptedSize = EncryptedSize;
  932|    320|	return res;
  933|    246|}
freerdp_assistance_hex_string_to_bin:
 1029|    434|{
 1030|    434|	BYTE* buffer = nullptr;
 1031|    434|	if (!str || !size)
  ------------------
  |  Branch (1031:6): [True: 0, False: 434]
  |  Branch (1031:14): [True: 0, False: 434]
  ------------------
 1032|      0|		return nullptr;
 1033|    434|	*size = 0;
 1034|    434|	const size_t length = strlen(str);
 1035|    434|	buffer = calloc(length, sizeof(BYTE));
 1036|    434|	if (!buffer)
  ------------------
  |  Branch (1036:6): [True: 0, False: 434]
  ------------------
 1037|      0|		return nullptr;
 1038|    434|	const size_t rc = winpr_HexStringToBinBuffer(str, length, buffer, length);
 1039|    434|	if (rc == 0)
  ------------------
  |  Branch (1039:6): [True: 1, False: 433]
  ------------------
 1040|      1|	{
 1041|      1|		free(buffer);
 1042|      1|		return nullptr;
 1043|      1|	}
 1044|    433|	*size = rc;
 1045|    433|	return buffer;
 1046|    434|}
freerdp_assistance_parse_file_buffer:
 1211|  2.10k|{
 1212|  2.10k|	WINPR_ASSERT(file);
  ------------------
  |  |   76|  2.10k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.10k|	do                                                                                             \
  |  |  |  |   61|  2.10k|	{                                                                                              \
  |  |  |  |   62|  2.10k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.10k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.10k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.10k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.10k|                                                                                                   \
  |  |  |  |   70|  2.10k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.10k|	do                                                      \
  |  |  |  |  |  |   32|  2.10k|	{                                                       \
  |  |  |  |  |  |   33|  2.10k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.10k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.10k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.10k|                                                                                                   \
  |  |  |  |   72|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.10k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.10k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.10k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1213|  2.10k|	if (!password)
  ------------------
  |  Branch (1213:6): [True: 0, False: 2.10k]
  ------------------
 1214|      0|	{
 1215|      0|		WLog_WARN(TAG, "empty password supplied");
  ------------------
  |  |  346|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1216|      0|	}
 1217|       |
 1218|  2.10k|	if (!cbuffer || (size == 0))
  ------------------
  |  Branch (1218:6): [True: 0, False: 2.10k]
  |  Branch (1218:18): [True: 0, False: 2.10k]
  ------------------
 1219|      0|	{
 1220|      0|		WLog_WARN(TAG, "no data supplied [%p, %" PRIuz "]",
  ------------------
  |  |  346|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1221|      0|		          WINPR_CXX_COMPAT_CAST(const void*, cbuffer), size);
 1222|      0|		return -1;
 1223|      0|	}
 1224|       |
 1225|  2.10k|	char* abuffer = strndup(cbuffer, size);
 1226|  2.10k|	const size_t len = strnlen(cbuffer, size);
 1227|  2.10k|	if (len == size)
  ------------------
  |  Branch (1227:6): [True: 0, False: 2.10k]
  ------------------
 1228|      0|		WLog_WARN(TAG, "Input data not '\\0' terminated");
  ------------------
  |  |  346|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1229|       |
 1230|  2.10k|	if (!abuffer)
  ------------------
  |  Branch (1230:6): [True: 0, False: 2.10k]
  ------------------
 1231|      0|		return -1;
 1232|       |
 1233|  2.10k|	const int rc = freerdp_assistance_parse_file_buffer_int(file, abuffer, len + 1, password);
 1234|  2.10k|	free(abuffer);
 1235|  2.10k|	return rc;
 1236|  2.10k|}
freerdp_assistance_file_new:
 1407|  2.10k|{
 1408|  2.10k|	if (!winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT))
  ------------------
  |  |   27|  2.10k|#define WINPR_SSL_INIT_DEFAULT 0x00
  ------------------
  |  Branch (1408:6): [True: 0, False: 2.10k]
  ------------------
 1409|      0|		return nullptr;
 1410|       |
 1411|  2.10k|	rdpAssistanceFile* file = calloc(1, sizeof(rdpAssistanceFile));
 1412|  2.10k|	if (!file)
  ------------------
  |  Branch (1412:6): [True: 0, False: 2.10k]
  ------------------
 1413|      0|		return nullptr;
 1414|       |
 1415|  2.10k|	file->MachineAddresses = ArrayList_New(FALSE);
  ------------------
  |  |  122|  2.10k|#define FALSE false
  ------------------
 1416|  2.10k|	file->MachinePorts = ArrayList_New(FALSE);
  ------------------
  |  |  122|  2.10k|#define FALSE false
  ------------------
 1417|  2.10k|	file->MachineUris = ArrayList_New(FALSE);
  ------------------
  |  |  122|  2.10k|#define FALSE false
  ------------------
 1418|       |
 1419|  2.10k|	if (!file->MachineAddresses || !file->MachinePorts || !file->MachineUris)
  ------------------
  |  Branch (1419:6): [True: 0, False: 2.10k]
  |  Branch (1419:33): [True: 0, False: 2.10k]
  |  Branch (1419:56): [True: 0, False: 2.10k]
  ------------------
 1420|      0|		goto fail;
 1421|       |
 1422|  2.10k|	if (!setup_string(file->MachineAddresses) || !setup_string(file->MachineUris))
  ------------------
  |  Branch (1422:6): [True: 0, False: 2.10k]
  |  Branch (1422:47): [True: 0, False: 2.10k]
  ------------------
 1423|      0|		goto fail;
 1424|       |
 1425|  2.10k|	return file;
 1426|       |
 1427|      0|fail:
 1428|      0|	WINPR_PRAGMA_DIAG_PUSH
 1429|      0|	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
 1430|      0|	freerdp_assistance_file_free(file);
 1431|      0|	WINPR_PRAGMA_DIAG_POP
 1432|      0|	return nullptr;
 1433|  2.10k|}
freerdp_assistance_file_free:
 1436|  2.10k|{
 1437|  2.10k|	if (!file)
  ------------------
  |  Branch (1437:6): [True: 0, False: 2.10k]
  ------------------
 1438|      0|		return;
 1439|       |
 1440|  2.10k|	update_password(file, nullptr);
 1441|  2.10k|	update_connectionstring2(file, nullptr, 0);
 1442|  2.10k|	free(file->filename);
 1443|  2.10k|	free(file->Username);
 1444|  2.10k|	free(file->LHTicket);
 1445|  2.10k|	free(file->RCTicket);
 1446|  2.10k|	free(file->PassStub);
 1447|  2.10k|	free(file->ConnectionString1);
 1448|  2.10k|	free(file->EncryptedLHTicket);
 1449|  2.10k|	free(file->RASessionId);
 1450|  2.10k|	free(file->RASpecificParams);
 1451|  2.10k|	free(file->RASpecificParams2);
 1452|  2.10k|	free(file->EncryptedPassStub);
 1453|       |
 1454|  2.10k|	ArrayList_Free(file->MachineAddresses);
 1455|  2.10k|	ArrayList_Free(file->MachinePorts);
 1456|  2.10k|	ArrayList_Free(file->MachineUris);
 1457|  2.10k|	free(file);
 1458|  2.10k|}
assistance.c:freerdp_assistance_parse_file_buffer_int:
 1178|  2.10k|{
 1179|  2.10k|	WINPR_ASSERT(file);
  ------------------
  |  |   76|  2.10k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.10k|	do                                                                                             \
  |  |  |  |   61|  2.10k|	{                                                                                              \
  |  |  |  |   62|  2.10k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.10k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.10k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.10k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.10k|                                                                                                   \
  |  |  |  |   70|  2.10k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.10k|	do                                                      \
  |  |  |  |  |  |   32|  2.10k|	{                                                       \
  |  |  |  |  |  |   33|  2.10k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.10k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.10k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.10k|                                                                                                   \
  |  |  |  |   72|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.10k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.10k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.10k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1180|  2.10k|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|  2.10k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.10k|	do                                                                                             \
  |  |  |  |   61|  2.10k|	{                                                                                              \
  |  |  |  |   62|  2.10k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.10k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.10k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.10k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.10k|                                                                                                   \
  |  |  |  |   70|  2.10k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.10k|	do                                                      \
  |  |  |  |  |  |   32|  2.10k|	{                                                       \
  |  |  |  |  |  |   33|  2.10k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.10k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.10k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.10k|                                                                                                   \
  |  |  |  |   72|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.10k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.10k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.10k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1181|  2.10k|	WINPR_ASSERT(size > 0);
  ------------------
  |  |   76|  2.10k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.10k|	do                                                                                             \
  |  |  |  |   61|  2.10k|	{                                                                                              \
  |  |  |  |   62|  2.10k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.10k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.10k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.10k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.10k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.10k|                                                                                                   \
  |  |  |  |   70|  2.10k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.10k|	do                                                      \
  |  |  |  |  |  |   32|  2.10k|	{                                                       \
  |  |  |  |  |  |   33|  2.10k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.10k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.10k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.10k|                                                                                                   \
  |  |  |  |   72|  2.10k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.10k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.10k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.10k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1182|       |
 1183|  2.10k|	if (!update_password(file, password))
  ------------------
  |  Branch (1183:6): [True: 0, False: 2.10k]
  ------------------
 1184|      0|		return -1;
 1185|       |
 1186|  2.10k|	char* uploadinfo = nullptr;
 1187|  2.10k|	size_t uploadinfosize = 0;
 1188|  2.10k|	if (freerdp_assistance_consume_input_and_get_element(buffer, size, "UPLOADINFO", &uploadinfo,
  ------------------
  |  Branch (1188:6): [True: 1.22k, False: 880]
  ------------------
 1189|  2.10k|	                                                     &uploadinfosize))
 1190|  1.22k|		return freerdp_assistance_parse_uploadinfo(file, uploadinfo, uploadinfosize);
 1191|       |
 1192|    880|	size_t elen = 0;
 1193|    880|	const char* estr =
 1194|    880|	    freerdp_assistance_contains_element(buffer, size, "E", &elen, nullptr, nullptr);
 1195|    880|	if (!estr || (elen == 0))
  ------------------
  |  Branch (1195:6): [True: 174, False: 706]
  |  Branch (1195:15): [True: 0, False: 706]
  ------------------
 1196|    174|	{
 1197|    174|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: Neither UPLOADINFO nor <E> found");
  ------------------
  |  |  348|    174|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1198|    174|		return -1;
 1199|    174|	}
 1200|    706|	if (!update_connectionstring2(file, estr, elen))
  ------------------
  |  Branch (1200:6): [True: 0, False: 706]
  ------------------
 1201|      0|		return -1;
 1202|       |
 1203|    706|	if (!freerdp_assistance_parse_connection_string2(file))
  ------------------
  |  Branch (1203:6): [True: 212, False: 494]
  ------------------
 1204|    212|		return -1;
 1205|       |
 1206|    494|	return 1;
 1207|    706|}
assistance.c:freerdp_assistance_consume_input_and_get_element:
  624|  4.05k|{
  625|  4.05k|	WINPR_ASSERT(input);
  ------------------
  |  |   76|  4.05k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.05k|	do                                                                                             \
  |  |  |  |   61|  4.05k|	{                                                                                              \
  |  |  |  |   62|  4.05k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.05k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.05k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.05k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.05k|                                                                                                   \
  |  |  |  |   70|  4.05k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.05k|	do                                                      \
  |  |  |  |  |  |   32|  4.05k|	{                                                       \
  |  |  |  |  |  |   33|  4.05k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.05k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.05k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.05k|                                                                                                   \
  |  |  |  |   72|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.05k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.05k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.05k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  626|  4.05k|	WINPR_ASSERT(key);
  ------------------
  |  |   76|  4.05k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.05k|	do                                                                                             \
  |  |  |  |   61|  4.05k|	{                                                                                              \
  |  |  |  |   62|  4.05k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.05k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.05k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.05k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.05k|                                                                                                   \
  |  |  |  |   70|  4.05k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.05k|	do                                                      \
  |  |  |  |  |  |   32|  4.05k|	{                                                       \
  |  |  |  |  |  |   33|  4.05k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.05k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.05k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.05k|                                                                                                   \
  |  |  |  |   72|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.05k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.05k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.05k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  627|  4.05k|	WINPR_ASSERT(element);
  ------------------
  |  |   76|  4.05k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.05k|	do                                                                                             \
  |  |  |  |   61|  4.05k|	{                                                                                              \
  |  |  |  |   62|  4.05k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.05k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.05k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.05k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.05k|                                                                                                   \
  |  |  |  |   70|  4.05k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.05k|	do                                                      \
  |  |  |  |  |  |   32|  4.05k|	{                                                       \
  |  |  |  |  |  |   33|  4.05k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.05k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.05k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.05k|                                                                                                   \
  |  |  |  |   72|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.05k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.05k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.05k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|  4.05k|	WINPR_ASSERT(elen);
  ------------------
  |  |   76|  4.05k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.05k|	do                                                                                             \
  |  |  |  |   61|  4.05k|	{                                                                                              \
  |  |  |  |   62|  4.05k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.05k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.05k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.05k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.05k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.05k|                                                                                                   \
  |  |  |  |   70|  4.05k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.05k|	do                                                      \
  |  |  |  |  |  |   32|  4.05k|	{                                                       \
  |  |  |  |  |  |   33|  4.05k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.05k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.05k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.05k|                                                                                                   \
  |  |  |  |   72|  4.05k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.05k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.05k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.05k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|       |
  630|  4.05k|	size_t len = 0;
  631|  4.05k|	size_t dlen = 0;
  632|  4.05k|	char* data = nullptr;
  633|  4.05k|	char* tag = freerdp_assistance_contains_element(input, ilen, key, &len, &data, &dlen);
  634|  4.05k|	if (!tag)
  ------------------
  |  Branch (634:6): [True: 1.06k, False: 2.99k]
  ------------------
  635|  1.06k|		return FALSE;
  ------------------
  |  |  122|  1.06k|#define FALSE false
  ------------------
  636|       |
  637|  2.99k|	char* end = data + dlen;
  638|  2.99k|	*tag = '\0';
  639|  2.99k|	*end = '\0';
  640|  2.99k|	*element = data;
  641|  2.99k|	*elen = dlen + 1;
  642|  2.99k|	return TRUE;
  ------------------
  |  |  126|  2.99k|#define TRUE true
  ------------------
  643|  4.05k|}
assistance.c:freerdp_assistance_parse_uploadinfo:
 1055|  1.22k|{
 1056|  1.22k|	const char escalated[9] = { 'E', 's', 'c', 'a', 'l', 'a', 't', 'e', 'd' };
 1057|  1.22k|	const size_t esclen = sizeof(escalated);
 1058|  1.22k|	const char* typestr = nullptr;
 1059|  1.22k|	size_t typelen = 0;
 1060|       |
 1061|  1.22k|	if (!uploadinfo || (uploadinfosize == 0))
  ------------------
  |  Branch (1061:6): [True: 0, False: 1.22k]
  |  Branch (1061:21): [True: 0, False: 1.22k]
  ------------------
 1062|      0|		return -1;
 1063|       |
 1064|  1.22k|	const size_t ulen = strnlen(uploadinfo, uploadinfosize);
 1065|  1.22k|	if (ulen == uploadinfosize)
  ------------------
  |  Branch (1065:6): [True: 0, False: 1.22k]
  ------------------
 1066|      0|	{
 1067|      0|		WLog_WARN(TAG, "UPLOADINFOR string is not '\\0' terminated");
  ------------------
  |  |  346|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1068|      0|		return -1;
 1069|      0|	}
 1070|       |
 1071|  1.22k|	if (!freerdp_assistance_parse_attr(&typestr, &typelen, "TYPE", uploadinfo))
  ------------------
  |  Branch (1071:6): [True: 2, False: 1.21k]
  ------------------
 1072|      2|		return -1;
 1073|       |
 1074|  1.21k|	if ((typelen != esclen) || (strncmp(typestr, escalated, esclen) != 0))
  ------------------
  |  Branch (1074:6): [True: 56, False: 1.16k]
  |  Branch (1074:29): [True: 72, False: 1.09k]
  ------------------
 1075|    128|	{
 1076|    128|		WLog_ERR(TAG,
  ------------------
  |  |  348|    128|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1077|    128|		         "Failed to parse ASSISTANCE file: Missing or invalid UPLOADINFO TYPE '%s' [%" PRIuz
 1078|    128|		         "]",
 1079|    128|		         typestr, typelen);
 1080|    128|		return -1;
 1081|    128|	}
 1082|       |
 1083|  1.09k|	char* uploaddata = nullptr;
 1084|  1.09k|	size_t uploaddatasize = 0;
 1085|  1.09k|	if (!freerdp_assistance_consume_input_and_get_element(uploadinfo, ulen, "UPLOADDATA",
  ------------------
  |  Branch (1085:6): [True: 11, False: 1.07k]
  ------------------
 1086|  1.09k|	                                                      &uploaddata, &uploaddatasize))
 1087|     11|		return -1;
 1088|       |
 1089|       |	/* Parse USERNAME */
 1090|  1.07k|	if (!freerdp_assistance_parse_attr_str(&file->Username, "USERNAME", uploaddata))
  ------------------
  |  Branch (1090:6): [True: 1, False: 1.07k]
  ------------------
 1091|      1|		return -1;
 1092|       |
 1093|       |	/* Parse LHTICKET */
 1094|  1.07k|	if (!freerdp_assistance_parse_attr_str(&file->LHTicket, "LHTICKET", uploaddata))
  ------------------
  |  Branch (1094:6): [True: 3, False: 1.07k]
  ------------------
 1095|      3|		return -1;
 1096|       |
 1097|       |	/* Parse RCTICKET */
 1098|  1.07k|	if (!freerdp_assistance_parse_attr_str(&file->RCTicket, "RCTICKET", uploaddata))
  ------------------
  |  Branch (1098:6): [True: 1, False: 1.07k]
  ------------------
 1099|      1|		return -1;
 1100|       |
 1101|       |	/* Parse RCTICKETENCRYPTED */
 1102|  1.07k|	if (!freerdp_assistance_parse_attr_bool(&file->RCTicketEncrypted, "RCTICKETENCRYPTED",
  ------------------
  |  Branch (1102:6): [True: 1, False: 1.07k]
  ------------------
 1103|  1.07k|	                                        uploaddata))
 1104|      1|		return -1;
 1105|       |
 1106|       |	/* Parse PassStub */
 1107|  1.07k|	if (!freerdp_assistance_parse_attr_str(&file->PassStub, "PassStub", uploaddata))
  ------------------
  |  Branch (1107:6): [True: 1, False: 1.07k]
  ------------------
 1108|      1|		return -1;
 1109|       |
 1110|  1.07k|	if (file->PassStub)
  ------------------
  |  Branch (1110:6): [True: 272, False: 800]
  ------------------
 1111|    272|	{
 1112|    272|		const char* amp = "&amp;";
 1113|    272|		char* passtub = strstr(file->PassStub, amp);
 1114|    530|		while (passtub)
  ------------------
  |  Branch (1114:10): [True: 258, False: 272]
  ------------------
 1115|    258|		{
 1116|    258|			const char* end = passtub + 5;
 1117|    258|			const size_t len = strlen(end);
 1118|    258|			memmove(&passtub[1], end, len + 1);
 1119|    258|			passtub = strstr(passtub, amp);
 1120|    258|		}
 1121|    272|	}
 1122|       |
 1123|       |	/* Parse DtStart */
 1124|  1.07k|	if (!freerdp_assistance_parse_attr_uint32(&file->DtStart, "DtStart", uploaddata))
  ------------------
  |  Branch (1124:6): [True: 3, False: 1.06k]
  ------------------
 1125|      3|		return -1;
 1126|       |
 1127|       |	/* Parse DtLength */
 1128|  1.06k|	if (!freerdp_assistance_parse_attr_uint32(&file->DtLength, "DtLength", uploaddata))
  ------------------
  |  Branch (1128:6): [True: 3, False: 1.06k]
  ------------------
 1129|      3|		return -1;
 1130|       |
 1131|       |	/* Parse L (LowSpeed) */
 1132|  1.06k|	if (!freerdp_assistance_parse_attr_bool(&file->LowSpeed, "L", uploaddata))
  ------------------
  |  Branch (1132:6): [True: 1, False: 1.06k]
  ------------------
 1133|      1|		return -1;
 1134|       |
 1135|  1.06k|	file->Type = (file->LHTicket) ? 2 : 1;
  ------------------
  |  Branch (1135:15): [True: 434, False: 631]
  ------------------
 1136|  1.06k|	int status = 0;
 1137|       |
 1138|  1.06k|	switch (file->Type)
 1139|  1.06k|	{
 1140|    434|		case 2:
  ------------------
  |  Branch (1140:3): [True: 434, False: 631]
  ------------------
 1141|    434|		{
 1142|    434|			file->EncryptedLHTicket = freerdp_assistance_hex_string_to_bin(
 1143|    434|			    file->LHTicket, &file->EncryptedLHTicketLength);
 1144|       |
 1145|    434|			if (!freerdp_assistance_decrypt2(file))
  ------------------
  |  Branch (1145:8): [True: 434, False: 0]
  ------------------
 1146|    434|				status = -1;
 1147|    434|		}
 1148|    434|		break;
 1149|       |
 1150|    631|		case 1:
  ------------------
  |  Branch (1150:3): [True: 631, False: 434]
  ------------------
 1151|    631|		{
 1152|    631|			if (!freerdp_assistance_parse_connection_string1(file))
  ------------------
  |  Branch (1152:8): [True: 311, False: 320]
  ------------------
 1153|    311|				status = -1;
 1154|    631|		}
 1155|    631|		break;
 1156|       |
 1157|      0|		default:
  ------------------
  |  Branch (1157:3): [True: 0, False: 1.06k]
  ------------------
 1158|      0|			return -1;
 1159|  1.06k|	}
 1160|       |
 1161|  1.06k|	if (status < 0)
  ------------------
  |  Branch (1161:6): [True: 745, False: 320]
  ------------------
 1162|    745|	{
 1163|    745|		WLog_ERR(TAG, "freerdp_assistance_parse_connection_string1 failure: %d", status);
  ------------------
  |  |  348|    745|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1164|    745|		return -1;
 1165|    745|	}
 1166|       |
 1167|    320|	file->EncryptedPassStub = freerdp_assistance_encrypt_pass_stub(file->password, file->PassStub,
 1168|    320|	                                                               &file->EncryptedPassStubLength);
 1169|       |
 1170|    320|	if (!file->EncryptedPassStub)
  ------------------
  |  Branch (1170:6): [True: 74, False: 246]
  ------------------
 1171|     74|		return -1;
 1172|       |
 1173|    246|	return 1;
 1174|    320|}
assistance.c:freerdp_assistance_parse_attr:
  423|  34.2k|{
  424|  34.2k|	WINPR_ASSERT(opt);
  ------------------
  |  |   76|  34.2k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  34.2k|	do                                                                                             \
  |  |  |  |   61|  34.2k|	{                                                                                              \
  |  |  |  |   62|  34.2k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  34.2k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  34.2k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  34.2k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  34.2k|                                                                                                   \
  |  |  |  |   70|  34.2k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  34.2k|	do                                                      \
  |  |  |  |  |  |   32|  34.2k|	{                                                       \
  |  |  |  |  |  |   33|  34.2k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  34.2k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  34.2k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  34.2k|                                                                                                   \
  |  |  |  |   72|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  34.2k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  34.2k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  34.2k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 34.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  425|  34.2k|	WINPR_ASSERT(plength);
  ------------------
  |  |   76|  34.2k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  34.2k|	do                                                                                             \
  |  |  |  |   61|  34.2k|	{                                                                                              \
  |  |  |  |   62|  34.2k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  34.2k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  34.2k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  34.2k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  34.2k|                                                                                                   \
  |  |  |  |   70|  34.2k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  34.2k|	do                                                      \
  |  |  |  |  |  |   32|  34.2k|	{                                                       \
  |  |  |  |  |  |   33|  34.2k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  34.2k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  34.2k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  34.2k|                                                                                                   \
  |  |  |  |   72|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  34.2k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  34.2k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  34.2k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 34.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  426|  34.2k|	WINPR_ASSERT(key);
  ------------------
  |  |   76|  34.2k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  34.2k|	do                                                                                             \
  |  |  |  |   61|  34.2k|	{                                                                                              \
  |  |  |  |   62|  34.2k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  34.2k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  34.2k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  34.2k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  34.2k|                                                                                                   \
  |  |  |  |   70|  34.2k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  34.2k|	do                                                      \
  |  |  |  |  |  |   32|  34.2k|	{                                                       \
  |  |  |  |  |  |   33|  34.2k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  34.2k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  34.2k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  34.2k|                                                                                                   \
  |  |  |  |   72|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  34.2k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  34.2k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  34.2k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 34.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  427|       |
  428|  34.2k|	*opt = nullptr;
  429|  34.2k|	*plength = 0;
  430|  34.2k|	if (!tag)
  ------------------
  |  Branch (430:6): [True: 0, False: 34.2k]
  ------------------
  431|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  432|       |
  433|  34.2k|	char bkey[128] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  34.2k|	{                      \
  |  |   85|  34.2k|	} /** @since version 3.24.0 */
  ------------------
  434|  34.2k|	const int rc = _snprintf(bkey, sizeof(bkey), "%s=\"", key);
  ------------------
  |  |  251|  34.2k|#define _snprintf snprintf
  ------------------
  435|  34.2k|	WINPR_ASSERT(rc > 0);
  ------------------
  |  |   76|  34.2k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  34.2k|	do                                                                                             \
  |  |  |  |   61|  34.2k|	{                                                                                              \
  |  |  |  |   62|  34.2k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  34.2k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  34.2k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  34.2k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  34.2k|                                                                                                   \
  |  |  |  |   70|  34.2k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  34.2k|	do                                                      \
  |  |  |  |  |  |   32|  34.2k|	{                                                       \
  |  |  |  |  |  |   33|  34.2k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  34.2k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  34.2k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  34.2k|                                                                                                   \
  |  |  |  |   72|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  34.2k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  34.2k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  34.2k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 34.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  436|  34.2k|	WINPR_ASSERT((size_t)rc < sizeof(bkey));
  ------------------
  |  |   76|  34.2k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  34.2k|	do                                                                                             \
  |  |  |  |   61|  34.2k|	{                                                                                              \
  |  |  |  |   62|  34.2k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  34.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  34.2k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  34.2k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  34.2k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  34.2k|                                                                                                   \
  |  |  |  |   70|  34.2k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  34.2k|	do                                                      \
  |  |  |  |  |  |   32|  34.2k|	{                                                       \
  |  |  |  |  |  |   33|  34.2k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  34.2k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  34.2k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 34.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  34.2k|                                                                                                   \
  |  |  |  |   72|  34.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  34.2k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  34.2k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  34.2k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 34.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  437|  34.2k|	if ((rc <= 0) || ((size_t)rc >= sizeof(bkey)))
  ------------------
  |  Branch (437:6): [True: 0, False: 34.2k]
  |  Branch (437:19): [True: 0, False: 34.2k]
  ------------------
  438|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  439|       |
  440|  34.2k|	const char* p = strstr(tag, bkey);
  441|  34.2k|	if (!p)
  ------------------
  |  Branch (441:6): [True: 25.0k, False: 9.21k]
  ------------------
  442|  25.0k|		return TRUE;
  ------------------
  |  |  126|  25.0k|#define TRUE true
  ------------------
  443|       |
  444|  9.21k|	p += strlen(bkey);
  445|  9.21k|	const char* q = strchr(p, '"');
  446|       |
  447|  9.21k|	if (!q)
  ------------------
  |  Branch (447:6): [True: 94, False: 9.12k]
  ------------------
  448|     94|	{
  449|     94|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: ConnectionString2 invalid field '%s=%s'",
  ------------------
  |  |  348|     94|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  450|     94|		         key, p);
  451|     94|		return FALSE;
  ------------------
  |  |  122|     94|#define FALSE false
  ------------------
  452|     94|	}
  453|       |
  454|  9.12k|	if (p > q)
  ------------------
  |  Branch (454:6): [True: 0, False: 9.12k]
  ------------------
  455|      0|	{
  456|      0|		WLog_ERR(TAG,
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  457|      0|		         "Failed to parse ASSISTANCE file: ConnectionString2 invalid field "
  458|      0|		         "order for '%s'",
  459|      0|		         key);
  460|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  461|      0|	}
  462|  9.12k|	const size_t length = WINPR_ASSERTING_INT_CAST(size_t, q - p);
  ------------------
  |  |  112|  9.12k|	__extension__({                                                                             \
  |  |  113|  9.12k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  9.12k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  9.12k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  9.12k|	do                                                                                             \
  |  |  |  |  |  |   61|  9.12k|	{                                                                                              \
  |  |  |  |  |  |   62|  9.12k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  9.12k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  9.12k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  9.12k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  9.12k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  9.12k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  9.12k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  9.12k|                                                                                                   \
  |  |  |  |  |  |   70|  9.12k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  9.12k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  9.12k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  9.12k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 9.12k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  9.12k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  9.12k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 9.12k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  9.12k|                                                                                                   \
  |  |  |  |  |  |   72|  9.12k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  9.12k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  9.12k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  9.12k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 9.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  9.12k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  9.12k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  9.12k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  9.12k|	do                                                                                             \
  |  |  |  |  |  |   61|  9.12k|	{                                                                                              \
  |  |  |  |  |  |   62|  9.12k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  9.12k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  9.12k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  9.12k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  9.12k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  9.12k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  9.12k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  9.12k|                                                                                                   \
  |  |  |  |  |  |   70|  9.12k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  9.12k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  9.12k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  33.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 6.06k, False: 3.05k]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 6.06k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 3.05k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 3.05k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  9.12k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  9.12k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 9.12k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  9.12k|                                                                                                   \
  |  |  |  |  |  |   72|  9.12k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  9.12k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  9.12k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  9.12k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 9.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  9.12k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  9.12k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  9.12k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  9.12k|	})
  ------------------
  463|  9.12k|	*opt = p;
  464|  9.12k|	*plength = length;
  465|       |
  466|  9.12k|	return TRUE;
  ------------------
  |  |  126|  9.12k|#define TRUE true
  ------------------
  467|  9.12k|}
assistance.c:freerdp_assistance_parse_attr_str:
  470|  5.85k|{
  471|  5.85k|	const char* copt = nullptr;
  472|  5.85k|	size_t size = 0;
  473|  5.85k|	if (!freerdp_assistance_parse_attr(&copt, &size, key, tag))
  ------------------
  |  Branch (473:6): [True: 55, False: 5.80k]
  ------------------
  474|     55|		return FALSE;
  ------------------
  |  |  122|     55|#define FALSE false
  ------------------
  475|  5.80k|	return update_option(opt, copt, size);
  476|  5.85k|}
assistance.c:update_option:
  100|  5.80k|{
  101|  5.80k|	WINPR_ASSERT(opt);
  ------------------
  |  |   76|  5.80k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  5.80k|	do                                                                                             \
  |  |  |  |   61|  5.80k|	{                                                                                              \
  |  |  |  |   62|  5.80k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  5.80k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  5.80k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  5.80k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  5.80k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  5.80k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  5.80k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  5.80k|                                                                                                   \
  |  |  |  |   70|  5.80k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  5.80k|	do                                                      \
  |  |  |  |  |  |   32|  5.80k|	{                                                       \
  |  |  |  |  |  |   33|  5.80k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 5.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  5.80k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  5.80k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 5.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  5.80k|                                                                                                   \
  |  |  |  |   72|  5.80k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  5.80k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  5.80k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  5.80k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 5.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|  5.80k|	free(*opt);
  103|  5.80k|	*opt = nullptr;
  104|       |
  105|  5.80k|	if (!val && (len != 0))
  ------------------
  |  Branch (105:6): [True: 4.44k, False: 1.36k]
  |  Branch (105:14): [True: 0, False: 4.44k]
  ------------------
  106|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  107|  5.80k|	else if (!val && (len == 0))
  ------------------
  |  Branch (107:11): [True: 4.44k, False: 1.36k]
  |  Branch (107:19): [True: 4.44k, False: 0]
  ------------------
  108|  4.44k|		return TRUE;
  ------------------
  |  |  126|  4.44k|#define TRUE true
  ------------------
  109|  1.36k|	*opt = strndup(val, len);
  110|  1.36k|	return *opt != nullptr;
  111|  5.80k|}
assistance.c:freerdp_assistance_parse_attr_bool:
  479|  2.14k|{
  480|  2.14k|	const char* copt = nullptr;
  481|  2.14k|	size_t size = 0;
  482|       |
  483|  2.14k|	WINPR_ASSERT(opt);
  ------------------
  |  |   76|  2.14k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.14k|	do                                                                                             \
  |  |  |  |   61|  2.14k|	{                                                                                              \
  |  |  |  |   62|  2.14k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.14k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.14k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.14k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.14k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.14k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.14k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.14k|                                                                                                   \
  |  |  |  |   70|  2.14k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.14k|	do                                                      \
  |  |  |  |  |  |   32|  2.14k|	{                                                       \
  |  |  |  |  |  |   33|  2.14k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.14k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.14k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.14k|                                                                                                   \
  |  |  |  |   72|  2.14k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.14k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.14k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.14k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|  2.14k|	*opt = FALSE;
  ------------------
  |  |  122|  2.14k|#define FALSE false
  ------------------
  485|       |
  486|  2.14k|	if (!freerdp_assistance_parse_attr(&copt, &size, key, tag))
  ------------------
  |  Branch (486:6): [True: 2, False: 2.13k]
  ------------------
  487|      2|		return FALSE;
  ------------------
  |  |  122|      2|#define FALSE false
  ------------------
  488|  2.13k|	if (size != 1)
  ------------------
  |  Branch (488:6): [True: 2.12k, False: 12]
  ------------------
  489|  2.12k|		return TRUE;
  ------------------
  |  |  126|  2.12k|#define TRUE true
  ------------------
  490|       |
  491|     12|	*opt = (copt[0] == '1');
  492|     12|	return TRUE;
  ------------------
  |  |  126|     12|#define TRUE true
  ------------------
  493|  2.13k|}
assistance.c:freerdp_assistance_parse_attr_uint32:
  496|  13.3k|{
  497|  13.3k|	const char* copt = nullptr;
  498|  13.3k|	size_t size = 0;
  499|       |
  500|  13.3k|	WINPR_ASSERT(opt);
  ------------------
  |  |   76|  13.3k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  13.3k|	do                                                                                             \
  |  |  |  |   61|  13.3k|	{                                                                                              \
  |  |  |  |   62|  13.3k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  13.3k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  13.3k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  13.3k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  13.3k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  13.3k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  13.3k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  13.3k|                                                                                                   \
  |  |  |  |   70|  13.3k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  13.3k|	do                                                      \
  |  |  |  |  |  |   32|  13.3k|	{                                                       \
  |  |  |  |  |  |   33|  13.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 13.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  13.3k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  13.3k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 13.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  13.3k|                                                                                                   \
  |  |  |  |   72|  13.3k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  13.3k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  13.3k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  13.3k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 13.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  501|  13.3k|	*opt = 0;
  502|       |
  503|  13.3k|	if (!freerdp_assistance_parse_attr(&copt, &size, key, tag))
  ------------------
  |  Branch (503:6): [True: 16, False: 13.3k]
  ------------------
  504|     16|		return FALSE;
  ------------------
  |  |  122|     16|#define FALSE false
  ------------------
  505|       |
  506|  13.3k|	char buffer[64] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  13.3k|	{                      \
  |  |   85|  13.3k|	} /** @since version 3.24.0 */
  ------------------
  507|  13.3k|	if ((!copt && (size > 0)) || (size >= sizeof(buffer)))
  ------------------
  |  Branch (507:7): [True: 11.8k, False: 1.47k]
  |  Branch (507:16): [True: 0, False: 11.8k]
  |  Branch (507:31): [True: 34, False: 13.3k]
  ------------------
  508|     34|	{
  509|     34|		WLog_WARN(TAG, "Invalid UINT32 string '%s' [%" PRIuz "]", copt, size);
  ------------------
  |  |  346|     34|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  510|     34|		return FALSE;
  ------------------
  |  |  122|     34|#define FALSE false
  ------------------
  511|     34|	}
  512|       |
  513|  13.3k|	if (size > 0)
  ------------------
  |  Branch (513:6): [True: 1.06k, False: 12.2k]
  ------------------
  514|  1.06k|		strncpy(buffer, copt, size);
  515|       |
  516|  13.3k|	errno = 0;
  517|  13.3k|	unsigned long val = strtoul(buffer, nullptr, 0);
  518|       |
  519|  13.3k|	if ((errno != 0) || (val > UINT32_MAX))
  ------------------
  |  Branch (519:6): [True: 2, False: 13.3k]
  |  Branch (519:22): [True: 71, False: 13.2k]
  ------------------
  520|     73|	{
  521|     73|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: Invalid value %s", buffer);
  ------------------
  |  |  348|     73|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  522|     73|		return FALSE;
  ------------------
  |  |  122|     73|#define FALSE false
  ------------------
  523|     73|	}
  524|       |
  525|  13.2k|	*opt = (UINT32)val;
  526|       |
  527|  13.2k|	return TRUE;
  ------------------
  |  |  126|  13.2k|#define TRUE true
  ------------------
  528|  13.3k|}
assistance.c:freerdp_assistance_decrypt2:
  936|    434|{
  937|    434|	BOOL rc = FALSE;
  ------------------
  |  |  122|    434|#define FALSE false
  ------------------
  938|    434|	int status = 0;
  939|    434|	size_t cbPasswordW = 0;
  940|    434|	size_t cchOutW = 0;
  941|    434|	WINPR_CIPHER_CTX* aesDec = nullptr;
  942|    434|	WCHAR* PasswordW = nullptr;
  943|    434|	BYTE* pbIn = nullptr;
  944|    434|	BYTE* pbOut = nullptr;
  945|    434|	size_t cbOut = 0;
  946|    434|	size_t cbIn = 0;
  947|    434|	size_t cbFinal = 0;
  948|    434|	BYTE DerivedKey[WINPR_AES_BLOCK_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    434|	{                      \
  |  |   85|    434|	} /** @since version 3.24.0 */
  ------------------
  949|    434|	BYTE InitializationVector[WINPR_AES_BLOCK_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    434|	{                      \
  |  |   85|    434|	} /** @since version 3.24.0 */
  ------------------
  950|    434|	BYTE PasswordHash[WINPR_SHA1_DIGEST_LENGTH] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    434|	{                      \
  |  |   85|    434|	} /** @since version 3.24.0 */
  ------------------
  951|       |
  952|    434|	WINPR_ASSERT(file);
  ------------------
  |  |   76|    434|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    434|	do                                                                                             \
  |  |  |  |   61|    434|	{                                                                                              \
  |  |  |  |   62|    434|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    434|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    434|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    434|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    434|                                                                                                   \
  |  |  |  |   70|    434|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    434|	do                                                      \
  |  |  |  |  |  |   32|    434|	{                                                       \
  |  |  |  |  |  |   33|    434|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    434|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    434|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    434|                                                                                                   \
  |  |  |  |   72|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    434|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    434|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    434|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 434]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  953|       |
  954|    434|	if (!file->password)
  ------------------
  |  Branch (954:6): [True: 0, False: 434]
  ------------------
  955|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  956|       |
  957|    434|	PasswordW = ConvertUtf8ToWCharAlloc(file->password, &cbPasswordW);
  958|    434|	if (!PasswordW)
  ------------------
  |  Branch (958:6): [True: 0, False: 434]
  ------------------
  959|      0|	{
  960|      0|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: Conversion from UCS2 to UTF8 failed");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  961|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  962|      0|	}
  963|       |
  964|    434|	cbPasswordW = cbPasswordW * sizeof(WCHAR);
  965|       |
  966|    434|	if (!winpr_Digest(WINPR_MD_SHA1, (BYTE*)PasswordW, cbPasswordW, PasswordHash,
  ------------------
  |  Branch (966:6): [True: 0, False: 434]
  ------------------
  967|    434|	                  sizeof(PasswordHash)))
  968|      0|		goto fail;
  969|       |
  970|    434|	if (!freerdp_assistance_crypt_derive_key_sha1(PasswordHash, sizeof(PasswordHash), DerivedKey,
  ------------------
  |  Branch (970:6): [True: 0, False: 434]
  ------------------
  971|    434|	                                              sizeof(DerivedKey)))
  972|      0|		goto fail;
  973|       |
  974|    434|	aesDec =
  975|    434|	    winpr_Cipher_NewEx(WINPR_CIPHER_AES_128_CBC, WINPR_DECRYPT, DerivedKey, sizeof(DerivedKey),
  976|    434|	                       InitializationVector, sizeof(InitializationVector));
  977|       |
  978|    434|	if (!aesDec)
  ------------------
  |  Branch (978:6): [True: 0, False: 434]
  ------------------
  979|      0|		goto fail;
  980|       |
  981|    434|	cbOut = cbFinal = 0;
  982|    434|	cbIn = file->EncryptedLHTicketLength;
  983|    434|	pbIn = file->EncryptedLHTicket;
  984|    434|	pbOut = (BYTE*)calloc(1, cbIn + WINPR_AES_BLOCK_SIZE + 2);
  ------------------
  |  |  205|    434|#define WINPR_AES_BLOCK_SIZE 16
  ------------------
  985|       |
  986|    434|	if (!pbOut)
  ------------------
  |  Branch (986:6): [True: 0, False: 434]
  ------------------
  987|      0|		goto fail;
  988|       |
  989|    434|	if (!winpr_Cipher_Update(aesDec, pbIn, cbIn, pbOut, &cbOut))
  ------------------
  |  Branch (989:6): [True: 0, False: 434]
  ------------------
  990|      0|		goto fail;
  991|       |
  992|    434|	if (!winpr_Cipher_Final(aesDec, pbOut + cbOut, &cbFinal))
  ------------------
  |  Branch (992:6): [True: 186, False: 248]
  ------------------
  993|    186|	{
  994|    186|		WLog_ERR(TAG, "winpr_Cipher_Final failure");
  ------------------
  |  |  348|    186|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  995|    186|		goto fail;
  996|    186|	}
  997|       |
  998|    248|	cbOut += cbFinal;
  999|    248|	cbFinal = 0;
 1000|       |
 1001|    248|	union
 1002|    248|	{
 1003|    248|		const WCHAR* wc;
 1004|    248|		const BYTE* b;
 1005|    248|	} cnv;
 1006|       |
 1007|    248|	cnv.b = pbOut;
 1008|    248|	cchOutW = cbOut / sizeof(WCHAR);
 1009|       |
 1010|    248|	if (!update_connectionstring2_wchar(file, cnv.wc, cchOutW))
  ------------------
  |  Branch (1010:6): [True: 85, False: 163]
  ------------------
 1011|     85|	{
 1012|     85|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: Conversion from UCS2 to UTF8 failed");
  ------------------
  |  |  348|     85|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1013|     85|		goto fail;
 1014|     85|	}
 1015|       |
 1016|    163|	if (!freerdp_assistance_parse_connection_string2(file))
  ------------------
  |  Branch (1016:6): [True: 163, False: 0]
  ------------------
 1017|    163|		goto fail;
 1018|       |
 1019|      0|	rc = TRUE;
  ------------------
  |  |  126|      0|#define TRUE true
  ------------------
 1020|    434|fail:
 1021|    434|	winpr_Cipher_Free(aesDec);
 1022|    434|	free(PasswordW);
 1023|    434|	free(pbOut);
 1024|    434|	WLog_DBG(TAG, "freerdp_assistance_parse_connection_string2: %d", status);
  ------------------
  |  |  342|    434|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
 1025|    434|	return rc;
 1026|      0|}
assistance.c:freerdp_assistance_crypt_derive_key_sha1:
  219|    434|{
  220|    434|	BOOL rc = FALSE;
  ------------------
  |  |  122|    434|#define FALSE false
  ------------------
  221|    434|	BYTE pad1[64] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    434|	{                      \
  |  |   85|    434|	} /** @since version 3.24.0 */
  ------------------
  222|    434|	BYTE pad2[64] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    434|	{                      \
  |  |   85|    434|	} /** @since version 3.24.0 */
  ------------------
  223|       |
  224|    434|	if (hashLength == 0)
  ------------------
  |  Branch (224:6): [True: 0, False: 434]
  ------------------
  225|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  226|       |
  227|    434|	memset(pad1, 0x36, sizeof(pad1));
  228|    434|	memset(pad2, 0x5C, sizeof(pad2));
  229|       |
  230|  9.11k|	for (size_t i = 0; i < hashLength; i++)
  ------------------
  |  Branch (230:21): [True: 8.68k, False: 434]
  ------------------
  231|  8.68k|	{
  232|  8.68k|		pad1[i] ^= hash[i];
  233|  8.68k|		pad2[i] ^= hash[i];
  234|  8.68k|	}
  235|       |
  236|    434|	BYTE* buffer = (BYTE*)calloc(hashLength, 2);
  237|       |
  238|    434|	if (!buffer)
  ------------------
  |  Branch (238:6): [True: 0, False: 434]
  ------------------
  239|      0|		goto fail;
  240|       |
  241|    434|	if (!winpr_Digest(WINPR_MD_SHA1, pad1, 64, buffer, hashLength))
  ------------------
  |  Branch (241:6): [True: 0, False: 434]
  ------------------
  242|      0|		goto fail;
  243|       |
  244|    434|	if (!winpr_Digest(WINPR_MD_SHA1, pad2, 64, &buffer[hashLength], hashLength))
  ------------------
  |  Branch (244:6): [True: 0, False: 434]
  ------------------
  245|      0|		goto fail;
  246|       |
  247|    434|	CopyMemory(key, buffer, keyLength);
  ------------------
  |  |  123|    434|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  248|    434|	rc = TRUE;
  ------------------
  |  |  126|    434|#define TRUE true
  ------------------
  249|    434|fail:
  250|    434|	free(buffer);
  251|    434|	return rc;
  252|    434|}
assistance.c:update_connectionstring2_wchar:
  166|    248|{
  167|    248|	char* strc = nullptr;
  168|       |
  169|    248|	if (!str && (len != 0))
  ------------------
  |  Branch (169:6): [True: 0, False: 248]
  |  Branch (169:14): [True: 0, False: 0]
  ------------------
  170|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  171|       |
  172|    248|	if (str && (len > 0))
  ------------------
  |  Branch (172:6): [True: 248, False: 0]
  |  Branch (172:13): [True: 247, False: 1]
  ------------------
  173|    247|	{
  174|    247|		strc = ConvertWCharNToUtf8Alloc(str, len, nullptr);
  175|    247|		if (!strc)
  ------------------
  |  Branch (175:7): [True: 85, False: 162]
  ------------------
  176|     85|			return FALSE;
  ------------------
  |  |  122|     85|#define FALSE false
  ------------------
  177|    247|	}
  178|    163|	return update_connectionstring2_nocopy(file, strc);
  179|    248|}
assistance.c:freerdp_assistance_parse_connection_string1:
  326|    631|{
  327|    631|	char* tokens[8] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    631|	{                      \
  |  |   85|    631|	} /** @since version 3.24.0 */
  ------------------
  328|    631|	BOOL rc = FALSE;
  ------------------
  |  |  122|    631|#define FALSE false
  ------------------
  329|       |
  330|    631|	WINPR_ASSERT(file);
  ------------------
  |  |   76|    631|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    631|	do                                                                                             \
  |  |  |  |   61|    631|	{                                                                                              \
  |  |  |  |   62|    631|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    631|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    631|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    631|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    631|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    631|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    631|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    631|                                                                                                   \
  |  |  |  |   70|    631|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    631|	do                                                      \
  |  |  |  |  |  |   32|    631|	{                                                       \
  |  |  |  |  |  |   33|    631|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 631]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    631|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    631|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 631]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    631|                                                                                                   \
  |  |  |  |   72|    631|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    631|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    631|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    631|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 631]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  331|       |
  332|    631|	if (!file->RCTicket)
  ------------------
  |  Branch (332:6): [True: 32, False: 599]
  ------------------
  333|     32|		return FALSE;
  ------------------
  |  |  122|     32|#define FALSE false
  ------------------
  334|       |
  335|       |	/**
  336|       |	 * <ProtocolVersion>,<protocolType>,<machineAddressList>,<assistantAccountPwd>,
  337|       |	 * <RASessionID>,<RASessionName>,<RASessionPwd>,<protocolSpecificParms>
  338|       |	 */
  339|    599|	char* str = _strdup(file->RCTicket);
  340|       |
  341|    599|	if (!str)
  ------------------
  |  Branch (341:6): [True: 0, False: 599]
  ------------------
  342|      0|		goto error;
  343|       |
  344|    599|	{
  345|    599|		const size_t length = strlen(str);
  346|       |
  347|    599|		{
  348|    599|			int count = 1;
  349|  4.58M|			for (size_t i = 0; i < length; i++)
  ------------------
  |  Branch (349:23): [True: 4.58M, False: 599]
  ------------------
  350|  4.58M|			{
  351|  4.58M|				if (str[i] == ',')
  ------------------
  |  Branch (351:9): [True: 86.0k, False: 4.49M]
  ------------------
  352|  86.0k|					count++;
  353|  4.58M|			}
  354|       |
  355|    599|			if (count != 8)
  ------------------
  |  Branch (355:8): [True: 42, False: 557]
  ------------------
  356|     42|				goto error;
  357|    599|		}
  358|       |
  359|    557|		{
  360|    557|			size_t count = 0;
  361|    557|			tokens[count++] = str;
  362|       |
  363|  4.23M|			for (size_t i = 0; i < length; i++)
  ------------------
  |  Branch (363:23): [True: 4.23M, False: 557]
  ------------------
  364|  4.23M|			{
  365|  4.23M|				if (str[i] == ',')
  ------------------
  |  Branch (365:9): [True: 3.89k, False: 4.22M]
  ------------------
  366|  3.89k|				{
  367|  3.89k|					str[i] = '\0';
  368|  3.89k|					tokens[count++] = &str[i + 1];
  369|  3.89k|				}
  370|  4.23M|			}
  371|    557|		}
  372|    557|	}
  373|       |
  374|    557|	if (strcmp(tokens[0], "65538") != 0)
  ------------------
  |  Branch (374:6): [True: 57, False: 500]
  ------------------
  375|     57|		goto error;
  376|       |
  377|    500|	if (strcmp(tokens[1], "1") != 0)
  ------------------
  |  Branch (377:6): [True: 6, False: 494]
  ------------------
  378|      6|		goto error;
  379|       |
  380|    494|	if (strcmp(tokens[3], "*") != 0)
  ------------------
  |  Branch (380:6): [True: 3, False: 491]
  ------------------
  381|      3|		goto error;
  382|       |
  383|    491|	if (strcmp(tokens[5], "*") != 0)
  ------------------
  |  Branch (383:6): [True: 2, False: 489]
  ------------------
  384|      2|		goto error;
  385|       |
  386|    489|	if (strcmp(tokens[6], "*") != 0)
  ------------------
  |  Branch (386:6): [True: 2, False: 487]
  ------------------
  387|      2|		goto error;
  388|       |
  389|    487|	file->RASessionId = _strdup(tokens[4]);
  390|       |
  391|    487|	if (!file->RASessionId)
  ------------------
  |  Branch (391:6): [True: 0, False: 487]
  ------------------
  392|      0|		goto error;
  393|       |
  394|    487|	file->RASpecificParams = _strdup(tokens[7]);
  395|       |
  396|    487|	if (!file->RASpecificParams)
  ------------------
  |  Branch (396:6): [True: 0, False: 487]
  ------------------
  397|      0|		goto error;
  398|       |
  399|    487|	if (!freerdp_assistance_parse_address_list(file, tokens[2]))
  ------------------
  |  Branch (399:6): [True: 167, False: 320]
  ------------------
  400|    167|		goto error;
  401|       |
  402|    320|	rc = TRUE;
  ------------------
  |  |  126|    320|#define TRUE true
  ------------------
  403|    599|error:
  404|    599|	free(str);
  405|    599|	return rc;
  406|    320|}
assistance.c:freerdp_assistance_parse_address_list:
  289|    487|{
  290|    487|	WINPR_ASSERT(file);
  ------------------
  |  |   76|    487|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    487|	do                                                                                             \
  |  |  |  |   61|    487|	{                                                                                              \
  |  |  |  |   62|    487|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    487|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    487|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    487|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    487|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    487|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    487|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    487|                                                                                                   \
  |  |  |  |   70|    487|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    487|	do                                                      \
  |  |  |  |  |  |   32|    487|	{                                                       \
  |  |  |  |  |  |   33|    487|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 487]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    487|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    487|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 487]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    487|                                                                                                   \
  |  |  |  |   72|    487|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    487|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    487|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    487|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 487]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  291|       |
  292|    487|	WLog_DBG(TAG, "freerdp_assistance_parse_address_list list=%s", list);
  ------------------
  |  |  342|    487|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  293|       |
  294|    487|	BOOL rc = FALSE;
  ------------------
  |  |  122|    487|#define FALSE false
  ------------------
  295|       |
  296|    487|	if (!list)
  ------------------
  |  Branch (296:6): [True: 0, False: 487]
  ------------------
  297|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  298|       |
  299|    487|	char* strp = list;
  300|    487|	char* s = ";";
  301|       |
  302|       |	// get the first token
  303|    487|	char* saveptr = nullptr;
  304|    487|	char* token = strtok_s(strp, s, &saveptr);
  305|       |
  306|       |	// walk through other tokens
  307|   553k|	while (token != nullptr)
  ------------------
  |  Branch (307:9): [True: 552k, False: 320]
  ------------------
  308|   552k|	{
  309|   552k|		char* port = strchr(token, ':');
  310|   552k|		if (!port)
  ------------------
  |  Branch (310:7): [True: 7, False: 552k]
  ------------------
  311|      7|			goto out;
  312|   552k|		*port = '\0';
  313|   552k|		port++;
  314|       |
  315|   552k|		if (!append_address(file, token, port))
  ------------------
  |  Branch (315:7): [True: 160, False: 552k]
  ------------------
  316|    160|			goto out;
  317|       |
  318|   552k|		token = strtok_s(nullptr, s, &saveptr);
  319|   552k|	}
  320|    320|	rc = TRUE;
  ------------------
  |  |  126|    320|#define TRUE true
  ------------------
  321|    487|out:
  322|    487|	return rc;
  323|    320|}
assistance.c:append_address:
  270|   552k|{
  271|   552k|	WINPR_ASSERT(file);
  ------------------
  |  |   76|   552k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   552k|	do                                                                                             \
  |  |  |  |   61|   552k|	{                                                                                              \
  |  |  |  |   62|   552k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   552k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   552k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   552k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   552k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   552k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   552k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   552k|                                                                                                   \
  |  |  |  |   70|   552k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   552k|	do                                                      \
  |  |  |  |  |  |   32|   552k|	{                                                       \
  |  |  |  |  |  |   33|   552k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 552k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   552k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   552k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 552k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   552k|                                                                                                   \
  |  |  |  |   72|   552k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   552k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   552k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   552k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 552k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  272|       |
  273|   552k|	errno = 0;
  274|   552k|	unsigned long p = strtoul(port, nullptr, 0);
  275|       |
  276|   552k|	if ((errno != 0) || (p == 0) || (p > UINT16_MAX))
  ------------------
  |  Branch (276:6): [True: 2, False: 552k]
  |  Branch (276:22): [True: 4, False: 552k]
  |  Branch (276:34): [True: 125, False: 552k]
  ------------------
  277|    131|	{
  278|    131|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: ConnectionString2 invalid port value %s",
  ------------------
  |  |  348|    131|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  279|    131|		         port);
  280|    131|		return FALSE;
  ------------------
  |  |  122|    131|#define FALSE false
  ------------------
  281|    131|	}
  282|       |
  283|   552k|	if (!append_address_to_list(file->MachineAddresses, host, host ? strlen(host) : 0))
  ------------------
  |  Branch (283:6): [True: 29, False: 552k]
  |  Branch (283:60): [True: 552k, False: 0]
  ------------------
  284|     29|		return FALSE;
  ------------------
  |  |  122|     29|#define FALSE false
  ------------------
  285|   552k|	return ArrayList_Append(file->MachinePorts, (void*)(uintptr_t)p);
  286|   552k|}
assistance.c:append_address_to_list:
  255|   555k|{
  256|   555k|	char* copy = nullptr;
  257|   555k|	if (len > 0)
  ------------------
  |  Branch (257:6): [True: 555k, False: 29]
  ------------------
  258|   555k|		copy = strndup(str, len);
  259|   555k|	if (!copy)
  ------------------
  |  Branch (259:6): [True: 29, False: 555k]
  ------------------
  260|     29|		return FALSE;
  ------------------
  |  |  122|     29|#define FALSE false
  ------------------
  261|       |
  262|   555k|	const BOOL rc = ArrayList_Append(MachineAddresses, copy);
  263|   555k|	if (!rc)
  ------------------
  |  Branch (263:6): [True: 0, False: 555k]
  ------------------
  264|      0|		free(copy);
  265|       |	// NOLINTNEXTLINE(clang-analyzer-unix.Malloc): ArrayList_Append takes ownership of copy
  266|   555k|	return rc;
  267|   555k|}
assistance.c:freerdp_assistance_contains_element:
  532|   253k|{
  533|   253k|	WINPR_ASSERT(input);
  ------------------
  |  |   76|   253k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   253k|	do                                                                                             \
  |  |  |  |   61|   253k|	{                                                                                              \
  |  |  |  |   62|   253k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   253k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   253k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   253k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   253k|                                                                                                   \
  |  |  |  |   70|   253k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   253k|	do                                                      \
  |  |  |  |  |  |   32|   253k|	{                                                       \
  |  |  |  |  |  |   33|   253k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   253k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   253k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   253k|                                                                                                   \
  |  |  |  |   72|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   253k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   253k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   253k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|   253k|	WINPR_ASSERT(key);
  ------------------
  |  |   76|   253k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   253k|	do                                                                                             \
  |  |  |  |   61|   253k|	{                                                                                              \
  |  |  |  |   62|   253k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   253k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   253k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   253k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   253k|                                                                                                   \
  |  |  |  |   70|   253k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   253k|	do                                                      \
  |  |  |  |  |  |   32|   253k|	{                                                       \
  |  |  |  |  |  |   33|   253k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   253k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   253k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   253k|                                                                                                   \
  |  |  |  |   72|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   253k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   253k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   253k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  535|   253k|	WINPR_ASSERT(plen);
  ------------------
  |  |   76|   253k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   253k|	do                                                                                             \
  |  |  |  |   61|   253k|	{                                                                                              \
  |  |  |  |   62|   253k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   253k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   253k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   253k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   253k|                                                                                                   \
  |  |  |  |   70|   253k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   253k|	do                                                      \
  |  |  |  |  |  |   32|   253k|	{                                                       \
  |  |  |  |  |  |   33|   253k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   253k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   253k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   253k|                                                                                                   \
  |  |  |  |   72|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   253k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   253k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   253k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  536|       |
  537|   253k|	char bkey[128] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   253k|	{                      \
  |  |   85|   253k|	} /** @since version 3.24.0 */
  ------------------
  538|   253k|	const int rc = _snprintf(bkey, sizeof(bkey), "<%s", key);
  ------------------
  |  |  251|   253k|#define _snprintf snprintf
  ------------------
  539|   253k|	WINPR_ASSERT(rc > 0);
  ------------------
  |  |   76|   253k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   253k|	do                                                                                             \
  |  |  |  |   61|   253k|	{                                                                                              \
  |  |  |  |   62|   253k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   253k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   253k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   253k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   253k|                                                                                                   \
  |  |  |  |   70|   253k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   253k|	do                                                      \
  |  |  |  |  |  |   32|   253k|	{                                                       \
  |  |  |  |  |  |   33|   253k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   253k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   253k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   253k|                                                                                                   \
  |  |  |  |   72|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   253k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   253k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   253k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  540|   253k|	WINPR_ASSERT((size_t)rc < sizeof(bkey));
  ------------------
  |  |   76|   253k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   253k|	do                                                                                             \
  |  |  |  |   61|   253k|	{                                                                                              \
  |  |  |  |   62|   253k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   253k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   253k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   253k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   253k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   253k|                                                                                                   \
  |  |  |  |   70|   253k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   253k|	do                                                      \
  |  |  |  |  |  |   32|   253k|	{                                                       \
  |  |  |  |  |  |   33|   253k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   253k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   253k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 253k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   253k|                                                                                                   \
  |  |  |  |   72|   253k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   253k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   253k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   253k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  541|   253k|	if ((rc < 0) || ((size_t)rc >= sizeof(bkey)))
  ------------------
  |  Branch (541:6): [True: 0, False: 253k]
  |  Branch (541:18): [True: 0, False: 253k]
  ------------------
  542|      0|		return nullptr;
  543|       |
  544|   253k|	char* tag = winpr_strnstr(input, bkey, ilen);
  545|   253k|	if (!tag)
  ------------------
  |  Branch (545:6): [True: 12.7k, False: 241k]
  ------------------
  546|  12.7k|		return nullptr;
  547|       |
  548|   241k|	const intptr_t tdiff = (tag - input);
  549|   241k|	WINPR_ASSERT(tdiff >= 0);
  ------------------
  |  |   76|   241k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   241k|	do                                                                                             \
  |  |  |  |   61|   241k|	{                                                                                              \
  |  |  |  |   62|   241k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   241k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   241k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   241k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   241k|                                                                                                   \
  |  |  |  |   70|   241k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   241k|	do                                                      \
  |  |  |  |  |  |   32|   241k|	{                                                       \
  |  |  |  |  |  |   33|   241k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 241k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   241k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   241k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 241k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   241k|                                                                                                   \
  |  |  |  |   72|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   241k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   241k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   241k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 241k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  550|   241k|	const size_t utdiff = WINPR_ASSERTING_INT_CAST(size_t, tdiff);
  ------------------
  |  |  112|   241k|	__extension__({                                                                             \
  |  |  113|   241k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   241k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   241k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   241k|	do                                                                                             \
  |  |  |  |  |  |   61|   241k|	{                                                                                              \
  |  |  |  |  |  |   62|   241k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   241k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   241k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   241k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   241k|                                                                                                   \
  |  |  |  |  |  |   70|   241k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   241k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   241k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   241k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 241k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   241k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   241k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 241k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   241k|                                                                                                   \
  |  |  |  |  |  |   72|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   241k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   241k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   241k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 241k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   241k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   241k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   241k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   241k|	do                                                                                             \
  |  |  |  |  |  |   61|   241k|	{                                                                                              \
  |  |  |  |  |  |   62|   241k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   241k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   241k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   241k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   241k|                                                                                                   \
  |  |  |  |  |  |   70|   241k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   241k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   241k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   960k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 122k, False: 118k]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 122k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 118k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 118k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   241k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   241k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 241k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   241k|                                                                                                   \
  |  |  |  |  |  |   72|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   241k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   241k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   241k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 241k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   241k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   241k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   241k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   241k|	})
  ------------------
  551|   241k|	WINPR_ASSERT(utdiff <= ilen);
  ------------------
  |  |   76|   241k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   241k|	do                                                                                             \
  |  |  |  |   61|   241k|	{                                                                                              \
  |  |  |  |   62|   241k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   241k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   241k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   241k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   241k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   241k|                                                                                                   \
  |  |  |  |   70|   241k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   241k|	do                                                      \
  |  |  |  |  |  |   32|   241k|	{                                                       \
  |  |  |  |  |  |   33|   241k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 241k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   241k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   241k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 241k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   241k|                                                                                                   \
  |  |  |  |   72|   241k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   241k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   241k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   241k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 241k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  552|   241k|	const size_t tlen = ilen - utdiff;
  553|   241k|	const size_t texpect = strnlen(bkey, sizeof(bkey));
  554|   241k|	if (tlen <= texpect)
  ------------------
  |  Branch (554:6): [True: 2, False: 241k]
  ------------------
  555|      2|		return nullptr;
  556|       |
  557|   241k|	char* data = tag + texpect;
  558|       |
  559|       |	/* Ensure there is a valid delimiter following our token */
  560|   241k|	switch (data[0])
  561|   241k|	{
  562|  3.07k|		case '>':
  ------------------
  |  Branch (562:3): [True: 3.07k, False: 238k]
  ------------------
  563|  46.5k|		case '/':
  ------------------
  |  Branch (563:3): [True: 43.4k, False: 197k]
  ------------------
  564|   138k|		case ' ':
  ------------------
  |  Branch (564:3): [True: 91.6k, False: 149k]
  ------------------
  565|   140k|		case '\t':
  ------------------
  |  Branch (565:3): [True: 1.98k, False: 239k]
  ------------------
  566|   140k|			break;
  567|   101k|		default:
  ------------------
  |  Branch (567:3): [True: 101k, False: 140k]
  ------------------
  568|   101k|			WLog_ERR(TAG,
  ------------------
  |  |  348|   101k|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  569|   101k|			         "Failed to parse ASSISTANCE file: ConnectionString2 missing delimiter after "
  570|   101k|			         "field %s",
  571|   101k|			         bkey);
  572|   101k|			return nullptr;
  573|   241k|	}
  574|       |
  575|   140k|	const char* start = winpr_strnstr(tag, ">", tlen);
  576|       |
  577|   140k|	if (!start || (start > input + ilen))
  ------------------
  |  Branch (577:6): [True: 8.61k, False: 131k]
  |  Branch (577:16): [True: 0, False: 131k]
  ------------------
  578|  8.61k|	{
  579|  8.61k|		WLog_ERR(TAG, "Failed to parse ASSISTANCE file: ConnectionString2 missing field %s", bkey);
  ------------------
  |  |  348|  8.61k|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  580|  8.61k|		return nullptr;
  581|  8.61k|	}
  582|       |
  583|   131k|	const char* end = start;
  584|   131k|	const char* dend = start - 1;
  585|   131k|	if (*dend != '/')
  ------------------
  |  Branch (585:6): [True: 3.65k, False: 127k]
  ------------------
  586|  3.65k|	{
  587|  3.65k|		char ekey[128] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.65k|	{                      \
  |  |   85|  3.65k|	} /** @since version 3.24.0 */
  ------------------
  588|  3.65k|		const int erc = _snprintf(ekey, sizeof(ekey), "</%s>", key);
  ------------------
  |  |  251|  3.65k|#define _snprintf snprintf
  ------------------
  589|  3.65k|		WINPR_ASSERT(erc > 0);
  ------------------
  |  |   76|  3.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.65k|	do                                                                                             \
  |  |  |  |   61|  3.65k|	{                                                                                              \
  |  |  |  |   62|  3.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.65k|                                                                                                   \
  |  |  |  |   70|  3.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.65k|	do                                                      \
  |  |  |  |  |  |   32|  3.65k|	{                                                       \
  |  |  |  |  |  |   33|  3.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.65k|                                                                                                   \
  |  |  |  |   72|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.65k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  590|  3.65k|		WINPR_ASSERT((size_t)erc < sizeof(ekey));
  ------------------
  |  |   76|  3.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.65k|	do                                                                                             \
  |  |  |  |   61|  3.65k|	{                                                                                              \
  |  |  |  |   62|  3.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.65k|                                                                                                   \
  |  |  |  |   70|  3.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.65k|	do                                                      \
  |  |  |  |  |  |   32|  3.65k|	{                                                       \
  |  |  |  |  |  |   33|  3.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.65k|                                                                                                   \
  |  |  |  |   72|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.65k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  591|  3.65k|		if ((erc <= 0) || ((size_t)erc >= sizeof(ekey)))
  ------------------
  |  Branch (591:7): [True: 0, False: 3.65k]
  |  Branch (591:21): [True: 0, False: 3.65k]
  ------------------
  592|      0|			return nullptr;
  593|  3.65k|		const size_t offset = WINPR_ASSERTING_INT_CAST(size_t, start - tag);
  ------------------
  |  |  112|  3.65k|	__extension__({                                                                             \
  |  |  113|  3.65k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  3.65k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  3.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.65k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.65k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.65k|                                                                                                   \
  |  |  |  |  |  |   70|  3.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.65k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.65k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.65k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.65k|                                                                                                   \
  |  |  |  |  |  |   72|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  3.65k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  3.65k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  3.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.65k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.65k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.65k|                                                                                                   \
  |  |  |  |  |  |   70|  3.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.65k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.65k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  10.9k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 3.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 3.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.65k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.65k|                                                                                                   \
  |  |  |  |  |  |   72|  3.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  3.65k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  3.65k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  3.65k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  3.65k|	})
  ------------------
  594|  3.65k|		dend = end = strrstr(start, ilen - offset, ekey);
  595|  3.65k|		if (end)
  ------------------
  |  Branch (595:7): [True: 3.44k, False: 202]
  ------------------
  596|  3.44k|			end += strnlen(ekey, sizeof(ekey));
  597|  3.65k|	}
  598|       |
  599|   131k|	if (!end)
  ------------------
  |  Branch (599:6): [True: 202, False: 131k]
  ------------------
  600|    202|	{
  601|    202|		WLog_ERR(TAG,
  ------------------
  |  |  348|    202|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  602|    202|		         "Failed to parse ASSISTANCE file: ConnectionString2 missing end tag for field %s",
  603|    202|		         key);
  604|    202|		return nullptr;
  605|    202|	}
  606|   131k|	if (plen)
  ------------------
  |  Branch (606:6): [True: 131k, False: 0]
  ------------------
  607|   131k|		*plen = WINPR_ASSERTING_INT_CAST(size_t, end - tag);
  ------------------
  |  |  112|   131k|	__extension__({                                                                             \
  |  |  113|   131k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   131k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   131k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   131k|	do                                                                                             \
  |  |  |  |  |  |   61|   131k|	{                                                                                              \
  |  |  |  |  |  |   62|   131k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   131k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   131k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   131k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   131k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   131k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   131k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   131k|                                                                                                   \
  |  |  |  |  |  |   70|   131k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   131k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   131k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   131k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 131k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   131k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   131k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 131k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   131k|                                                                                                   \
  |  |  |  |  |  |   72|   131k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   131k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   131k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   131k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 131k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   131k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   131k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   131k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   131k|	do                                                                                             \
  |  |  |  |  |  |   61|   131k|	{                                                                                              \
  |  |  |  |  |  |   62|   131k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   131k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   131k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   131k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   131k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   131k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   131k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   131k|                                                                                                   \
  |  |  |  |  |  |   70|   131k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   131k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   131k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   393k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 131k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 131k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   131k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   131k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 131k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   131k|                                                                                                   \
  |  |  |  |  |  |   72|   131k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   131k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   131k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   131k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 131k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   131k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   131k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   131k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   131k|	})
  ------------------
  608|       |
  609|   131k|	if (pdata)
  ------------------
  |  Branch (609:6): [True: 130k, False: 706]
  ------------------
  610|   130k|		*pdata = data;
  611|   131k|	if (pdlen)
  ------------------
  |  Branch (611:6): [True: 130k, False: 706]
  ------------------
  612|   130k|		*pdlen = WINPR_ASSERTING_INT_CAST(size_t, dend - data);
  ------------------
  |  |  112|   130k|	__extension__({                                                                             \
  |  |  113|   130k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   130k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   130k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   130k|	do                                                                                             \
  |  |  |  |  |  |   61|   130k|	{                                                                                              \
  |  |  |  |  |  |   62|   130k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   130k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   130k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   130k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   130k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   130k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   130k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   130k|                                                                                                   \
  |  |  |  |  |  |   70|   130k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   130k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   130k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   130k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 130k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   130k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   130k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 130k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   130k|                                                                                                   \
  |  |  |  |  |  |   72|   130k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   130k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   130k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   130k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 130k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   130k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   130k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   130k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   130k|	do                                                                                             \
  |  |  |  |  |  |   61|   130k|	{                                                                                              \
  |  |  |  |  |  |   62|   130k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   130k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   130k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   130k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   130k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   130k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   130k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   130k|                                                                                                   \
  |  |  |  |  |  |   70|   130k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   130k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   130k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   404k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 124k, False: 6.28k]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 124k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 6.28k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 6.28k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   130k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   130k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 130k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   130k|                                                                                                   \
  |  |  |  |  |  |   72|   130k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   130k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   130k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   130k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 130k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   130k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   130k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   130k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   130k|	})
  ------------------
  613|   131k|	return tag;
  614|   131k|}
assistance.c:strrstr:
   79|  3.65k|{
   80|  3.65k|	if (*needle == '\0')
  ------------------
  |  Branch (80:6): [True: 0, False: 3.65k]
  ------------------
   81|      0|		return haystack;
   82|       |
   83|  3.65k|	const char* result = nullptr;
   84|  3.65k|	for (;;)
   85|  11.5k|	{
   86|  11.5k|		const char* p = strstr(haystack, needle);
   87|  11.5k|		if (p == nullptr)
  ------------------
  |  Branch (87:7): [True: 3.65k, False: 7.88k]
  ------------------
   88|  3.65k|			break;
   89|  7.88k|		if (p > haystack + len)
  ------------------
  |  Branch (89:7): [True: 0, False: 7.88k]
  ------------------
   90|      0|			return nullptr;
   91|       |
   92|  7.88k|		result = p;
   93|  7.88k|		haystack = p + 1;
   94|  7.88k|	}
   95|       |
   96|  3.65k|	return result;
   97|  3.65k|}
assistance.c:setup_string:
 1395|  4.20k|{
 1396|  4.20k|	WINPR_ASSERT(list);
  ------------------
  |  |   76|  4.20k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.20k|	do                                                                                             \
  |  |  |  |   61|  4.20k|	{                                                                                              \
  |  |  |  |   62|  4.20k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.20k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.20k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.20k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.20k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.20k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.20k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.20k|                                                                                                   \
  |  |  |  |   70|  4.20k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.20k|	do                                                      \
  |  |  |  |  |  |   32|  4.20k|	{                                                       \
  |  |  |  |  |  |   33|  4.20k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.20k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.20k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.20k|                                                                                                   \
  |  |  |  |   72|  4.20k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.20k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.20k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.20k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1397|       |
 1398|  4.20k|	wObject* obj = ArrayList_Object(list);
 1399|  4.20k|	if (!obj)
  ------------------
  |  Branch (1399:6): [True: 0, False: 4.20k]
  ------------------
 1400|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
 1401|  4.20k|	obj->fnObjectFree = free;
 1402|       |	// obj->fnObjectNew = wwinpr_ObjectStringClone;
 1403|  4.20k|	return TRUE;
  ------------------
  |  |  126|  4.20k|#define TRUE true
  ------------------
 1404|  4.20k|}
assistance.c:update_password:
  129|  4.20k|{
  130|  4.20k|	WINPR_ASSERT(file);
  ------------------
  |  |   76|  4.20k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.20k|	do                                                                                             \
  |  |  |  |   61|  4.20k|	{                                                                                              \
  |  |  |  |   62|  4.20k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.20k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.20k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.20k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.20k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.20k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.20k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.20k|                                                                                                   \
  |  |  |  |   70|  4.20k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.20k|	do                                                      \
  |  |  |  |  |  |   32|  4.20k|	{                                                       \
  |  |  |  |  |  |   33|  4.20k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.20k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.20k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.20k|                                                                                                   \
  |  |  |  |   72|  4.20k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.20k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.20k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.20k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  131|  4.20k|	free(file->password);
  132|  4.20k|	file->password = nullptr;
  133|  4.20k|	if (!password)
  ------------------
  |  Branch (133:6): [True: 2.10k, False: 2.10k]
  ------------------
  134|  2.10k|		return TRUE;
  ------------------
  |  |  126|  2.10k|#define TRUE true
  ------------------
  135|  2.10k|	file->password = _strdup(password);
  136|  2.10k|	return file->password != nullptr;
  137|  4.20k|}
assistance.c:update_connectionstring2:
  151|  2.80k|{
  152|  2.80k|	char* strc = nullptr;
  153|  2.80k|	if (!str && (len != 0))
  ------------------
  |  Branch (153:6): [True: 2.10k, False: 706]
  |  Branch (153:14): [True: 0, False: 2.10k]
  ------------------
  154|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  155|       |
  156|  2.80k|	if (str && (len > 0))
  ------------------
  |  Branch (156:6): [True: 706, False: 2.10k]
  |  Branch (156:13): [True: 706, False: 0]
  ------------------
  157|    706|	{
  158|    706|		strc = strndup(str, len);
  159|    706|		if (!strc)
  ------------------
  |  Branch (159:7): [True: 0, False: 706]
  ------------------
  160|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  161|    706|	}
  162|  2.80k|	return update_connectionstring2_nocopy(file, strc);
  163|  2.80k|}
assistance.c:update_connectionstring2_nocopy:
  140|  2.96k|{
  141|  2.96k|	WINPR_ASSERT(file);
  ------------------
  |  |   76|  2.96k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.96k|	do                                                                                             \
  |  |  |  |   61|  2.96k|	{                                                                                              \
  |  |  |  |   62|  2.96k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.96k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.96k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.96k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.96k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.96k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.96k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.96k|                                                                                                   \
  |  |  |  |   70|  2.96k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.96k|	do                                                      \
  |  |  |  |  |  |   32|  2.96k|	{                                                       \
  |  |  |  |  |  |   33|  2.96k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.96k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.96k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.96k|                                                                                                   \
  |  |  |  |   72|  2.96k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.96k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.96k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.96k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  142|  2.96k|	free(file->ConnectionString2);
  143|  2.96k|	file->ConnectionString2 = nullptr;
  144|  2.96k|	if (!str)
  ------------------
  |  Branch (144:6): [True: 2.10k, False: 868]
  ------------------
  145|  2.10k|		return TRUE;
  ------------------
  |  |  126|  2.10k|#define TRUE true
  ------------------
  146|    868|	file->ConnectionString2 = str;
  147|    868|	return file->ConnectionString2 != nullptr;
  148|  2.96k|}
assistance.c:freerdp_assistance_parse_connection_string2:
  754|    869|{
  755|    869|	BOOL rc = FALSE;
  ------------------
  |  |  122|    869|#define FALSE false
  ------------------
  756|       |
  757|    869|	WINPR_ASSERT(file);
  ------------------
  |  |   76|    869|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    869|	do                                                                                             \
  |  |  |  |   61|    869|	{                                                                                              \
  |  |  |  |   62|    869|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    869|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    869|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    869|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    869|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    869|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    869|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    869|                                                                                                   \
  |  |  |  |   70|    869|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    869|	do                                                      \
  |  |  |  |  |  |   32|    869|	{                                                       \
  |  |  |  |  |  |   33|    869|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 869]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    869|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    869|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 869]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    869|                                                                                                   \
  |  |  |  |   72|    869|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    869|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    869|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    869|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 869]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|       |
  759|    869|	if (!file->ConnectionString2)
  ------------------
  |  Branch (759:6): [True: 1, False: 868]
  ------------------
  760|      1|		return FALSE;
  ------------------
  |  |  122|      1|#define FALSE false
  ------------------
  761|       |
  762|    868|	char* str = _strdup(file->ConnectionString2);
  763|    868|	if (!str)
  ------------------
  |  Branch (763:6): [True: 0, False: 868]
  ------------------
  764|      0|		goto out_fail;
  765|    868|	const size_t slen = strlen(str);
  766|       |
  767|    868|	{
  768|    868|		char* e = nullptr;
  769|    868|		size_t elen = 0;
  770|    868|		if (!freerdp_assistance_consume_input_and_get_element(str, slen, "E", &e, &elen))
  ------------------
  |  Branch (770:7): [True: 169, False: 699]
  ------------------
  771|    169|			goto out_fail;
  772|       |
  773|    699|		if (!e || (elen == 0))
  ------------------
  |  Branch (773:7): [True: 0, False: 699]
  |  Branch (773:13): [True: 0, False: 699]
  ------------------
  774|      0|			goto out_fail;
  775|    699|		{
  776|    699|			char* a = nullptr;
  777|    699|			size_t alen = 0;
  778|    699|			if (!freerdp_assistance_get_element(e, elen, "A", &a, &alen))
  ------------------
  |  Branch (778:8): [True: 20, False: 679]
  ------------------
  779|     20|				goto out_fail;
  780|       |
  781|    679|			if (!a || (alen == 0))
  ------------------
  |  Branch (781:8): [True: 0, False: 679]
  |  Branch (781:14): [True: 0, False: 679]
  ------------------
  782|      0|				goto out_fail;
  783|       |
  784|    679|			if (!freerdp_assistance_parse_find_elements_of_c(file, e, elen))
  ------------------
  |  Branch (784:8): [True: 136, False: 543]
  ------------------
  785|    136|				goto out_fail;
  786|       |
  787|       |			/* '\0' terminate the detected XML elements so
  788|       |			 * the parser can continue with terminated strings
  789|       |			 */
  790|    543|			a[alen] = '\0';
  791|       |
  792|    543|			if (!freerdp_assistance_parse_attr_str(&file->RASpecificParams, "KH", a))
  ------------------
  |  Branch (792:8): [True: 35, False: 508]
  ------------------
  793|     35|				goto out_fail;
  794|       |
  795|    508|			if (!freerdp_assistance_parse_attr_str(&file->RASpecificParams2, "KH2", a))
  ------------------
  |  Branch (795:8): [True: 6, False: 502]
  ------------------
  796|      6|				goto out_fail;
  797|       |
  798|    502|			if (!freerdp_assistance_parse_attr_str(&file->RASessionId, "ID", a))
  ------------------
  |  Branch (798:8): [True: 8, False: 494]
  ------------------
  799|      8|				goto out_fail;
  800|    502|		}
  801|    502|	}
  802|    494|	rc = TRUE;
  ------------------
  |  |  126|    494|#define TRUE true
  ------------------
  803|    868|out_fail:
  804|    868|	free(str);
  805|    868|	return rc;
  806|    494|}
assistance.c:freerdp_assistance_get_element:
  647|   248k|{
  648|   248k|	WINPR_ASSERT(input);
  ------------------
  |  |   76|   248k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   248k|	do                                                                                             \
  |  |  |  |   61|   248k|	{                                                                                              \
  |  |  |  |   62|   248k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   248k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   248k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   248k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   248k|                                                                                                   \
  |  |  |  |   70|   248k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   248k|	do                                                      \
  |  |  |  |  |  |   32|   248k|	{                                                       \
  |  |  |  |  |  |   33|   248k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   248k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   248k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   248k|                                                                                                   \
  |  |  |  |   72|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   248k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   248k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   248k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 248k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  649|   248k|	WINPR_ASSERT(key);
  ------------------
  |  |   76|   248k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   248k|	do                                                                                             \
  |  |  |  |   61|   248k|	{                                                                                              \
  |  |  |  |   62|   248k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   248k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   248k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   248k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   248k|                                                                                                   \
  |  |  |  |   70|   248k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   248k|	do                                                      \
  |  |  |  |  |  |   32|   248k|	{                                                       \
  |  |  |  |  |  |   33|   248k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   248k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   248k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   248k|                                                                                                   \
  |  |  |  |   72|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   248k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   248k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   248k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 248k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  650|   248k|	WINPR_ASSERT(element);
  ------------------
  |  |   76|   248k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   248k|	do                                                                                             \
  |  |  |  |   61|   248k|	{                                                                                              \
  |  |  |  |   62|   248k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   248k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   248k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   248k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   248k|                                                                                                   \
  |  |  |  |   70|   248k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   248k|	do                                                      \
  |  |  |  |  |  |   32|   248k|	{                                                       \
  |  |  |  |  |  |   33|   248k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   248k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   248k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   248k|                                                                                                   \
  |  |  |  |   72|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   248k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   248k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   248k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 248k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  651|   248k|	WINPR_ASSERT(elen);
  ------------------
  |  |   76|   248k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   248k|	do                                                                                             \
  |  |  |  |   61|   248k|	{                                                                                              \
  |  |  |  |   62|   248k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   248k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   248k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   248k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   248k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   248k|                                                                                                   \
  |  |  |  |   70|   248k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   248k|	do                                                      \
  |  |  |  |  |  |   32|   248k|	{                                                       \
  |  |  |  |  |  |   33|   248k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   248k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   248k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 248k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   248k|                                                                                                   \
  |  |  |  |   72|   248k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   248k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   248k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   248k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 248k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  652|       |
  653|   248k|	size_t len = 0;
  654|   248k|	size_t dlen = 0;
  655|   248k|	char* data = nullptr;
  656|   248k|	char* tag = freerdp_assistance_contains_element(input, ilen, key, &len, &data, &dlen);
  657|   248k|	if (!tag)
  ------------------
  |  Branch (657:6): [True: 121k, False: 127k]
  ------------------
  658|   121k|		return FALSE;
  ------------------
  |  |  122|   121k|#define FALSE false
  ------------------
  659|       |
  660|   127k|	if (tag + len > input + ilen)
  ------------------
  |  Branch (660:6): [True: 0, False: 127k]
  ------------------
  661|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  662|       |
  663|   127k|	char* end = tag + len;
  664|   127k|	*element = data;
  665|   127k|	*elen = WINPR_ASSERTING_INT_CAST(size_t, end - data + 1);
  ------------------
  |  |  112|   127k|	__extension__({                                                                             \
  |  |  113|   127k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   127k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   127k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   127k|	do                                                                                             \
  |  |  |  |  |  |   61|   127k|	{                                                                                              \
  |  |  |  |  |  |   62|   127k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   127k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   127k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   127k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   127k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   127k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   127k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   127k|                                                                                                   \
  |  |  |  |  |  |   70|   127k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   127k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   127k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   127k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 127k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   127k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   127k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 127k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   127k|                                                                                                   \
  |  |  |  |  |  |   72|   127k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   127k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   127k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   127k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 127k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   127k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   127k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   127k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   127k|	do                                                                                             \
  |  |  |  |  |  |   61|   127k|	{                                                                                              \
  |  |  |  |  |  |   62|   127k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   127k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   127k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   127k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   127k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   127k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   127k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   127k|                                                                                                   \
  |  |  |  |  |  |   70|   127k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   127k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   127k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   382k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 127k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 127k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   127k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   127k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 127k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   127k|                                                                                                   \
  |  |  |  |  |  |   72|   127k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   127k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   127k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   127k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 127k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   127k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   127k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   127k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   127k|	})
  ------------------
  666|   127k|	return TRUE;
  ------------------
  |  |  126|   127k|#define TRUE true
  ------------------
  667|   127k|}
assistance.c:freerdp_assistance_parse_find_elements_of_c:
  748|    679|{
  749|    679|	return freerdp_assistance_parse_all_elements_of(file, data, len, "C",
  750|    679|	                                                freerdp_assistance_parse_all_elements_of_c);
  751|    679|}
assistance.c:freerdp_assistance_parse_all_elements_of:
  673|   121k|{
  674|   121k|	char* val = nullptr;
  675|   121k|	size_t vlen = 0;
  676|       |
  677|   248k|	while (freerdp_assistance_get_element(data, len, key, &val, &vlen))
  ------------------
  |  Branch (677:9): [True: 126k, False: 121k]
  ------------------
  678|   126k|	{
  679|   126k|		data = val + vlen;
  680|   126k|		len = strnlen(data, len);
  681|   126k|		if (vlen > 0)
  ------------------
  |  Branch (681:7): [True: 126k, False: 0]
  ------------------
  682|   126k|		{
  683|   126k|			val[vlen - 1] = '\0';
  684|       |
  685|   126k|			if (!fkt(file, val, vlen))
  ------------------
  |  Branch (685:8): [True: 302, False: 126k]
  ------------------
  686|    302|				return FALSE;
  ------------------
  |  |  122|    302|#define FALSE false
  ------------------
  687|   126k|		}
  688|   126k|	}
  689|       |
  690|   121k|	return TRUE;
  ------------------
  |  |  126|   121k|#define TRUE true
  ------------------
  691|   121k|}
assistance.c:freerdp_assistance_parse_all_elements_of_c:
  741|   118k|{
  742|   118k|	return freerdp_assistance_parse_all_elements_of(file, data, len, "T",
  743|   118k|	                                                freerdp_assistance_parse_all_elements_of_t);
  744|   118k|}
assistance.c:freerdp_assistance_parse_all_elements_of_t:
  727|  2.72k|{
  728|  2.72k|	UINT32 id = 0;
  729|  2.72k|	UINT32 sid = 0;
  730|  2.72k|	if (!freerdp_assistance_parse_attr_uint32(&id, "ID", data))
  ------------------
  |  Branch (730:6): [True: 97, False: 2.63k]
  ------------------
  731|     97|		return FALSE;
  ------------------
  |  |  122|     97|#define FALSE false
  ------------------
  732|  2.63k|	if (!freerdp_assistance_parse_attr_uint32(&sid, "SID", data))
  ------------------
  |  Branch (732:6): [True: 9, False: 2.62k]
  ------------------
  733|      9|		return FALSE;
  ------------------
  |  |  122|      9|#define FALSE false
  ------------------
  734|  2.62k|	WLog_DBG(TAG, "transport id=%" PRIu32 ", sid=%" PRIu32, id, sid);
  ------------------
  |  |  342|  2.62k|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  735|  2.62k|	return freerdp_assistance_parse_all_elements_of(file, data, len, "L",
  736|  2.62k|	                                                freerdp_assistance_parse_all_elements_of_l);
  737|  2.63k|}
assistance.c:freerdp_assistance_parse_all_elements_of_l:
  695|  5.85k|{
  696|  5.85k|	UINT32 p = 0;
  697|  5.85k|	const char* n = nullptr;
  698|  5.85k|	const char* u = nullptr;
  699|  5.85k|	size_t nlen = 0;
  700|  5.85k|	size_t ulen = 0;
  701|  5.85k|	if (!freerdp_assistance_parse_attr_uint32(&p, "P", data))
  ------------------
  |  Branch (701:6): [True: 11, False: 5.84k]
  ------------------
  702|     11|		return FALSE;
  ------------------
  |  |  122|     11|#define FALSE false
  ------------------
  703|  5.84k|	if (!freerdp_assistance_parse_attr(&n, &nlen, "N", data))
  ------------------
  |  Branch (703:6): [True: 7, False: 5.83k]
  ------------------
  704|      7|		return FALSE;
  ------------------
  |  |  122|      7|#define FALSE false
  ------------------
  705|  5.83k|	if (!freerdp_assistance_parse_attr(&u, &ulen, "U", data))
  ------------------
  |  Branch (705:6): [True: 12, False: 5.82k]
  ------------------
  706|     12|		return FALSE;
  ------------------
  |  |  122|     12|#define FALSE false
  ------------------
  707|       |
  708|  5.82k|	if (n && (nlen > 0))
  ------------------
  |  Branch (708:6): [True: 2.80k, False: 3.01k]
  |  Branch (708:11): [True: 818, False: 1.99k]
  ------------------
  709|    818|	{
  710|    818|		if (!append_address_to_list(file->MachineAddresses, n, nlen))
  ------------------
  |  Branch (710:7): [True: 0, False: 818]
  ------------------
  711|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  712|    818|		if (!ArrayList_Append(file->MachinePorts, (void*)(uintptr_t)p))
  ------------------
  |  Branch (712:7): [True: 0, False: 818]
  ------------------
  713|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  714|    818|	}
  715|  5.82k|	if (u && (ulen > 0))
  ------------------
  |  Branch (715:6): [True: 2.23k, False: 3.58k]
  |  Branch (715:11): [True: 1.57k, False: 664]
  ------------------
  716|  1.57k|	{
  717|  1.57k|		if (!append_address_to_list(file->MachineAddresses, u, ulen))
  ------------------
  |  Branch (717:7): [True: 0, False: 1.57k]
  ------------------
  718|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  719|  1.57k|		if (!ArrayList_Append(file->MachinePorts, (void*)(uintptr_t)p))
  ------------------
  |  Branch (719:7): [True: 0, False: 1.57k]
  ------------------
  720|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  721|  1.57k|	}
  722|  5.82k|	return TRUE;
  ------------------
  |  |  126|  5.82k|#define TRUE true
  ------------------
  723|  5.82k|}

LLVMFuzzerTestOneInput:
   28|  2.10k|{
   29|  2.10k|	parse_file_buffer(Data, Size);
   30|  2.10k|	return 0;
   31|  2.10k|}
TestFuzzCommonAssistanceParseFileBuffer.c:parse_file_buffer:
    4|  2.10k|{
    5|  2.10k|	static const char TEST_MSRC_INCIDENT_PASSWORD_TYPE2[] = "48BJQ853X3B4";
    6|  2.10k|	int status = -1;
    7|  2.10k|	rdpAssistanceFile* file = freerdp_assistance_file_new();
    8|  2.10k|	if (!file)
  ------------------
  |  Branch (8:6): [True: 0, False: 2.10k]
  ------------------
    9|      0|		return -1;
   10|       |
   11|  2.10k|	char* buf = calloc(Size + 1, sizeof(char));
   12|  2.10k|	if (buf == nullptr)
  ------------------
  |  Branch (12:6): [True: 0, False: 2.10k]
  ------------------
   13|      0|		goto err;
   14|  2.10k|	memcpy(buf, Data, Size);
   15|  2.10k|	buf[Size] = '\0';
   16|       |
   17|  2.10k|	status = freerdp_assistance_parse_file_buffer(file, buf, Size + 1,
   18|  2.10k|	                                              TEST_MSRC_INCIDENT_PASSWORD_TYPE2);
   19|       |
   20|  2.10k|err:
   21|  2.10k|	freerdp_assistance_file_free(file);
   22|  2.10k|	free(buf);
   23|       |
   24|  2.10k|	return status >= 0;
   25|  2.10k|}

assistance.c:winpr_Data_Write_UINT32:
  258|    246|	{
  259|    246|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    246|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    246|	do                                                                                             \
  |  |  |  |   61|    246|	{                                                                                              \
  |  |  |  |   62|    246|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    246|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    246|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    246|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    246|                                                                                                   \
  |  |  |  |   70|    246|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    246|	do                                                      \
  |  |  |  |  |  |   32|    246|	{                                                       \
  |  |  |  |  |  |   33|    246|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    246|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    246|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    246|                                                                                                   \
  |  |  |  |   72|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    246|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    246|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    246|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 246]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|    246|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|    246|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    246|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  261|    246|		winpr_Data_Write_UINT16(b, v & 0xFFFF);
  262|    246|		winpr_Data_Write_UINT16(b + 2, (v >> 16) & 0xFFFF);
  263|    246|	}
assistance.c:winpr_Data_Write_UINT16:
  235|    492|	{
  236|    492|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    492|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    492|	do                                                                                             \
  |  |  |  |   61|    492|	{                                                                                              \
  |  |  |  |   62|    492|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    492|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    492|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    492|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    492|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    492|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    492|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    492|                                                                                                   \
  |  |  |  |   70|    492|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    492|	do                                                      \
  |  |  |  |  |  |   32|    492|	{                                                       \
  |  |  |  |  |  |   33|    492|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 492]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    492|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    492|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 492]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    492|                                                                                                   \
  |  |  |  |   72|    492|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    492|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    492|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    492|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 492]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|    492|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|    492|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    492|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  238|    492|		b[0] = v & 0xFF;
  239|    492|		b[1] = (v >> 8) & 0xFF;
  240|    492|	}

assistance.c:WLog_Print_dbg_tag:
  323|   115k|	{
  324|   115k|		static wLog* log_cached_ptr = nullptr;
  325|   115k|		if (!log_cached_ptr)
  ------------------
  |  Branch (325:7): [True: 1, False: 115k]
  ------------------
  326|      1|			log_cached_ptr = WLog_Get(tag);
  327|       |
  328|   115k|		if (WLog_IsLevelActive(log_cached_ptr, log_level))
  ------------------
  |  Branch (328:7): [True: 111k, False: 3.54k]
  ------------------
  329|   111k|		{
  330|   111k|			va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  331|   111k|			va_start(ap, fmt);
  332|   111k|			WLog_PrintTextMessageVA(log_cached_ptr, log_level, line, file, fkt, fmt, ap);
  333|       |			va_end(ap);
  334|   111k|		}
  335|   115k|	}

_strdup:
  301|  4.54k|{
  302|  4.54k|	if (strSource == nullptr)
  ------------------
  |  Branch (302:6): [True: 0, False: 4.54k]
  ------------------
  303|      0|		return nullptr;
  304|       |
  305|  4.54k|	char* strDestination = strdup(strSource);
  306|       |
  307|  4.54k|	if (strDestination == nullptr)
  ------------------
  |  Branch (307:6): [True: 0, False: 4.54k]
  ------------------
  308|      0|		WLog_ERR(TAG, "strdup");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  309|       |
  310|  4.54k|	return strDestination;
  311|  4.54k|}
_wcsnlen:
  407|    409|{
  408|    409|	WINPR_ASSERT(str);
  ------------------
  |  |   76|    409|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    409|	do                                                                                             \
  |  |  |  |   61|    409|	{                                                                                              \
  |  |  |  |   62|    409|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    409|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    409|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    409|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    409|                                                                                                   \
  |  |  |  |   70|    409|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    409|	do                                                      \
  |  |  |  |  |  |   32|    409|	{                                                       \
  |  |  |  |  |  |   33|    409|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    409|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    409|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    409|                                                                                                   \
  |  |  |  |   72|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    409|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    409|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    409|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 409]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  409|       |
  410|    409|	size_t x = 0;
  411|  1.48M|	for (; x < max; x++)
  ------------------
  |  Branch (411:9): [True: 1.48M, False: 289]
  ------------------
  412|  1.48M|	{
  413|  1.48M|		if (str[x] == 0)
  ------------------
  |  Branch (413:7): [True: 120, False: 1.48M]
  ------------------
  414|    120|			return x;
  415|  1.48M|	}
  416|       |
  417|    289|	return x;
  418|    409|}
strtok_s:
  484|   553k|{
  485|   553k|	return strtok_r(strToken, strDelimit, context);
  486|   553k|}
winpr_strnstr:
  928|   393k|{
  929|   393k|	WINPR_ASSERT(haystack || (hlen == 0));
  ------------------
  |  |   76|   393k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   393k|	do                                                                                             \
  |  |  |  |   61|   393k|	{                                                                                              \
  |  |  |  |   62|   393k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   393k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   393k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   393k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   393k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   393k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   393k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   393k|                                                                                                   \
  |  |  |  |   70|   393k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   393k|	do                                                      \
  |  |  |  |  |  |   32|   393k|	{                                                       \
  |  |  |  |  |  |   33|   393k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:9): [True: 393k, False: 0]
  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   393k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   393k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 393k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   393k|                                                                                                   \
  |  |  |  |   72|   393k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   393k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   393k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   393k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 393k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  930|   393k|	WINPR_ASSERT(needle);
  ------------------
  |  |   76|   393k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   393k|	do                                                                                             \
  |  |  |  |   61|   393k|	{                                                                                              \
  |  |  |  |   62|   393k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   393k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   393k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   393k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   393k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   393k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   393k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   393k|                                                                                                   \
  |  |  |  |   70|   393k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   393k|	do                                                      \
  |  |  |  |  |  |   32|   393k|	{                                                       \
  |  |  |  |  |  |   33|   393k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 393k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   393k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   393k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 393k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   393k|                                                                                                   \
  |  |  |  |   72|   393k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   393k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   393k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   393k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 393k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  931|       |
  932|       |#if defined(WINPR_HAVE_STRNSTR)
  933|       |	return strnstr(haystack, needle, hlen);
  934|       |#else
  935|       |	/* Match native strnstr semantics: search at most hlen characters and stop at
  936|       |	 * the haystack NUL terminator, whichever comes first. */
  937|   393k|	const size_t needle_len = strlen(needle);
  938|       |
  939|   393k|	if (0 == needle_len)
  ------------------
  |  Branch (939:6): [True: 0, False: 393k]
  ------------------
  940|      0|		return haystack;
  941|       |
  942|  77.5M|	for (; (*haystack != '\0') && (hlen >= needle_len); haystack++, hlen--)
  ------------------
  |  Branch (942:9): [True: 77.5M, False: 19.5k]
  |  Branch (942:32): [True: 77.5M, False: 1.75k]
  ------------------
  943|  77.5M|	{
  944|  77.5M|		if ((haystack[0] == needle[0]) && (0 == strncmp(haystack, needle, needle_len)))
  ------------------
  |  Branch (944:7): [True: 2.71M, False: 74.7M]
  |  Branch (944:37): [True: 372k, False: 2.34M]
  ------------------
  945|   372k|			return haystack;
  946|  77.5M|	}
  947|  21.3k|	return nullptr;
  948|   393k|#endif
  949|   393k|}

ConvertWCharNToUtf8:
  384|    409|{
  385|    409|	BOOL isNullTerminated = FALSE;
  ------------------
  |  |  122|    409|#define FALSE false
  ------------------
  386|    409|	if (wlen == 0)
  ------------------
  |  Branch (386:6): [True: 0, False: 409]
  ------------------
  387|      0|		return 0;
  388|       |
  389|    409|	WINPR_ASSERT(wstr);
  ------------------
  |  |   76|    409|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    409|	do                                                                                             \
  |  |  |  |   61|    409|	{                                                                                              \
  |  |  |  |   62|    409|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    409|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    409|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    409|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    409|                                                                                                   \
  |  |  |  |   70|    409|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    409|	do                                                      \
  |  |  |  |  |  |   32|    409|	{                                                       \
  |  |  |  |  |  |   33|    409|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    409|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    409|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    409|                                                                                                   \
  |  |  |  |   72|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    409|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    409|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    409|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 409]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  390|    409|	size_t iwlen = _wcsnlen(wstr, wlen);
  391|       |
  392|    409|	if ((len > INT32_MAX) || (wlen > INT32_MAX))
  ------------------
  |  Branch (392:6): [True: 0, False: 409]
  |  Branch (392:27): [True: 0, False: 409]
  ------------------
  393|      0|	{
  394|      0|		SetLastError(ERROR_INVALID_PARAMETER);
  ------------------
  |  |  252|      0|#define ERROR_INVALID_PARAMETER 0x00000057
  ------------------
  395|      0|		return -1;
  396|      0|	}
  397|       |
  398|    409|	if (iwlen < wlen)
  ------------------
  |  Branch (398:6): [True: 120, False: 289]
  ------------------
  399|    120|	{
  400|    120|		isNullTerminated = TRUE;
  ------------------
  |  |  126|    120|#define TRUE true
  ------------------
  401|    120|		iwlen++;
  402|    120|	}
  403|    409|	WINPR_PRAGMA_DIAG_PUSH
  404|    409|	WINPR_PRAGMA_DIAG_IGNORED_DEPRECATED_DECL
  405|    409|	const int rc =
  406|    409|	    WideCharToMultiByte(CP_UTF8, 0, wstr, (int)iwlen, str, (int)len, nullptr, nullptr);
  ------------------
  |  |  103|    409|#define CP_UTF8 65001
  ------------------
  407|    409|	WINPR_PRAGMA_DIAG_POP
  408|    409|	if ((rc <= 0) || ((len > 0) && ((size_t)rc > len)))
  ------------------
  |  Branch (408:6): [True: 85, False: 324]
  |  Branch (408:20): [True: 162, False: 162]
  |  Branch (408:33): [True: 0, False: 162]
  ------------------
  409|     85|		return -1;
  410|    324|	else if (!isNullTerminated)
  ------------------
  |  Branch (410:11): [True: 238, False: 86]
  ------------------
  411|    238|	{
  412|    238|		if (str && ((size_t)rc < len))
  ------------------
  |  Branch (412:7): [True: 119, False: 119]
  |  Branch (412:14): [True: 119, False: 0]
  ------------------
  413|    119|			str[rc] = '\0';
  414|    238|		return rc;
  415|    238|	}
  416|     86|	else if ((size_t)rc == len)
  ------------------
  |  Branch (416:11): [True: 43, False: 43]
  ------------------
  417|     43|	{
  418|     43|		if (str && (str[rc - 1] != '\0'))
  ------------------
  |  Branch (418:7): [True: 43, False: 0]
  |  Branch (418:14): [True: 0, False: 43]
  ------------------
  419|      0|			return rc;
  420|     43|	}
  421|     86|	return rc - 1;
  422|    409|}
ConvertUtf8ToWChar:
  449|  2.07k|{
  450|  2.07k|	if (!str)
  ------------------
  |  Branch (450:6): [True: 118, False: 1.95k]
  ------------------
  451|    118|	{
  452|    118|		if (wstr && wlen)
  ------------------
  |  Branch (452:7): [True: 59, False: 59]
  |  Branch (452:15): [True: 59, False: 0]
  ------------------
  453|     59|			wstr[0] = 0;
  454|    118|		return 0;
  455|    118|	}
  456|       |
  457|  1.95k|	const size_t len = strlen(str);
  458|  1.95k|	return ConvertUtf8NToWChar(str, len + 1, wstr, wlen);
  459|  2.07k|}
ConvertUtf8NToWChar:
  462|  1.95k|{
  463|  1.95k|	size_t ilen = strnlen(str, len);
  464|  1.95k|	BOOL isNullTerminated = FALSE;
  ------------------
  |  |  122|  1.95k|#define FALSE false
  ------------------
  465|  1.95k|	if (len == 0)
  ------------------
  |  Branch (465:6): [True: 0, False: 1.95k]
  ------------------
  466|      0|		return 0;
  467|       |
  468|  1.95k|	WINPR_ASSERT(str);
  ------------------
  |  |   76|  1.95k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.95k|	do                                                                                             \
  |  |  |  |   61|  1.95k|	{                                                                                              \
  |  |  |  |   62|  1.95k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.95k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.95k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.95k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.95k|                                                                                                   \
  |  |  |  |   70|  1.95k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.95k|	do                                                      \
  |  |  |  |  |  |   32|  1.95k|	{                                                       \
  |  |  |  |  |  |   33|  1.95k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.95k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.95k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.95k|                                                                                                   \
  |  |  |  |   72|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.95k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.95k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.95k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  1.95k|	if ((len > INT32_MAX) || (wlen > INT32_MAX))
  ------------------
  |  Branch (470:6): [True: 0, False: 1.95k]
  |  Branch (470:27): [True: 0, False: 1.95k]
  ------------------
  471|      0|	{
  472|      0|		SetLastError(ERROR_INVALID_PARAMETER);
  ------------------
  |  |  252|      0|#define ERROR_INVALID_PARAMETER 0x00000057
  ------------------
  473|      0|		return -1;
  474|      0|	}
  475|  1.95k|	if (ilen < len)
  ------------------
  |  Branch (475:6): [True: 1.95k, False: 0]
  ------------------
  476|  1.95k|	{
  477|  1.95k|		isNullTerminated = TRUE;
  ------------------
  |  |  126|  1.95k|#define TRUE true
  ------------------
  478|  1.95k|		ilen++;
  479|  1.95k|	}
  480|       |
  481|  1.95k|	const int iwlen = (int)wlen;
  482|  1.95k|	WINPR_PRAGMA_DIAG_PUSH
  483|  1.95k|	WINPR_PRAGMA_DIAG_IGNORED_DEPRECATED_DECL
  484|  1.95k|	const int rc = MultiByteToWideChar(CP_UTF8, 0, str, (int)ilen, wstr, iwlen);
  ------------------
  |  |  103|  1.95k|#define CP_UTF8 65001
  ------------------
  485|  1.95k|	WINPR_PRAGMA_DIAG_POP
  486|  1.95k|	if ((rc <= 0) || ((wlen > 0) && (rc > iwlen)))
  ------------------
  |  Branch (486:6): [True: 74, False: 1.88k]
  |  Branch (486:20): [True: 941, False: 941]
  |  Branch (486:34): [True: 0, False: 941]
  ------------------
  487|     74|		return -1;
  488|  1.88k|	if (!isNullTerminated)
  ------------------
  |  Branch (488:6): [True: 0, False: 1.88k]
  ------------------
  489|      0|	{
  490|      0|		if (wstr && (rc < iwlen))
  ------------------
  |  Branch (490:7): [True: 0, False: 0]
  |  Branch (490:15): [True: 0, False: 0]
  ------------------
  491|      0|			wstr[rc] = '\0';
  492|      0|		return rc;
  493|      0|	}
  494|  1.88k|	else if (rc == iwlen)
  ------------------
  |  Branch (494:11): [True: 941, False: 941]
  ------------------
  495|    941|	{
  496|    941|		if (wstr && (wstr[rc - 1] != '\0'))
  ------------------
  |  Branch (496:7): [True: 941, False: 0]
  |  Branch (496:15): [True: 0, False: 941]
  ------------------
  497|      0|			return rc;
  498|    941|	}
  499|  1.88k|	return rc - 1;
  500|  1.88k|}
ConvertWCharNToUtf8Alloc:
  550|    247|{
  551|    247|	char* tmp = nullptr;
  552|    247|	const SSIZE_T rc = ConvertWCharNToUtf8(wstr, wlen, nullptr, 0);
  553|       |
  554|    247|	if (pUtfCharLength)
  ------------------
  |  Branch (554:6): [True: 0, False: 247]
  ------------------
  555|      0|		*pUtfCharLength = 0;
  556|    247|	if (rc < 0)
  ------------------
  |  Branch (556:6): [True: 85, False: 162]
  ------------------
  557|     85|		return nullptr;
  558|    162|	tmp = calloc((size_t)rc + 1ull, sizeof(char));
  559|    162|	if (!tmp)
  ------------------
  |  Branch (559:6): [True: 0, False: 162]
  ------------------
  560|      0|		return nullptr;
  561|    162|	const SSIZE_T rc2 = ConvertWCharNToUtf8(wstr, wlen, tmp, (size_t)rc + 1ull);
  562|    162|	if (rc2 < 0)
  ------------------
  |  Branch (562:6): [True: 0, False: 162]
  ------------------
  563|      0|	{
  564|      0|		free(tmp);
  565|      0|		return nullptr;
  566|      0|	}
  567|    162|	WINPR_ASSERT(rc == rc2);
  ------------------
  |  |   76|    162|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    162|	do                                                                                             \
  |  |  |  |   61|    162|	{                                                                                              \
  |  |  |  |   62|    162|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    162|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    162|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    162|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    162|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    162|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    162|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    162|                                                                                                   \
  |  |  |  |   70|    162|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    162|	do                                                      \
  |  |  |  |  |  |   32|    162|	{                                                       \
  |  |  |  |  |  |   33|    162|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 162]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    162|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    162|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 162]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    162|                                                                                                   \
  |  |  |  |   72|    162|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    162|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    162|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    162|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 162]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|    162|	if (pUtfCharLength)
  ------------------
  |  Branch (568:6): [True: 0, False: 162]
  ------------------
  569|      0|		*pUtfCharLength = (size_t)rc2;
  570|    162|	return tmp;
  571|    162|}
ConvertUtf8ToWCharAlloc:
  598|  1.07k|{
  599|  1.07k|	WCHAR* tmp = nullptr;
  600|  1.07k|	const SSIZE_T rc = ConvertUtf8ToWChar(str, nullptr, 0);
  601|  1.07k|	if (pSize)
  ------------------
  |  Branch (601:6): [True: 1.07k, False: 0]
  ------------------
  602|  1.07k|		*pSize = 0;
  603|  1.07k|	if (rc < 0)
  ------------------
  |  Branch (603:6): [True: 74, False: 1.00k]
  ------------------
  604|     74|		return nullptr;
  605|  1.00k|	tmp = calloc((size_t)rc + 1ull, sizeof(WCHAR));
  606|  1.00k|	if (!tmp)
  ------------------
  |  Branch (606:6): [True: 0, False: 1.00k]
  ------------------
  607|      0|		return nullptr;
  608|  1.00k|	const SSIZE_T rc2 = ConvertUtf8ToWChar(str, tmp, (size_t)rc + 1ull);
  609|  1.00k|	if (rc2 < 0)
  ------------------
  |  Branch (609:6): [True: 0, False: 1.00k]
  ------------------
  610|      0|	{
  611|      0|		free(tmp);
  612|      0|		return nullptr;
  613|      0|	}
  614|  1.00k|	WINPR_ASSERT(rc == rc2);
  ------------------
  |  |   76|  1.00k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.00k|	do                                                                                             \
  |  |  |  |   61|  1.00k|	{                                                                                              \
  |  |  |  |   62|  1.00k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.00k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.00k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.00k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.00k|                                                                                                   \
  |  |  |  |   70|  1.00k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.00k|	do                                                      \
  |  |  |  |  |  |   32|  1.00k|	{                                                       \
  |  |  |  |  |  |   33|  1.00k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.00k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.00k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.00k|                                                                                                   \
  |  |  |  |   72|  1.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.00k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.00k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.00k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  615|  1.00k|	if (pSize)
  ------------------
  |  Branch (615:6): [True: 1.00k, False: 0]
  ------------------
  616|  1.00k|		*pSize = (size_t)rc2;
  617|  1.00k|	return tmp;
  618|  1.00k|}
unicode.c:WideCharToMultiByte:
  207|    409|{
  208|    409|	return int_WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr,
  209|    409|	                               cbMultiByte, lpDefaultChar, lpUsedDefaultChar);
  210|    409|}
unicode.c:MultiByteToWideChar:
  155|  1.95k|{
  156|  1.95k|	return int_MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, lpWideCharStr,
  157|  1.95k|	                               cchWideChar);
  158|  1.95k|}

int_MultiByteToWideChar:
  656|  1.95k|{
  657|  1.95k|	size_t cbCharLen = (size_t)cbMultiByte;
  658|       |
  659|  1.95k|	WINPR_UNUSED(dwFlags);
  ------------------
  |  |  715|  1.95k|#define WINPR_UNUSED(x) (void)(x)
  ------------------
  660|       |
  661|       |	/* If cbMultiByte is 0, the function fails */
  662|  1.95k|	if ((cbMultiByte == 0) || (cbMultiByte < -1))
  ------------------
  |  Branch (662:6): [True: 0, False: 1.95k]
  |  Branch (662:28): [True: 0, False: 1.95k]
  ------------------
  663|      0|		return 0;
  664|       |
  665|  1.95k|	if (cchWideChar < 0)
  ------------------
  |  Branch (665:6): [True: 0, False: 1.95k]
  ------------------
  666|      0|		return -1;
  667|       |
  668|  1.95k|	if (cbMultiByte < 0)
  ------------------
  |  Branch (668:6): [True: 0, False: 1.95k]
  ------------------
  669|      0|	{
  670|      0|		const size_t len = strlen(lpMultiByteStr);
  671|      0|		if (len >= INT32_MAX)
  ------------------
  |  Branch (671:7): [True: 0, False: 0]
  ------------------
  672|      0|			return 0;
  673|      0|		cbCharLen = (int)len + 1;
  674|      0|	}
  675|  1.95k|	else
  676|  1.95k|		cbCharLen = cbMultiByte;
  677|       |
  678|  1.95k|	WINPR_ASSERT(lpMultiByteStr);
  ------------------
  |  |   76|  1.95k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.95k|	do                                                                                             \
  |  |  |  |   61|  1.95k|	{                                                                                              \
  |  |  |  |   62|  1.95k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.95k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.95k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.95k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.95k|                                                                                                   \
  |  |  |  |   70|  1.95k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.95k|	do                                                      \
  |  |  |  |  |  |   32|  1.95k|	{                                                       \
  |  |  |  |  |  |   33|  1.95k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.95k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.95k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.95k|                                                                                                   \
  |  |  |  |   72|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.95k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.95k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.95k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  679|  1.95k|	switch (CodePage)
  680|  1.95k|	{
  681|      0|		case CP_ACP:
  ------------------
  |  |   97|      0|#define CP_ACP 0
  ------------------
  |  Branch (681:3): [True: 0, False: 1.95k]
  ------------------
  682|  1.95k|		case CP_UTF8:
  ------------------
  |  |  103|  1.95k|#define CP_UTF8 65001
  ------------------
  |  Branch (682:3): [True: 1.95k, False: 0]
  ------------------
  683|  1.95k|			break;
  684|       |
  685|      0|		default:
  ------------------
  |  Branch (685:3): [True: 0, False: 1.95k]
  ------------------
  686|      0|			WLog_ERR(TAG, "Unsupported encoding %u", CodePage);
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  687|      0|			return 0;
  688|  1.95k|	}
  689|       |
  690|  1.95k|	return winpr_ConvertUTF8toUTF16((const uint8_t*)lpMultiByteStr,
  691|  1.95k|	                                WINPR_ASSERTING_INT_CAST(int, cbCharLen),
  ------------------
  |  |  112|  1.95k|	__extension__({                                                                             \
  |  |  113|  1.95k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  1.95k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  1.95k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.95k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.95k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.95k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.95k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.95k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.95k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.95k|                                                                                                   \
  |  |  |  |  |  |   70|  1.95k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.95k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.95k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.95k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.95k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.95k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.95k|                                                                                                   \
  |  |  |  |  |  |   72|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.95k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.95k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.95k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  1.95k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  1.95k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  1.95k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.95k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.95k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.95k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.95k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.95k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.95k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.95k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.95k|                                                                                                   \
  |  |  |  |  |  |   70|  1.95k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.95k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.95k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  5.86k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.95k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.95k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.95k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.95k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.95k|                                                                                                   \
  |  |  |  |  |  |   72|  1.95k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.95k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.95k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.95k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  1.95k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  1.95k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  1.95k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  1.95k|	})
  ------------------
  692|  1.95k|	                                (uint16_t*)lpWideCharStr, cchWideChar);
  693|  1.95k|}
int_WideCharToMultiByte:
  698|    409|{
  699|    409|	size_t cbCharLen = (size_t)cchWideChar;
  700|       |
  701|    409|	WINPR_UNUSED(dwFlags);
  ------------------
  |  |  715|    409|#define WINPR_UNUSED(x) (void)(x)
  ------------------
  702|       |	/* If cchWideChar is 0, the function fails */
  703|    409|	if ((cchWideChar == 0) || (cchWideChar < -1))
  ------------------
  |  Branch (703:6): [True: 0, False: 409]
  |  Branch (703:28): [True: 0, False: 409]
  ------------------
  704|      0|		return 0;
  705|       |
  706|    409|	if (cbMultiByte < 0)
  ------------------
  |  Branch (706:6): [True: 0, False: 409]
  ------------------
  707|      0|		return -1;
  708|       |
  709|    409|	WINPR_ASSERT(lpWideCharStr);
  ------------------
  |  |   76|    409|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    409|	do                                                                                             \
  |  |  |  |   61|    409|	{                                                                                              \
  |  |  |  |   62|    409|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    409|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    409|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    409|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    409|                                                                                                   \
  |  |  |  |   70|    409|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    409|	do                                                      \
  |  |  |  |  |  |   32|    409|	{                                                       \
  |  |  |  |  |  |   33|    409|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    409|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    409|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    409|                                                                                                   \
  |  |  |  |   72|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    409|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    409|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    409|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 409]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  710|       |	/* If cchWideChar is -1, the string is null-terminated */
  711|    409|	if (cchWideChar == -1)
  ------------------
  |  Branch (711:6): [True: 0, False: 409]
  ------------------
  712|      0|	{
  713|      0|		const size_t len = _wcslen(lpWideCharStr);
  714|      0|		if (len >= INT32_MAX)
  ------------------
  |  Branch (714:7): [True: 0, False: 0]
  ------------------
  715|      0|			return 0;
  716|      0|		cbCharLen = (int)len + 1;
  717|      0|	}
  718|    409|	else
  719|    409|		cbCharLen = cchWideChar;
  720|       |
  721|       |	/*
  722|       |	 * if cbMultiByte is 0, the function returns the required buffer size
  723|       |	 * in bytes for lpMultiByteStr and makes no use of the output parameter itself.
  724|       |	 */
  725|       |
  726|    409|	return winpr_ConvertUTF16toUTF8((const uint16_t*)lpWideCharStr,
  727|    409|	                                WINPR_ASSERTING_INT_CAST(int, cbCharLen),
  ------------------
  |  |  112|    409|	__extension__({                                                                             \
  |  |  113|    409|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|    409|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|    409|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    409|	do                                                                                             \
  |  |  |  |  |  |   61|    409|	{                                                                                              \
  |  |  |  |  |  |   62|    409|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    409|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    409|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    409|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    409|                                                                                                   \
  |  |  |  |  |  |   70|    409|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    409|	do                                                      \
  |  |  |  |  |  |  |  |   32|    409|	{                                                       \
  |  |  |  |  |  |  |  |   33|    409|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 409]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    409|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    409|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 409]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    409|                                                                                                   \
  |  |  |  |  |  |   72|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    409|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    409|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    409|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|    409|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|    409|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|    409|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    409|	do                                                                                             \
  |  |  |  |  |  |   61|    409|	{                                                                                              \
  |  |  |  |  |  |   62|    409|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    409|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    409|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    409|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    409|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    409|                                                                                                   \
  |  |  |  |  |  |   70|    409|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    409|	do                                                      \
  |  |  |  |  |  |  |  |   32|    409|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.22k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 409, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 409, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    409|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    409|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 409]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    409|                                                                                                   \
  |  |  |  |  |  |   72|    409|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    409|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    409|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    409|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 409]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|    409|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|    409|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|    409|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|    409|	})
  ------------------
  728|    409|	                                (uint8_t*)lpMultiByteStr, cbMultiByte);
  729|    409|}
unicode_builtin.c:winpr_ConvertUTF8toUTF16:
  569|  1.95k|{
  570|  1.95k|	size_t length = 0;
  571|  1.95k|	uint16_t* dstBeg = nullptr;
  572|  1.95k|	uint16_t* dstEnd = nullptr;
  573|  1.95k|	const uint8_t* srcBeg = nullptr;
  574|  1.95k|	const uint8_t* srcEnd = nullptr;
  575|  1.95k|	ConversionResult result = sourceIllegal;
  576|       |
  577|  1.95k|	if (cchSrc == -1)
  ------------------
  |  Branch (577:6): [True: 0, False: 1.95k]
  ------------------
  578|      0|		cchSrc = (int)strnlen((const char*)src, INT32_MAX - 1) + 1;
  579|       |
  580|  1.95k|	srcBeg = src;
  581|  1.95k|	srcEnd = &src[cchSrc];
  582|       |
  583|  1.95k|	if (cchDst == 0)
  ------------------
  |  Branch (583:6): [True: 1.01k, False: 941]
  ------------------
  584|  1.01k|	{
  585|  1.01k|		result =
  586|  1.01k|		    winpr_ConvertUTF8toUTF16_Internal(&srcBeg, srcEnd, &dstBeg, dstEnd, strictConversion);
  587|       |
  588|  1.01k|		length = dstBeg - (uint16_t*)nullptr;
  589|  1.01k|	}
  590|    941|	else
  591|    941|	{
  592|    941|		dstBeg = dst;
  593|    941|		dstEnd = &dst[cchDst];
  594|       |
  595|    941|		result =
  596|    941|		    winpr_ConvertUTF8toUTF16_Internal(&srcBeg, srcEnd, &dstBeg, dstEnd, strictConversion);
  597|       |
  598|    941|		length = dstBeg - dst;
  599|    941|	}
  600|       |
  601|  1.95k|	if (result == targetExhausted)
  ------------------
  |  Branch (601:6): [True: 0, False: 1.95k]
  ------------------
  602|      0|	{
  603|      0|		SetLastError(ERROR_INSUFFICIENT_BUFFER);
  ------------------
  |  |  275|      0|#define ERROR_INSUFFICIENT_BUFFER 0x0000007A
  ------------------
  604|      0|		return 0;
  605|      0|	}
  606|       |
  607|  1.95k|	return (result == conversionOK) ? WINPR_ASSERTING_INT_CAST(int, length) : 0;
  ------------------
  |  |  112|  1.88k|	__extension__({                                                                             \
  |  |  113|  1.88k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  1.88k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  1.88k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.88k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.88k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.88k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.88k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.88k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.88k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.88k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.88k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.88k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.88k|                                                                                                   \
  |  |  |  |  |  |   70|  1.88k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.88k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.88k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.88k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.88k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.88k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.88k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.88k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.88k|                                                                                                   \
  |  |  |  |  |  |   72|  1.88k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.88k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.88k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.88k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  1.88k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  1.88k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  1.88k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.88k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.88k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.88k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.88k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.88k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.88k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.88k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.88k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.88k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.88k|                                                                                                   \
  |  |  |  |  |  |   70|  1.88k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.88k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.88k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  5.64k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.88k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.88k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.88k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.88k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.88k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.88k|                                                                                                   \
  |  |  |  |  |  |   72|  1.88k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.88k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.88k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.88k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  1.88k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  1.88k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  1.88k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  1.88k|	})
  ------------------
  |  Branch (607:9): [True: 1.88k, False: 74]
  ------------------
  608|  1.95k|}
unicode_builtin.c:winpr_ConvertUTF8toUTF16_Internal:
  414|  1.95k|{
  415|  1.95k|	bool computeLength = (!targetEnd) ? true : false;
  ------------------
  |  Branch (415:23): [True: 1.01k, False: 941]
  ------------------
  416|  1.95k|	ConversionResult result = conversionOK;
  417|  1.95k|	const uint8_t* source = *sourceStart;
  418|  1.95k|	uint16_t* target = *targetStart;
  419|       |
  420|  7.87M|	while (source < sourceEnd)
  ------------------
  |  Branch (420:9): [True: 7.87M, False: 1.88k]
  ------------------
  421|  7.87M|	{
  422|  7.87M|		uint32_t ch = 0;
  423|  7.87M|		unsigned short extraBytesToRead =
  424|  7.87M|		    WINPR_ASSERTING_INT_CAST(unsigned short, trailingBytesForUTF8[*source]);
  ------------------
  |  |  112|  7.87M|	__extension__({                                                                             \
  |  |  113|  7.87M|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  7.87M|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  7.87M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  7.87M|	do                                                                                             \
  |  |  |  |  |  |   61|  7.87M|	{                                                                                              \
  |  |  |  |  |  |   62|  7.87M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  7.87M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  7.87M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  7.87M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  7.87M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  7.87M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  7.87M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  7.87M|                                                                                                   \
  |  |  |  |  |  |   70|  7.87M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  7.87M|	do                                                      \
  |  |  |  |  |  |  |  |   32|  7.87M|	{                                                       \
  |  |  |  |  |  |  |  |   33|  7.87M|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 7.87M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  7.87M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  7.87M|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.87M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  7.87M|                                                                                                   \
  |  |  |  |  |  |   72|  7.87M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  7.87M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  7.87M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  7.87M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 7.87M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  7.87M|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  7.87M|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  7.87M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  7.87M|	do                                                                                             \
  |  |  |  |  |  |   61|  7.87M|	{                                                                                              \
  |  |  |  |  |  |   62|  7.87M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  7.87M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  7.87M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  7.87M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  7.87M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  7.87M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  7.87M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  7.87M|                                                                                                   \
  |  |  |  |  |  |   70|  7.87M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  7.87M|	do                                                      \
  |  |  |  |  |  |  |  |   32|  7.87M|	{                                                       \
  |  |  |  |  |  |  |  |   33|  39.3M|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.93k, False: 7.87M]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.93k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 7.87M, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 7.87M, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  7.87M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  7.87M|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.87M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  7.87M|                                                                                                   \
  |  |  |  |  |  |   72|  7.87M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  7.87M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  7.87M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  7.87M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 7.87M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  7.87M|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  7.87M|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  7.87M|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  7.87M|	})
  ------------------
  425|       |
  426|  7.87M|		if ((source + extraBytesToRead) >= sourceEnd)
  ------------------
  |  Branch (426:7): [True: 1, False: 7.87M]
  ------------------
  427|      1|		{
  428|      1|			result = sourceExhausted;
  429|      1|			break;
  430|      1|		}
  431|       |
  432|       |		/* Do this check whether lenient or strict */
  433|  7.87M|		if (!isLegalUTF8(source, extraBytesToRead + 1))
  ------------------
  |  Branch (433:7): [True: 73, False: 7.87M]
  ------------------
  434|     73|		{
  435|     73|			result = sourceIllegal;
  436|     73|			break;
  437|     73|		}
  438|       |
  439|       |		/*
  440|       |		 * The cases all fall through. See "Note A" below.
  441|       |		 */
  442|  7.87M|		switch (extraBytesToRead)
  443|  7.87M|		{
  444|      0|			case 5:
  ------------------
  |  Branch (444:4): [True: 0, False: 7.87M]
  ------------------
  445|      0|				ch += *source++;
  446|      0|				ch <<= 6; /* remember, illegal UTF-8 */
  447|       |				          /* fallthrough */
  448|      0|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  449|       |
  450|      0|			case 4:
  ------------------
  |  Branch (450:4): [True: 0, False: 7.87M]
  ------------------
  451|      0|				ch += *source++;
  452|      0|				ch <<= 6; /* remember, illegal UTF-8 */
  453|       |				          /* fallthrough */
  454|      0|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  455|       |
  456|    853|			case 3:
  ------------------
  |  Branch (456:4): [True: 853, False: 7.87M]
  ------------------
  457|    853|				ch += *source++;
  458|    853|				ch <<= 6;
  459|       |				/* fallthrough */
  460|    853|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|    853|	(void)0;              \
  |  |   69|    853|	[[fallthrough]];
  ------------------
  461|       |
  462|  1.57k|			case 2:
  ------------------
  |  Branch (462:4): [True: 724, False: 7.87M]
  ------------------
  463|  1.57k|				ch += *source++;
  464|  1.57k|				ch <<= 6;
  465|       |				/* fallthrough */
  466|  1.57k|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|  1.57k|	(void)0;              \
  |  |   69|  1.57k|	[[fallthrough]];
  ------------------
  467|       |
  468|  1.88k|			case 1:
  ------------------
  |  Branch (468:4): [True: 304, False: 7.87M]
  ------------------
  469|  1.88k|				ch += *source++;
  470|  1.88k|				ch <<= 6;
  471|       |				/* fallthrough */
  472|  1.88k|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|  1.88k|	(void)0;              \
  |  |   69|  1.88k|	[[fallthrough]];
  ------------------
  473|       |
  474|  7.87M|			case 0:
  ------------------
  |  Branch (474:4): [True: 7.87M, False: 1.88k]
  ------------------
  475|  7.87M|				ch += *source++;
  476|  7.87M|				break;
  477|      0|			default:
  ------------------
  |  Branch (477:4): [True: 0, False: 7.87M]
  ------------------
  478|      0|				return sourceIllegal;
  479|  7.87M|		}
  480|       |
  481|  7.87M|		ch -= offsetsFromUTF8[extraBytesToRead];
  482|       |
  483|  7.87M|		if ((target >= targetEnd) && (!computeLength))
  ------------------
  |  Branch (483:7): [True: 3.96M, False: 3.91M]
  |  Branch (483:32): [True: 0, False: 3.96M]
  ------------------
  484|      0|		{
  485|      0|			source -= (extraBytesToRead + 1); /* Back up source pointer! */
  486|      0|			result = targetExhausted;
  487|      0|			break;
  488|      0|		}
  489|       |
  490|  7.87M|		if (ch <= UNI_MAX_BMP)
  ------------------
  |  |   61|  7.87M|#define UNI_MAX_BMP (uint32_t)0x0000FFFF
  ------------------
  |  Branch (490:7): [True: 7.87M, False: 853]
  ------------------
  491|  7.87M|		{
  492|       |			/* Target is a character <= 0xFFFF */
  493|       |			/* UTF-16 surrogate values are illegal in UTF-32 */
  494|  7.87M|			if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END)
  ------------------
  |  |   85|  15.7M|#define UNI_SUR_HIGH_START (uint32_t)0xD800
  ------------------
              			if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END)
  ------------------
  |  |   88|    228|#define UNI_SUR_LOW_END (uint32_t)0xDFFF
  ------------------
  |  Branch (494:8): [True: 228, False: 7.87M]
  |  Branch (494:36): [True: 0, False: 228]
  ------------------
  495|      0|			{
  496|      0|				if (flags == strictConversion)
  ------------------
  |  Branch (496:9): [True: 0, False: 0]
  ------------------
  497|      0|				{
  498|      0|					source -= (extraBytesToRead + 1); /* return to the illegal value itself */
  499|      0|					result = sourceIllegal;
  500|      0|					break;
  501|      0|				}
  502|      0|				else
  503|      0|				{
  504|      0|					if (!computeLength)
  ------------------
  |  Branch (504:10): [True: 0, False: 0]
  ------------------
  505|      0|						*target++ = setWcharFrom(UNI_REPLACEMENT_CHAR);
  ------------------
  |  |   60|      0|#define UNI_REPLACEMENT_CHAR (uint32_t)0x0000FFFD
  ------------------
  506|      0|					else
  507|      0|						target++;
  508|      0|				}
  509|      0|			}
  510|  7.87M|			else
  511|  7.87M|			{
  512|  7.87M|				if (!computeLength)
  ------------------
  |  Branch (512:9): [True: 3.91M, False: 3.96M]
  ------------------
  513|  3.91M|					*target++ = setWcharFrom((WCHAR)ch); /* normal case */
  514|  3.96M|				else
  515|  3.96M|					target++;
  516|  7.87M|			}
  517|  7.87M|		}
  518|    853|		else if (ch > UNI_MAX_UTF16)
  ------------------
  |  |   62|    853|#define UNI_MAX_UTF16 (uint32_t)0x0010FFFF
  ------------------
  |  Branch (518:12): [True: 0, False: 853]
  ------------------
  519|      0|		{
  520|      0|			if (flags == strictConversion)
  ------------------
  |  Branch (520:8): [True: 0, False: 0]
  ------------------
  521|      0|			{
  522|      0|				result = sourceIllegal;
  523|      0|				source -= (extraBytesToRead + 1); /* return to the start */
  524|      0|				break;                            /* Bail out; shouldn't continue */
  525|      0|			}
  526|      0|			else
  527|      0|			{
  528|      0|				if (!computeLength)
  ------------------
  |  Branch (528:9): [True: 0, False: 0]
  ------------------
  529|      0|					*target++ = setWcharFrom(UNI_REPLACEMENT_CHAR);
  ------------------
  |  |   60|      0|#define UNI_REPLACEMENT_CHAR (uint32_t)0x0000FFFD
  ------------------
  530|      0|				else
  531|      0|					target++;
  532|      0|			}
  533|      0|		}
  534|    853|		else
  535|    853|		{
  536|       |			/* target is a character in range 0xFFFF - 0x10FFFF. */
  537|    853|			if ((target + 1 >= targetEnd) && (!computeLength))
  ------------------
  |  Branch (537:8): [True: 432, False: 421]
  |  Branch (537:37): [True: 0, False: 432]
  ------------------
  538|      0|			{
  539|      0|				source -= (extraBytesToRead + 1); /* Back up source pointer! */
  540|      0|				result = targetExhausted;
  541|      0|				break;
  542|      0|			}
  543|       |
  544|    853|			ch -= halfBase;
  545|       |
  546|    853|			if (!computeLength)
  ------------------
  |  Branch (546:8): [True: 421, False: 432]
  ------------------
  547|    421|			{
  548|    421|				*target++ = setWcharFrom((WCHAR)((ch >> halfShift) + UNI_SUR_HIGH_START));
  ------------------
  |  |   85|    421|#define UNI_SUR_HIGH_START (uint32_t)0xD800
  ------------------
  549|    421|				*target++ = setWcharFrom((WCHAR)((ch & halfMask) + UNI_SUR_LOW_START));
  ------------------
  |  |   87|    421|#define UNI_SUR_LOW_START (uint32_t)0xDC00
  ------------------
  550|    421|			}
  551|    432|			else
  552|    432|			{
  553|    432|				target++;
  554|    432|				target++;
  555|    432|			}
  556|    853|		}
  557|  7.87M|	}
  558|       |
  559|  1.95k|	*sourceStart = source;
  560|  1.95k|	*targetStart = target;
  561|  1.95k|	return result;
  562|  1.95k|}
unicode_builtin.c:isLegalUTF8:
  335|  7.87M|{
  336|  7.87M|	uint8_t a = 0;
  337|  7.87M|	const uint8_t* srcptr = source + length;
  338|       |
  339|  7.87M|	switch (length)
  340|  7.87M|	{
  341|      8|		default:
  ------------------
  |  Branch (341:3): [True: 8, False: 7.87M]
  ------------------
  342|      8|			return false;
  343|       |
  344|       |			/* Everything else falls through when "true"... */
  345|    868|		case 4:
  ------------------
  |  Branch (345:3): [True: 868, False: 7.87M]
  ------------------
  346|    868|			if ((a = (*--srcptr)) < 0x80 || a > 0xBF)
  ------------------
  |  Branch (346:8): [True: 3, False: 865]
  |  Branch (346:36): [True: 8, False: 857]
  ------------------
  347|     11|				return false;
  348|       |			/* fallthrough */
  349|    857|			WINPR_FALLTHROUGH
  ------------------
  |  |   68|    857|	(void)0;              \
  |  |   69|    857|	[[fallthrough]];
  ------------------
  350|       |
  351|  1.60k|		case 3:
  ------------------
  |  Branch (351:3): [True: 747, False: 7.87M]
  ------------------
  352|  1.60k|			if ((a = (*--srcptr)) < 0x80 || a > 0xBF)
  ------------------
  |  Branch (352:8): [True: 5, False: 1.59k]
  |  Branch (352:36): [True: 5, False: 1.59k]
  ------------------
  353|     10|				return false;
  354|       |			/* fallthrough */
  355|  1.59k|			WINPR_FALLTHROUGH
  ------------------
  |  |   68|  1.59k|	(void)0;              \
  |  |   69|  1.59k|	[[fallthrough]];
  ------------------
  356|       |
  357|  1.90k|		case 2:
  ------------------
  |  Branch (357:3): [True: 314, False: 7.87M]
  ------------------
  358|  1.90k|			if ((a = (*--srcptr)) > 0xBF)
  ------------------
  |  Branch (358:8): [True: 1, False: 1.90k]
  ------------------
  359|      1|				return false;
  360|       |
  361|  1.90k|			switch (*source)
  362|  1.90k|			{
  363|       |					/* no fall-through in this inner switch */
  364|    247|				case 0xE0:
  ------------------
  |  Branch (364:5): [True: 247, False: 1.66k]
  ------------------
  365|    247|					if (a < 0xA0)
  ------------------
  |  Branch (365:10): [True: 12, False: 235]
  ------------------
  366|     12|						return false;
  367|       |
  368|    235|					break;
  369|       |
  370|    253|				case 0xED:
  ------------------
  |  Branch (370:5): [True: 253, False: 1.65k]
  ------------------
  371|    253|					if (a > 0x9F)
  ------------------
  |  Branch (371:10): [True: 1, False: 252]
  ------------------
  372|      1|						return false;
  373|       |
  374|    252|					break;
  375|       |
  376|    270|				case 0xF0:
  ------------------
  |  Branch (376:5): [True: 270, False: 1.63k]
  ------------------
  377|    270|					if (a < 0x90)
  ------------------
  |  Branch (377:10): [True: 2, False: 268]
  ------------------
  378|      2|						return false;
  379|       |
  380|    268|					break;
  381|       |
  382|    529|				case 0xF4:
  ------------------
  |  Branch (382:5): [True: 529, False: 1.37k]
  ------------------
  383|    529|					if (a > 0x8F)
  ------------------
  |  Branch (383:10): [True: 1, False: 528]
  ------------------
  384|      1|						return false;
  385|       |
  386|    528|					break;
  387|       |
  388|    608|				default:
  ------------------
  |  Branch (388:5): [True: 608, False: 1.29k]
  ------------------
  389|    608|					if (a < 0x80)
  ------------------
  |  Branch (389:10): [True: 4, False: 604]
  ------------------
  390|      4|						return false;
  391|    604|					break;
  392|  1.90k|			}
  393|       |			/* fallthrough */
  394|  1.88k|			WINPR_FALLTHROUGH
  ------------------
  |  |   68|  1.88k|	(void)0;              \
  |  |   69|  1.88k|	[[fallthrough]];
  ------------------
  395|       |
  396|  7.87M|		case 1:
  ------------------
  |  Branch (396:3): [True: 7.87M, False: 1.93k]
  ------------------
  397|  7.87M|			if (*source >= 0x80 && *source < 0xC2)
  ------------------
  |  Branch (397:8): [True: 1.90k, False: 7.87M]
  |  Branch (397:27): [True: 22, False: 1.88k]
  ------------------
  398|     22|				return false;
  399|  7.87M|	}
  400|       |
  401|  7.87M|	if (*source > 0xF4)
  ------------------
  |  Branch (401:6): [True: 1, False: 7.87M]
  ------------------
  402|      1|		return false;
  403|       |
  404|  7.87M|	return true;
  405|  7.87M|}
unicode_builtin.c:setWcharFrom:
  129|  4.50M|{
  130|       |#if defined(__BIG_ENDIAN__)
  131|       |	union
  132|       |	{
  133|       |		WCHAR w;
  134|       |		char c[2];
  135|       |	} cnv;
  136|       |
  137|       |	cnv.w = w;
  138|       |	const char c = cnv.c[0];
  139|       |	cnv.c[0] = cnv.c[1];
  140|       |	cnv.c[1] = c;
  141|       |	return cnv.w;
  142|       |#else
  143|  4.50M|	return w;
  144|  4.50M|#endif
  145|  4.50M|}
unicode_builtin.c:winpr_ConvertUTF16toUTF8:
  611|    409|{
  612|    409|	size_t length = 0;
  613|    409|	uint8_t* dstBeg = nullptr;
  614|    409|	uint8_t* dstEnd = nullptr;
  615|    409|	const uint16_t* srcBeg = nullptr;
  616|    409|	const uint16_t* srcEnd = nullptr;
  617|    409|	ConversionResult result = sourceIllegal;
  618|       |
  619|    409|	if (cchSrc == -1)
  ------------------
  |  Branch (619:6): [True: 0, False: 409]
  ------------------
  620|      0|		cchSrc = (int)_wcsnlen((const WCHAR*)src, INT32_MAX - 1) + 1;
  621|       |
  622|    409|	srcBeg = src;
  623|    409|	srcEnd = &src[cchSrc];
  624|       |
  625|    409|	if (cchDst == 0)
  ------------------
  |  Branch (625:6): [True: 247, False: 162]
  ------------------
  626|    247|	{
  627|    247|		result =
  628|    247|		    winpr_ConvertUTF16toUTF8_Internal(&srcBeg, srcEnd, &dstBeg, dstEnd, strictConversion);
  629|       |
  630|    247|		length = dstBeg - ((uint8_t*)nullptr);
  631|    247|	}
  632|    162|	else
  633|    162|	{
  634|    162|		dstBeg = dst;
  635|    162|		dstEnd = &dst[cchDst];
  636|       |
  637|    162|		result =
  638|    162|		    winpr_ConvertUTF16toUTF8_Internal(&srcBeg, srcEnd, &dstBeg, dstEnd, strictConversion);
  639|       |
  640|    162|		length = dstBeg - dst;
  641|    162|	}
  642|       |
  643|    409|	if (result == targetExhausted)
  ------------------
  |  Branch (643:6): [True: 0, False: 409]
  ------------------
  644|      0|	{
  645|      0|		SetLastError(ERROR_INSUFFICIENT_BUFFER);
  ------------------
  |  |  275|      0|#define ERROR_INSUFFICIENT_BUFFER 0x0000007A
  ------------------
  646|      0|		return 0;
  647|      0|	}
  648|       |
  649|    409|	return (result == conversionOK) ? WINPR_ASSERTING_INT_CAST(int, length) : 0;
  ------------------
  |  |  112|    324|	__extension__({                                                                             \
  |  |  113|    324|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|    324|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|    324|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    324|	do                                                                                             \
  |  |  |  |  |  |   61|    324|	{                                                                                              \
  |  |  |  |  |  |   62|    324|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    324|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    324|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    324|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    324|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    324|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    324|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    324|                                                                                                   \
  |  |  |  |  |  |   70|    324|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    324|	do                                                      \
  |  |  |  |  |  |  |  |   32|    324|	{                                                       \
  |  |  |  |  |  |  |  |   33|    324|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 324]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    324|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    324|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 324]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    324|                                                                                                   \
  |  |  |  |  |  |   72|    324|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    324|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    324|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    324|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 324]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|    324|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|    324|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|    324|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    324|	do                                                                                             \
  |  |  |  |  |  |   61|    324|	{                                                                                              \
  |  |  |  |  |  |   62|    324|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    324|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    324|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    324|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    324|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    324|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    324|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    324|                                                                                                   \
  |  |  |  |  |  |   70|    324|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    324|	do                                                      \
  |  |  |  |  |  |  |  |   32|    324|	{                                                       \
  |  |  |  |  |  |  |  |   33|    972|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 324, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 324, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    324|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    324|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 324]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    324|                                                                                                   \
  |  |  |  |  |  |   72|    324|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    324|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    324|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    324|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 324]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|    324|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|    324|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|    324|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|    324|	})
  ------------------
  |  Branch (649:9): [True: 324, False: 85]
  ------------------
  650|    409|}
unicode_builtin.c:winpr_ConvertUTF16toUTF8_Internal:
  164|    409|{
  165|    409|	bool computeLength = (!targetEnd) ? true : false;
  ------------------
  |  Branch (165:23): [True: 247, False: 162]
  ------------------
  166|    409|	const uint16_t* source = *sourceStart;
  167|    409|	uint8_t* target = *targetStart;
  168|    409|	ConversionResult result = conversionOK;
  169|       |
  170|   589k|	while (source < sourceEnd)
  ------------------
  |  Branch (170:9): [True: 588k, False: 324]
  ------------------
  171|   588k|	{
  172|   588k|		uint32_t ch = 0;
  173|   588k|		unsigned short bytesToWrite = 0;
  174|   588k|		const uint32_t byteMask = 0xBF;
  175|   588k|		const uint32_t byteMark = 0x80;
  176|   588k|		const uint16_t* oldSource =
  177|   588k|		    source; /* In case we have to back up because of target overflow. */
  178|       |
  179|   588k|		ch = setWcharFrom(*source++);
  180|       |
  181|       |		/* If we have a surrogate pair, convert to UTF32 first. */
  182|   588k|		if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END)
  ------------------
  |  |   85|  1.17M|#define UNI_SUR_HIGH_START (uint32_t)0xD800
  ------------------
              		if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END)
  ------------------
  |  |   86|  69.5k|#define UNI_SUR_HIGH_END (uint32_t)0xDBFF
  ------------------
  |  Branch (182:7): [True: 69.5k, False: 519k]
  |  Branch (182:35): [True: 1.06k, False: 68.4k]
  ------------------
  183|  1.06k|		{
  184|       |			/* If the 16 bits following the high surrogate are in the source buffer... */
  185|  1.06k|			if (source < sourceEnd)
  ------------------
  |  Branch (185:8): [True: 1.06k, False: 1]
  ------------------
  186|  1.06k|			{
  187|  1.06k|				uint32_t ch2 = setWcharFrom(*source);
  188|       |
  189|       |				/* If it's a low surrogate, convert to UTF32. */
  190|  1.06k|				if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END)
  ------------------
  |  |   87|  2.13k|#define UNI_SUR_LOW_START (uint32_t)0xDC00
  ------------------
              				if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END)
  ------------------
  |  |   88|  1.02k|#define UNI_SUR_LOW_END (uint32_t)0xDFFF
  ------------------
  |  Branch (190:9): [True: 1.02k, False: 44]
  |  Branch (190:37): [True: 1.01k, False: 4]
  ------------------
  191|  1.01k|				{
  192|  1.01k|					ch = ((ch - UNI_SUR_HIGH_START) << halfShift) + (ch2 - UNI_SUR_LOW_START) +
  ------------------
  |  |   85|  1.01k|#define UNI_SUR_HIGH_START (uint32_t)0xD800
  ------------------
              					ch = ((ch - UNI_SUR_HIGH_START) << halfShift) + (ch2 - UNI_SUR_LOW_START) +
  ------------------
  |  |   87|  1.01k|#define UNI_SUR_LOW_START (uint32_t)0xDC00
  ------------------
  193|  1.01k|					     halfBase;
  194|  1.01k|					++source;
  195|  1.01k|				}
  196|     48|				else if (flags == strictConversion)
  ------------------
  |  Branch (196:14): [True: 48, False: 0]
  ------------------
  197|     48|				{
  198|       |					/* it's an unpaired high surrogate */
  199|     48|					--source; /* return to the illegal value itself */
  200|     48|					result = sourceIllegal;
  201|     48|					break;
  202|     48|				}
  203|  1.06k|			}
  204|      1|			else
  205|      1|			{
  206|       |				/* We don't have the 16 bits following the high surrogate. */
  207|      1|				--source; /* return to the high surrogate */
  208|      1|				result = sourceExhausted;
  209|      1|				break;
  210|      1|			}
  211|  1.06k|		}
  212|   587k|		else if (flags == strictConversion)
  ------------------
  |  Branch (212:12): [True: 587k, False: 0]
  ------------------
  213|   587k|		{
  214|       |			/* UTF-16 surrogate values are illegal in UTF-32 */
  215|   587k|			if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END)
  ------------------
  |  |   87|  1.17M|#define UNI_SUR_LOW_START (uint32_t)0xDC00
  ------------------
              			if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END)
  ------------------
  |  |   88|  68.4k|#define UNI_SUR_LOW_END (uint32_t)0xDFFF
  ------------------
  |  Branch (215:8): [True: 68.4k, False: 519k]
  |  Branch (215:35): [True: 36, False: 68.4k]
  ------------------
  216|     36|			{
  217|     36|				--source; /* return to the illegal value itself */
  218|     36|				result = sourceIllegal;
  219|     36|				break;
  220|     36|			}
  221|   587k|		}
  222|       |
  223|       |		/* Figure out how many bytes the result will require */
  224|   588k|		if (ch < (uint32_t)0x80)
  ------------------
  |  Branch (224:7): [True: 820, False: 587k]
  ------------------
  225|    820|		{
  226|    820|			bytesToWrite = 1;
  227|    820|		}
  228|   587k|		else if (ch < (uint32_t)0x800)
  ------------------
  |  Branch (228:12): [True: 39.3k, False: 548k]
  ------------------
  229|  39.3k|		{
  230|  39.3k|			bytesToWrite = 2;
  231|  39.3k|		}
  232|   548k|		else if (ch < (uint32_t)0x10000)
  ------------------
  |  Branch (232:12): [True: 547k, False: 1.01k]
  ------------------
  233|   547k|		{
  234|   547k|			bytesToWrite = 3;
  235|   547k|		}
  236|  1.01k|		else if (ch < (uint32_t)0x110000)
  ------------------
  |  Branch (236:12): [True: 1.01k, False: 0]
  ------------------
  237|  1.01k|		{
  238|  1.01k|			bytesToWrite = 4;
  239|  1.01k|		}
  240|      0|		else
  241|      0|		{
  242|      0|			bytesToWrite = 3;
  243|      0|			ch = UNI_REPLACEMENT_CHAR;
  ------------------
  |  |   60|      0|#define UNI_REPLACEMENT_CHAR (uint32_t)0x0000FFFD
  ------------------
  244|      0|		}
  245|       |
  246|   588k|		target += bytesToWrite;
  247|       |
  248|   588k|		if ((target > targetEnd) && (!computeLength))
  ------------------
  |  Branch (248:7): [True: 295k, False: 293k]
  |  Branch (248:31): [True: 0, False: 295k]
  ------------------
  249|      0|		{
  250|      0|			source = oldSource; /* Back up source pointer! */
  251|      0|			target -= bytesToWrite;
  252|      0|			result = targetExhausted;
  253|      0|			break;
  254|      0|		}
  255|       |
  256|   588k|		if (!computeLength)
  ------------------
  |  Branch (256:7): [True: 293k, False: 295k]
  ------------------
  257|   293k|		{
  258|   293k|			switch (bytesToWrite)
  259|   293k|			{
  260|       |					/* note: everything falls through. */
  261|    499|				case 4:
  ------------------
  |  Branch (261:5): [True: 499, False: 293k]
  ------------------
  262|    499|					*--target = (uint8_t)((ch | byteMark) & byteMask);
  263|    499|					ch >>= 6;
  264|       |					/* fallthrough */
  265|    499|					WINPR_FALLTHROUGH
  ------------------
  |  |   68|    499|	(void)0;              \
  |  |   69|    499|	[[fallthrough]];
  ------------------
  266|   273k|				case 3:
  ------------------
  |  Branch (266:5): [True: 273k, False: 20.5k]
  ------------------
  267|   273k|					*--target = (uint8_t)((ch | byteMark) & byteMask);
  268|   273k|					ch >>= 6;
  269|       |					/* fallthrough */
  270|   273k|					WINPR_FALLTHROUGH
  ------------------
  |  |   68|   273k|	(void)0;              \
  |  |   69|   273k|	[[fallthrough]];
  ------------------
  271|       |
  272|   293k|				case 2:
  ------------------
  |  Branch (272:5): [True: 19.6k, False: 273k]
  ------------------
  273|   293k|					*--target = (uint8_t)((ch | byteMark) & byteMask);
  274|   293k|					ch >>= 6;
  275|       |					/* fallthrough */
  276|   293k|					WINPR_FALLTHROUGH
  ------------------
  |  |   68|   293k|	(void)0;              \
  |  |   69|   293k|	[[fallthrough]];
  ------------------
  277|       |
  278|   293k|				case 1:
  ------------------
  |  Branch (278:5): [True: 406, False: 293k]
  ------------------
  279|   293k|					*--target = (uint8_t)(ch | firstByteMark[bytesToWrite]);
  280|   293k|					break;
  281|      0|				default:
  ------------------
  |  Branch (281:5): [True: 0, False: 293k]
  ------------------
  282|      0|					return sourceIllegal;
  283|   293k|			}
  284|   293k|		}
  285|   295k|		else
  286|   295k|		{
  287|   295k|			switch (bytesToWrite)
  288|   295k|			{
  289|       |					/* note: everything falls through. */
  290|    518|				case 4:
  ------------------
  |  Branch (290:5): [True: 518, False: 294k]
  ------------------
  291|    518|					--target;
  292|       |					/* fallthrough */
  293|    518|					WINPR_FALLTHROUGH
  ------------------
  |  |   68|    518|	(void)0;              \
  |  |   69|    518|	[[fallthrough]];
  ------------------
  294|       |
  295|   275k|				case 3:
  ------------------
  |  Branch (295:5): [True: 274k, False: 20.6k]
  ------------------
  296|   275k|					--target;
  297|       |					/* fallthrough */
  298|   275k|					WINPR_FALLTHROUGH
  ------------------
  |  |   68|   275k|	(void)0;              \
  |  |   69|   275k|	[[fallthrough]];
  ------------------
  299|       |
  300|   294k|				case 2:
  ------------------
  |  Branch (300:5): [True: 19.6k, False: 275k]
  ------------------
  301|   294k|					--target;
  302|       |					/* fallthrough */
  303|   294k|					WINPR_FALLTHROUGH
  ------------------
  |  |   68|   294k|	(void)0;              \
  |  |   69|   294k|	[[fallthrough]];
  ------------------
  304|       |
  305|   295k|				case 1:
  ------------------
  |  Branch (305:5): [True: 414, False: 294k]
  ------------------
  306|   295k|					--target;
  307|   295k|					break;
  308|      0|				default:
  ------------------
  |  Branch (308:5): [True: 0, False: 295k]
  ------------------
  309|      0|					return sourceIllegal;
  310|   295k|			}
  311|   295k|		}
  312|       |
  313|   588k|		target += bytesToWrite;
  314|   588k|	}
  315|       |
  316|    409|	*sourceStart = source;
  317|    409|	*targetStart = target;
  318|    409|	return result;
  319|    409|}

winpr_RC4_New:
  146|    246|{
  147|    246|	return winpr_RC4_New_Internal(key, keylen, FALSE);
  ------------------
  |  |  122|    246|#define FALSE false
  ------------------
  148|    246|}
winpr_RC4_Update:
  151|    246|{
  152|    246|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    246|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    246|	do                                                                                             \
  |  |  |  |   61|    246|	{                                                                                              \
  |  |  |  |   62|    246|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    246|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    246|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    246|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    246|                                                                                                   \
  |  |  |  |   70|    246|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    246|	do                                                      \
  |  |  |  |  |  |   32|    246|	{                                                       \
  |  |  |  |  |  |   33|    246|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    246|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    246|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    246|                                                                                                   \
  |  |  |  |   72|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    246|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    246|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    246|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 246]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|       |
  154|       |#if defined(WITH_INTERNAL_RC4)
  155|       |	return winpr_int_rc4_update(ctx->ictx, length, input, output);
  156|       |#elif defined(WITH_OPENSSL)
  157|    246|	WINPR_ASSERT(ctx->ctx);
  ------------------
  |  |   76|    246|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    246|	do                                                                                             \
  |  |  |  |   61|    246|	{                                                                                              \
  |  |  |  |   62|    246|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    246|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    246|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    246|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    246|                                                                                                   \
  |  |  |  |   70|    246|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    246|	do                                                      \
  |  |  |  |  |  |   32|    246|	{                                                       \
  |  |  |  |  |  |   33|    246|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    246|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    246|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    246|                                                                                                   \
  |  |  |  |   72|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    246|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    246|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    246|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 246]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  158|    246|	int outputLength = 0;
  159|    246|	if (length > INT_MAX)
  ------------------
  |  Branch (159:6): [True: 0, False: 246]
  ------------------
  160|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  161|       |
  162|    246|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    246|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    246|	do                                                                                             \
  |  |  |  |   61|    246|	{                                                                                              \
  |  |  |  |   62|    246|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    246|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    246|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    246|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    246|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    246|                                                                                                   \
  |  |  |  |   70|    246|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    246|	do                                                      \
  |  |  |  |  |  |   32|    246|	{                                                       \
  |  |  |  |  |  |   33|    246|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    246|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    246|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 246]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    246|                                                                                                   \
  |  |  |  |   72|    246|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    246|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    246|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    246|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 246]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|    246|	return EVP_CipherUpdate(ctx->ctx, output, &outputLength, input, (int)length) == 1;
  164|      0|#endif
  165|      0|	return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  166|    246|}
winpr_RC4_Free:
  169|    320|{
  170|    320|	if (!ctx)
  ------------------
  |  Branch (170:6): [True: 74, False: 246]
  ------------------
  171|     74|		return;
  172|       |
  173|       |#if defined(WITH_INTERNAL_RC4)
  174|       |	winpr_int_rc4_free(ctx->ictx);
  175|       |#elif defined(WITH_OPENSSL)
  176|    246|	EVP_CIPHER_CTX_free(ctx->ctx);
  177|    246|#endif
  178|    246|	free(ctx);
  179|    246|}
winpr_Cipher_NewEx:
  593|    434|{
  594|    434|	if (cipher == WINPR_CIPHER_ARC4_128)
  ------------------
  |  Branch (594:6): [True: 0, False: 434]
  ------------------
  595|      0|	{
  596|      0|		WLog_ERR(TAG,
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  597|      0|		         "WINPR_CIPHER_ARC4_128 (RC4) cipher not supported, use winpr_RC4_new instead");
  598|      0|		return nullptr;
  599|      0|	}
  600|       |
  601|    434|	WINPR_CIPHER_CTX* ctx = calloc(1, sizeof(WINPR_CIPHER_CTX));
  602|    434|	if (!ctx)
  ------------------
  |  Branch (602:6): [True: 0, False: 434]
  ------------------
  603|      0|		return nullptr;
  604|       |
  605|    434|	ctx->cipher = cipher;
  606|    434|	ctx->op = op;
  607|       |
  608|    434|#if defined(WITH_OPENSSL)
  609|    434|	const EVP_CIPHER* evp = winpr_openssl_get_evp_cipher(cipher);
  610|    434|	if (!evp)
  ------------------
  |  Branch (610:6): [True: 0, False: 434]
  ------------------
  611|      0|		goto fail;
  612|       |
  613|    434|	ctx->ectx = EVP_CIPHER_CTX_new();
  614|    434|	if (!ctx->ectx)
  ------------------
  |  Branch (614:6): [True: 0, False: 434]
  ------------------
  615|      0|		goto fail;
  616|       |
  617|    434|	{
  618|    434|		const int operation = (op == WINPR_ENCRYPT) ? 1 : 0;
  ------------------
  |  Branch (618:25): [True: 0, False: 434]
  ------------------
  619|    434|		if (EVP_CipherInit_ex(ctx->ectx, evp, nullptr, key, iv, operation) != 1)
  ------------------
  |  Branch (619:7): [True: 0, False: 434]
  ------------------
  620|      0|			goto fail;
  621|    434|	}
  622|       |
  623|    434|	EVP_CIPHER_CTX_set_padding(ctx->ectx, 0);
  624|       |
  625|       |#elif defined(WITH_MBEDTLS)
  626|       |	mbedtls_cipher_type_t cipher_type = winpr_mbedtls_get_cipher_type(cipher);
  627|       |	const mbedtls_cipher_info_t* cipher_info = mbedtls_cipher_info_from_type(cipher_type);
  628|       |
  629|       |	if (!cipher_info)
  630|       |		goto fail;
  631|       |
  632|       |	ctx->mctx = calloc(1, sizeof(mbedtls_cipher_context_t));
  633|       |	if (!ctx->mctx)
  634|       |		goto fail;
  635|       |
  636|       |	const mbedtls_operation_t operation = (op == WINPR_ENCRYPT) ? MBEDTLS_ENCRYPT : MBEDTLS_DECRYPT;
  637|       |	mbedtls_cipher_init(ctx->mctx);
  638|       |
  639|       |	if (mbedtls_cipher_setup(ctx->mctx, cipher_info) != 0)
  640|       |		goto fail;
  641|       |
  642|       |	const int key_bitlen = mbedtls_cipher_get_key_bitlen(ctx->mctx);
  643|       |
  644|       |	if (mbedtls_cipher_setkey(ctx->mctx, key, key_bitlen, operation) != 0)
  645|       |		goto fail;
  646|       |
  647|       |	if (mbedtls_cipher_set_padding_mode(ctx->mctx, MBEDTLS_PADDING_NONE) != 0)
  648|       |		goto fail;
  649|       |
  650|       |#endif
  651|    434|	return ctx;
  652|       |
  653|      0|fail:
  654|      0|	winpr_Cipher_Free(ctx);
  655|      0|	return nullptr;
  656|    434|}
winpr_Cipher_Update:
  678|    434|{
  679|    434|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    434|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    434|	do                                                                                             \
  |  |  |  |   61|    434|	{                                                                                              \
  |  |  |  |   62|    434|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    434|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    434|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    434|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    434|                                                                                                   \
  |  |  |  |   70|    434|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    434|	do                                                      \
  |  |  |  |  |  |   32|    434|	{                                                       \
  |  |  |  |  |  |   33|    434|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    434|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    434|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    434|                                                                                                   \
  |  |  |  |   72|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    434|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    434|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    434|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 434]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  680|    434|	WINPR_ASSERT(olen);
  ------------------
  |  |   76|    434|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    434|	do                                                                                             \
  |  |  |  |   61|    434|	{                                                                                              \
  |  |  |  |   62|    434|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    434|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    434|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    434|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    434|                                                                                                   \
  |  |  |  |   70|    434|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    434|	do                                                      \
  |  |  |  |  |  |   32|    434|	{                                                       \
  |  |  |  |  |  |   33|    434|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    434|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    434|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    434|                                                                                                   \
  |  |  |  |   72|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    434|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    434|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    434|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 434]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  681|       |
  682|    434|#if defined(WITH_OPENSSL)
  683|    434|	int outl = (int)*olen;
  684|       |
  685|    434|	if (ilen > INT_MAX)
  ------------------
  |  Branch (685:6): [True: 0, False: 434]
  ------------------
  686|      0|	{
  687|      0|		WLog_ERR(TAG, "input length %" PRIuz " > %d, abort", ilen, INT_MAX);
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  688|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  689|      0|	}
  690|       |
  691|    434|	WINPR_ASSERT(ctx->ectx);
  ------------------
  |  |   76|    434|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    434|	do                                                                                             \
  |  |  |  |   61|    434|	{                                                                                              \
  |  |  |  |   62|    434|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    434|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    434|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    434|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    434|                                                                                                   \
  |  |  |  |   70|    434|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    434|	do                                                      \
  |  |  |  |  |  |   32|    434|	{                                                       \
  |  |  |  |  |  |   33|    434|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    434|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    434|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    434|                                                                                                   \
  |  |  |  |   72|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    434|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    434|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    434|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 434]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|    434|	if (EVP_CipherUpdate(ctx->ectx, output, &outl, input, (int)ilen) == 1)
  ------------------
  |  Branch (692:6): [True: 434, False: 0]
  ------------------
  693|    434|	{
  694|    434|		*olen = (size_t)outl;
  695|    434|		return TRUE;
  ------------------
  |  |  126|    434|#define TRUE true
  ------------------
  696|    434|	}
  697|       |
  698|       |#elif defined(WITH_MBEDTLS)
  699|       |	WINPR_ASSERT(ctx->mctx);
  700|       |	if (mbedtls_cipher_update(ctx->mctx, input, ilen, output, olen) == 0)
  701|       |		return TRUE;
  702|       |
  703|       |#endif
  704|       |
  705|      0|	WLog_ERR(TAG, "Failed to update the data");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  706|      0|	return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  707|    434|}
winpr_Cipher_Final:
  710|    434|{
  711|    434|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    434|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    434|	do                                                                                             \
  |  |  |  |   61|    434|	{                                                                                              \
  |  |  |  |   62|    434|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    434|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    434|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    434|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    434|                                                                                                   \
  |  |  |  |   70|    434|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    434|	do                                                      \
  |  |  |  |  |  |   32|    434|	{                                                       \
  |  |  |  |  |  |   33|    434|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    434|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    434|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    434|                                                                                                   \
  |  |  |  |   72|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    434|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    434|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    434|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 434]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  712|       |
  713|    434|#if defined(WITH_OPENSSL)
  714|    434|	int outl = (int)*olen;
  715|       |
  716|    434|	WINPR_ASSERT(ctx->ectx);
  ------------------
  |  |   76|    434|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    434|	do                                                                                             \
  |  |  |  |   61|    434|	{                                                                                              \
  |  |  |  |   62|    434|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    434|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    434|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    434|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    434|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    434|                                                                                                   \
  |  |  |  |   70|    434|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    434|	do                                                      \
  |  |  |  |  |  |   32|    434|	{                                                       \
  |  |  |  |  |  |   33|    434|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    434|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    434|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    434|                                                                                                   \
  |  |  |  |   72|    434|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    434|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    434|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    434|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 434]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  717|    434|	if (EVP_CipherFinal_ex(ctx->ectx, output, &outl) == 1)
  ------------------
  |  Branch (717:6): [True: 248, False: 186]
  ------------------
  718|    248|	{
  719|    248|		*olen = (size_t)outl;
  720|    248|		return TRUE;
  ------------------
  |  |  126|    248|#define TRUE true
  ------------------
  721|    248|	}
  722|       |
  723|       |#elif defined(WITH_MBEDTLS)
  724|       |
  725|       |	WINPR_ASSERT(ctx->mctx);
  726|       |	if (mbedtls_cipher_finish(ctx->mctx, output, olen) == 0)
  727|       |		return TRUE;
  728|       |
  729|       |#endif
  730|       |
  731|    186|	return FALSE;
  ------------------
  |  |  122|    186|#define FALSE false
  ------------------
  732|    434|}
winpr_Cipher_Free:
  735|    434|{
  736|    434|	if (!ctx)
  ------------------
  |  Branch (736:6): [True: 0, False: 434]
  ------------------
  737|      0|		return;
  738|       |
  739|    434|#if defined(WITH_OPENSSL)
  740|    434|	if (ctx->ectx)
  ------------------
  |  Branch (740:6): [True: 434, False: 0]
  ------------------
  741|    434|		EVP_CIPHER_CTX_free(ctx->ectx);
  742|       |#elif defined(WITH_MBEDTLS)
  743|       |	if (ctx->mctx)
  744|       |	{
  745|       |		mbedtls_cipher_free(ctx->mctx);
  746|       |		free(ctx->mctx);
  747|       |	}
  748|       |#endif
  749|       |
  750|    434|	free(ctx);
  751|    434|}
cipher.c:winpr_RC4_New_Internal:
   79|    246|{
   80|    246|	if (!key || (keylen == 0))
  ------------------
  |  Branch (80:6): [True: 0, False: 246]
  |  Branch (80:14): [True: 0, False: 246]
  ------------------
   81|      0|		return nullptr;
   82|       |
   83|    246|	WINPR_RC4_CTX* ctx = (WINPR_RC4_CTX*)calloc(1, sizeof(WINPR_RC4_CTX));
   84|    246|	if (!ctx)
  ------------------
  |  Branch (84:6): [True: 0, False: 246]
  ------------------
   85|      0|		return nullptr;
   86|       |
   87|       |#if defined(WITH_INTERNAL_RC4)
   88|       |	WINPR_UNUSED(override_fips);
   89|       |	ctx->ictx = winpr_int_rc4_new(key, keylen);
   90|       |	if (!ctx->ictx)
   91|       |		goto fail;
   92|       |#elif defined(WITH_OPENSSL)
   93|       |
   94|    246|	if (keylen > INT_MAX)
  ------------------
  |  Branch (94:6): [True: 0, False: 246]
  ------------------
   95|      0|		goto fail;
   96|       |
   97|    246|	ctx->ctx = EVP_CIPHER_CTX_new();
   98|    246|	if (!ctx->ctx)
  ------------------
  |  Branch (98:6): [True: 0, False: 246]
  ------------------
   99|      0|		goto fail;
  100|       |
  101|       |#if OPENSSL_VERSION_NUMBER >= 0x30000000L
  102|       |	EVP_CIPHER* evp = EVP_CIPHER_fetch(nullptr, "RC4", override_fips ? "fips=no" : nullptr);
  103|       |#else
  104|    246|	const EVP_CIPHER* evp = EVP_rc4();
  105|    246|#endif
  106|       |
  107|    246|	if (!evp)
  ------------------
  |  Branch (107:6): [True: 0, False: 246]
  ------------------
  108|      0|		goto fail;
  109|       |
  110|    246|	EVP_CIPHER_CTX_reset(ctx->ctx);
  111|    246|	if (EVP_EncryptInit_ex(ctx->ctx, evp, nullptr, nullptr, nullptr) != 1)
  ------------------
  |  Branch (111:6): [True: 0, False: 246]
  ------------------
  112|      0|		goto fail;
  113|       |
  114|       |#if OPENSSL_VERSION_NUMBER >= 0x30000000L
  115|       |	EVP_CIPHER_free(evp);
  116|       |
  117|       |	/* EVP_CIPH_FLAG_NON_FIPS_ALLOW does not exist before openssl 1.0.1 */
  118|       |#if !(OPENSSL_VERSION_NUMBER < 0x10001000L)
  119|       |
  120|       |	if (override_fips == TRUE)
  121|       |		EVP_CIPHER_CTX_set_flags(ctx->ctx, EVP_CIPH_FLAG_NON_FIPS_ALLOW);
  122|       |
  123|       |#endif
  124|       |#endif
  125|    246|	EVP_CIPHER_CTX_set_key_length(ctx->ctx, (int)keylen);
  126|    246|	if (EVP_EncryptInit_ex(ctx->ctx, nullptr, nullptr, key, nullptr) != 1)
  ------------------
  |  Branch (126:6): [True: 0, False: 246]
  ------------------
  127|      0|		goto fail;
  128|    246|#endif
  129|    246|	return ctx;
  130|       |
  131|      0|fail:
  132|      0|	WINPR_PRAGMA_DIAG_PUSH
  133|      0|	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
  134|       |
  135|      0|	winpr_RC4_Free(ctx);
  136|      0|	WINPR_PRAGMA_DIAG_POP
  137|      0|	return nullptr;
  138|    246|}
cipher.c:winpr_openssl_get_evp_cipher:
  287|    434|{
  288|    434|	const EVP_CIPHER* evp = nullptr;
  289|       |
  290|    434|	switch (cipher)
  291|    434|	{
  292|      0|		case WINPR_CIPHER_NULL:
  ------------------
  |  Branch (292:3): [True: 0, False: 434]
  ------------------
  293|      0|			evp = EVP_enc_null();
  294|      0|			break;
  295|       |
  296|      0|		case WINPR_CIPHER_AES_128_ECB:
  ------------------
  |  Branch (296:3): [True: 0, False: 434]
  ------------------
  297|      0|			evp = EVP_get_cipherbyname("aes-128-ecb");
  298|      0|			break;
  299|       |
  300|      0|		case WINPR_CIPHER_AES_192_ECB:
  ------------------
  |  Branch (300:3): [True: 0, False: 434]
  ------------------
  301|      0|			evp = EVP_get_cipherbyname("aes-192-ecb");
  302|      0|			break;
  303|       |
  304|      0|		case WINPR_CIPHER_AES_256_ECB:
  ------------------
  |  Branch (304:3): [True: 0, False: 434]
  ------------------
  305|      0|			evp = EVP_get_cipherbyname("aes-256-ecb");
  306|      0|			break;
  307|       |
  308|    434|		case WINPR_CIPHER_AES_128_CBC:
  ------------------
  |  Branch (308:3): [True: 434, False: 0]
  ------------------
  309|    434|			evp = EVP_get_cipherbyname("aes-128-cbc");
  310|    434|			break;
  311|       |
  312|      0|		case WINPR_CIPHER_AES_192_CBC:
  ------------------
  |  Branch (312:3): [True: 0, False: 434]
  ------------------
  313|      0|			evp = EVP_get_cipherbyname("aes-192-cbc");
  314|      0|			break;
  315|       |
  316|      0|		case WINPR_CIPHER_AES_256_CBC:
  ------------------
  |  Branch (316:3): [True: 0, False: 434]
  ------------------
  317|      0|			evp = EVP_get_cipherbyname("aes-256-cbc");
  318|      0|			break;
  319|       |
  320|      0|		case WINPR_CIPHER_AES_128_CFB128:
  ------------------
  |  Branch (320:3): [True: 0, False: 434]
  ------------------
  321|      0|			evp = EVP_get_cipherbyname("aes-128-cfb128");
  322|      0|			break;
  323|       |
  324|      0|		case WINPR_CIPHER_AES_192_CFB128:
  ------------------
  |  Branch (324:3): [True: 0, False: 434]
  ------------------
  325|      0|			evp = EVP_get_cipherbyname("aes-192-cfb128");
  326|      0|			break;
  327|       |
  328|      0|		case WINPR_CIPHER_AES_256_CFB128:
  ------------------
  |  Branch (328:3): [True: 0, False: 434]
  ------------------
  329|      0|			evp = EVP_get_cipherbyname("aes-256-cfb128");
  330|      0|			break;
  331|       |
  332|      0|		case WINPR_CIPHER_AES_128_CTR:
  ------------------
  |  Branch (332:3): [True: 0, False: 434]
  ------------------
  333|      0|			evp = EVP_get_cipherbyname("aes-128-ctr");
  334|      0|			break;
  335|       |
  336|      0|		case WINPR_CIPHER_AES_192_CTR:
  ------------------
  |  Branch (336:3): [True: 0, False: 434]
  ------------------
  337|      0|			evp = EVP_get_cipherbyname("aes-192-ctr");
  338|      0|			break;
  339|       |
  340|      0|		case WINPR_CIPHER_AES_256_CTR:
  ------------------
  |  Branch (340:3): [True: 0, False: 434]
  ------------------
  341|      0|			evp = EVP_get_cipherbyname("aes-256-ctr");
  342|      0|			break;
  343|       |
  344|      0|		case WINPR_CIPHER_AES_128_GCM:
  ------------------
  |  Branch (344:3): [True: 0, False: 434]
  ------------------
  345|      0|			evp = EVP_get_cipherbyname("aes-128-gcm");
  346|      0|			break;
  347|       |
  348|      0|		case WINPR_CIPHER_AES_192_GCM:
  ------------------
  |  Branch (348:3): [True: 0, False: 434]
  ------------------
  349|      0|			evp = EVP_get_cipherbyname("aes-192-gcm");
  350|      0|			break;
  351|       |
  352|      0|		case WINPR_CIPHER_AES_256_GCM:
  ------------------
  |  Branch (352:3): [True: 0, False: 434]
  ------------------
  353|      0|			evp = EVP_get_cipherbyname("aes-256-gcm");
  354|      0|			break;
  355|       |
  356|      0|		case WINPR_CIPHER_AES_128_CCM:
  ------------------
  |  Branch (356:3): [True: 0, False: 434]
  ------------------
  357|      0|			evp = EVP_get_cipherbyname("aes-128-ccm");
  358|      0|			break;
  359|       |
  360|      0|		case WINPR_CIPHER_AES_192_CCM:
  ------------------
  |  Branch (360:3): [True: 0, False: 434]
  ------------------
  361|      0|			evp = EVP_get_cipherbyname("aes-192-ccm");
  362|      0|			break;
  363|       |
  364|      0|		case WINPR_CIPHER_AES_256_CCM:
  ------------------
  |  Branch (364:3): [True: 0, False: 434]
  ------------------
  365|      0|			evp = EVP_get_cipherbyname("aes-256-ccm");
  366|      0|			break;
  367|       |
  368|      0|		case WINPR_CIPHER_CAMELLIA_128_ECB:
  ------------------
  |  Branch (368:3): [True: 0, False: 434]
  ------------------
  369|      0|			evp = EVP_get_cipherbyname("camellia-128-ecb");
  370|      0|			break;
  371|       |
  372|      0|		case WINPR_CIPHER_CAMELLIA_192_ECB:
  ------------------
  |  Branch (372:3): [True: 0, False: 434]
  ------------------
  373|      0|			evp = EVP_get_cipherbyname("camellia-192-ecb");
  374|      0|			break;
  375|       |
  376|      0|		case WINPR_CIPHER_CAMELLIA_256_ECB:
  ------------------
  |  Branch (376:3): [True: 0, False: 434]
  ------------------
  377|      0|			evp = EVP_get_cipherbyname("camellia-256-ecb");
  378|      0|			break;
  379|       |
  380|      0|		case WINPR_CIPHER_CAMELLIA_128_CBC:
  ------------------
  |  Branch (380:3): [True: 0, False: 434]
  ------------------
  381|      0|			evp = EVP_get_cipherbyname("camellia-128-cbc");
  382|      0|			break;
  383|       |
  384|      0|		case WINPR_CIPHER_CAMELLIA_192_CBC:
  ------------------
  |  Branch (384:3): [True: 0, False: 434]
  ------------------
  385|      0|			evp = EVP_get_cipherbyname("camellia-192-cbc");
  386|      0|			break;
  387|       |
  388|      0|		case WINPR_CIPHER_CAMELLIA_256_CBC:
  ------------------
  |  Branch (388:3): [True: 0, False: 434]
  ------------------
  389|      0|			evp = EVP_get_cipherbyname("camellia-256-cbc");
  390|      0|			break;
  391|       |
  392|      0|		case WINPR_CIPHER_CAMELLIA_128_CFB128:
  ------------------
  |  Branch (392:3): [True: 0, False: 434]
  ------------------
  393|      0|			evp = EVP_get_cipherbyname("camellia-128-cfb128");
  394|      0|			break;
  395|       |
  396|      0|		case WINPR_CIPHER_CAMELLIA_192_CFB128:
  ------------------
  |  Branch (396:3): [True: 0, False: 434]
  ------------------
  397|      0|			evp = EVP_get_cipherbyname("camellia-192-cfb128");
  398|      0|			break;
  399|       |
  400|      0|		case WINPR_CIPHER_CAMELLIA_256_CFB128:
  ------------------
  |  Branch (400:3): [True: 0, False: 434]
  ------------------
  401|      0|			evp = EVP_get_cipherbyname("camellia-256-cfb128");
  402|      0|			break;
  403|       |
  404|      0|		case WINPR_CIPHER_CAMELLIA_128_CTR:
  ------------------
  |  Branch (404:3): [True: 0, False: 434]
  ------------------
  405|      0|			evp = EVP_get_cipherbyname("camellia-128-ctr");
  406|      0|			break;
  407|       |
  408|      0|		case WINPR_CIPHER_CAMELLIA_192_CTR:
  ------------------
  |  Branch (408:3): [True: 0, False: 434]
  ------------------
  409|      0|			evp = EVP_get_cipherbyname("camellia-192-ctr");
  410|      0|			break;
  411|       |
  412|      0|		case WINPR_CIPHER_CAMELLIA_256_CTR:
  ------------------
  |  Branch (412:3): [True: 0, False: 434]
  ------------------
  413|      0|			evp = EVP_get_cipherbyname("camellia-256-ctr");
  414|      0|			break;
  415|       |
  416|      0|		case WINPR_CIPHER_CAMELLIA_128_GCM:
  ------------------
  |  Branch (416:3): [True: 0, False: 434]
  ------------------
  417|      0|			evp = EVP_get_cipherbyname("camellia-128-gcm");
  418|      0|			break;
  419|       |
  420|      0|		case WINPR_CIPHER_CAMELLIA_192_GCM:
  ------------------
  |  Branch (420:3): [True: 0, False: 434]
  ------------------
  421|      0|			evp = EVP_get_cipherbyname("camellia-192-gcm");
  422|      0|			break;
  423|       |
  424|      0|		case WINPR_CIPHER_CAMELLIA_256_GCM:
  ------------------
  |  Branch (424:3): [True: 0, False: 434]
  ------------------
  425|      0|			evp = EVP_get_cipherbyname("camellia-256-gcm");
  426|      0|			break;
  427|       |
  428|      0|		case WINPR_CIPHER_CAMELLIA_128_CCM:
  ------------------
  |  Branch (428:3): [True: 0, False: 434]
  ------------------
  429|      0|			evp = EVP_get_cipherbyname("camellia-128-ccm");
  430|      0|			break;
  431|       |
  432|      0|		case WINPR_CIPHER_CAMELLIA_192_CCM:
  ------------------
  |  Branch (432:3): [True: 0, False: 434]
  ------------------
  433|      0|			evp = EVP_get_cipherbyname("camellia-192-ccm");
  434|      0|			break;
  435|       |
  436|      0|		case WINPR_CIPHER_CAMELLIA_256_CCM:
  ------------------
  |  Branch (436:3): [True: 0, False: 434]
  ------------------
  437|      0|			evp = EVP_get_cipherbyname("camellia-256-ccm");
  438|      0|			break;
  439|       |
  440|      0|		case WINPR_CIPHER_DES_ECB:
  ------------------
  |  Branch (440:3): [True: 0, False: 434]
  ------------------
  441|      0|			evp = EVP_get_cipherbyname("des-ecb");
  442|      0|			break;
  443|       |
  444|      0|		case WINPR_CIPHER_DES_CBC:
  ------------------
  |  Branch (444:3): [True: 0, False: 434]
  ------------------
  445|      0|			evp = EVP_get_cipherbyname("des-cbc");
  446|      0|			break;
  447|       |
  448|      0|		case WINPR_CIPHER_DES_EDE_ECB:
  ------------------
  |  Branch (448:3): [True: 0, False: 434]
  ------------------
  449|      0|			evp = EVP_get_cipherbyname("des-ede-ecb");
  450|      0|			break;
  451|       |
  452|      0|		case WINPR_CIPHER_DES_EDE_CBC:
  ------------------
  |  Branch (452:3): [True: 0, False: 434]
  ------------------
  453|      0|			evp = EVP_get_cipherbyname("des-ede-cbc");
  454|      0|			break;
  455|       |
  456|      0|		case WINPR_CIPHER_DES_EDE3_ECB:
  ------------------
  |  Branch (456:3): [True: 0, False: 434]
  ------------------
  457|      0|			evp = EVP_get_cipherbyname("des-ede3-ecb");
  458|      0|			break;
  459|       |
  460|      0|		case WINPR_CIPHER_DES_EDE3_CBC:
  ------------------
  |  Branch (460:3): [True: 0, False: 434]
  ------------------
  461|      0|			evp = EVP_get_cipherbyname("des-ede3-cbc");
  462|      0|			break;
  463|       |
  464|      0|		case WINPR_CIPHER_ARC4_128:
  ------------------
  |  Branch (464:3): [True: 0, False: 434]
  ------------------
  465|      0|			evp = EVP_get_cipherbyname("rc4");
  466|      0|			break;
  467|       |
  468|      0|		case WINPR_CIPHER_BLOWFISH_ECB:
  ------------------
  |  Branch (468:3): [True: 0, False: 434]
  ------------------
  469|      0|			evp = EVP_get_cipherbyname("blowfish-ecb");
  470|      0|			break;
  471|       |
  472|      0|		case WINPR_CIPHER_BLOWFISH_CBC:
  ------------------
  |  Branch (472:3): [True: 0, False: 434]
  ------------------
  473|      0|			evp = EVP_get_cipherbyname("blowfish-cbc");
  474|      0|			break;
  475|       |
  476|      0|		case WINPR_CIPHER_BLOWFISH_CFB64:
  ------------------
  |  Branch (476:3): [True: 0, False: 434]
  ------------------
  477|      0|			evp = EVP_get_cipherbyname("blowfish-cfb64");
  478|      0|			break;
  479|       |
  480|      0|		case WINPR_CIPHER_BLOWFISH_CTR:
  ------------------
  |  Branch (480:3): [True: 0, False: 434]
  ------------------
  481|      0|			evp = EVP_get_cipherbyname("blowfish-ctr");
  482|      0|			break;
  483|      0|		default:
  ------------------
  |  Branch (483:3): [True: 0, False: 434]
  ------------------
  484|      0|			break;
  485|    434|	}
  486|       |
  487|    434|	return evp;
  488|    434|}

winpr_openssl_get_evp_md:
   69|  1.54k|{
   70|  1.54k|	const char* name = winpr_md_type_to_string(md);
   71|  1.54k|	if (!name)
  ------------------
  |  Branch (71:6): [True: 0, False: 1.54k]
  ------------------
   72|      0|		return nullptr;
   73|  1.54k|	return EVP_get_digestbyname(name);
   74|  1.54k|}
winpr_md_type_to_string:
  142|  1.54k|{
  143|  1.54k|	const struct hash_map* cur = hashes;
  144|  5.94k|	while (cur->name)
  ------------------
  |  Branch (144:9): [True: 5.94k, False: 0]
  ------------------
  145|  5.94k|	{
  146|  5.94k|		if (cur->md == md)
  ------------------
  |  Branch (146:7): [True: 1.54k, False: 4.39k]
  ------------------
  147|  1.54k|			return cur->name;
  148|  4.39k|		cur++;
  149|  4.39k|	}
  150|      0|	return nullptr;
  151|  1.54k|}
winpr_Digest_New:
  445|  1.54k|{
  446|  1.54k|	WINPR_DIGEST_CTX* ctx = calloc(1, sizeof(WINPR_DIGEST_CTX));
  447|  1.54k|	if (!ctx)
  ------------------
  |  Branch (447:6): [True: 0, False: 1.54k]
  ------------------
  448|      0|		return nullptr;
  449|       |
  450|  1.54k|#if defined(WITH_OPENSSL)
  451|       |#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
  452|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  453|       |	ctx->mdctx = EVP_MD_CTX_create();
  454|       |#else
  455|  1.54k|	ctx->mdctx = EVP_MD_CTX_new();
  456|  1.54k|#endif
  457|  1.54k|	if (!ctx->mdctx)
  ------------------
  |  Branch (457:6): [True: 0, False: 1.54k]
  ------------------
  458|      0|		goto fail;
  459|       |
  460|       |#elif defined(WITH_MBEDTLS)
  461|       |	ctx->mdctx = (mbedtls_md_context_t*)calloc(1, sizeof(mbedtls_md_context_t));
  462|       |
  463|       |	if (!ctx->mdctx)
  464|       |		goto fail;
  465|       |
  466|       |	mbedtls_md_init(ctx->mdctx);
  467|       |#endif
  468|  1.54k|	return ctx;
  469|       |
  470|      0|fail:
  471|      0|	WINPR_PRAGMA_DIAG_PUSH
  472|      0|	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
  473|      0|	winpr_Digest_Free(ctx);
  474|      0|	WINPR_PRAGMA_DIAG_POP
  475|      0|	return nullptr;
  476|  1.54k|}
winpr_Digest_Init:
  560|  1.54k|{
  561|  1.54k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.54k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.54k|	do                                                                                             \
  |  |  |  |   61|  1.54k|	{                                                                                              \
  |  |  |  |   62|  1.54k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.54k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.54k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.54k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.54k|                                                                                                   \
  |  |  |  |   70|  1.54k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.54k|	do                                                      \
  |  |  |  |  |  |   32|  1.54k|	{                                                       \
  |  |  |  |  |  |   33|  1.54k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.54k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.54k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.54k|                                                                                                   \
  |  |  |  |   72|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.54k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.54k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.54k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  562|       |
  563|  1.54k|	ctx->md = md;
  564|  1.54k|	switch (md)
  565|  1.54k|	{
  566|       |#if defined(WITH_INTERNAL_MD4)
  567|       |		case WINPR_MD_MD4:
  568|       |			winpr_MD4_Init(&ctx->md4);
  569|       |			return TRUE;
  570|       |#endif
  571|       |#if defined(WITH_INTERNAL_MD5)
  572|       |		case WINPR_MD_MD5:
  573|       |			winpr_MD5_Init(&ctx->md5);
  574|       |			return TRUE;
  575|       |#endif
  576|  1.54k|		default:
  ------------------
  |  Branch (576:3): [True: 1.54k, False: 0]
  ------------------
  577|  1.54k|			break;
  578|  1.54k|	}
  579|       |
  580|  1.54k|#if defined(WITH_OPENSSL)
  581|  1.54k|	const EVP_MD* evp = winpr_openssl_get_evp_md(md);
  582|  1.54k|	return winpr_Digest_Init_Internal(ctx, evp);
  583|       |#else
  584|       |	return winpr_Digest_Init_Internal(ctx, md);
  585|       |#endif
  586|  1.54k|}
winpr_Digest_Update:
  589|  1.54k|{
  590|  1.54k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.54k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.54k|	do                                                                                             \
  |  |  |  |   61|  1.54k|	{                                                                                              \
  |  |  |  |   62|  1.54k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.54k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.54k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.54k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.54k|                                                                                                   \
  |  |  |  |   70|  1.54k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.54k|	do                                                      \
  |  |  |  |  |  |   32|  1.54k|	{                                                       \
  |  |  |  |  |  |   33|  1.54k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.54k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.54k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.54k|                                                                                                   \
  |  |  |  |   72|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.54k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.54k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.54k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  591|       |
  592|  1.54k|	switch (ctx->md)
  593|  1.54k|	{
  594|       |#if defined(WITH_INTERNAL_MD4)
  595|       |		case WINPR_MD_MD4:
  596|       |			winpr_MD4_Update(&ctx->md4, input, ilen);
  597|       |			return TRUE;
  598|       |#endif
  599|       |#if defined(WITH_INTERNAL_MD5)
  600|       |		case WINPR_MD_MD5:
  601|       |			winpr_MD5_Update(&ctx->md5, input, ilen);
  602|       |			return TRUE;
  603|       |#endif
  604|  1.54k|		default:
  ------------------
  |  Branch (604:3): [True: 1.54k, False: 0]
  ------------------
  605|  1.54k|			break;
  606|  1.54k|	}
  607|       |
  608|  1.54k|#if defined(WITH_OPENSSL)
  609|  1.54k|	EVP_MD_CTX* mdctx = ctx->mdctx;
  610|       |
  611|  1.54k|	return EVP_DigestUpdate(mdctx, input, ilen) == 1;
  612|       |
  613|       |#elif defined(WITH_MBEDTLS)
  614|       |	mbedtls_md_context_t* mdctx = ctx->mdctx;
  615|       |
  616|       |	if (mbedtls_md_update(mdctx, input, ilen) != 0)
  617|       |		return FALSE;
  618|       |
  619|       |#endif
  620|      0|	return TRUE;
  ------------------
  |  |  126|      0|#define TRUE true
  ------------------
  621|  1.54k|}
winpr_Digest_Final:
  624|  1.54k|{
  625|  1.54k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.54k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.54k|	do                                                                                             \
  |  |  |  |   61|  1.54k|	{                                                                                              \
  |  |  |  |   62|  1.54k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.54k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.54k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.54k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.54k|                                                                                                   \
  |  |  |  |   70|  1.54k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.54k|	do                                                      \
  |  |  |  |  |  |   32|  1.54k|	{                                                       \
  |  |  |  |  |  |   33|  1.54k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.54k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.54k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.54k|                                                                                                   \
  |  |  |  |   72|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.54k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.54k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.54k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  626|       |
  627|  1.54k|	switch (ctx->md)
  628|  1.54k|	{
  629|       |#if defined(WITH_INTERNAL_MD4)
  630|       |		case WINPR_MD_MD4:
  631|       |			if (olen < WINPR_MD4_DIGEST_LENGTH)
  632|       |				return FALSE;
  633|       |			winpr_MD4_Final(output, &ctx->md4);
  634|       |			return TRUE;
  635|       |#endif
  636|       |#if defined(WITH_INTERNAL_MD5)
  637|       |		case WINPR_MD_MD5:
  638|       |			if (olen < WINPR_MD5_DIGEST_LENGTH)
  639|       |				return FALSE;
  640|       |			winpr_MD5_Final(output, &ctx->md5);
  641|       |			return TRUE;
  642|       |#endif
  643|       |
  644|  1.54k|		default:
  ------------------
  |  Branch (644:3): [True: 1.54k, False: 0]
  ------------------
  645|  1.54k|			break;
  646|  1.54k|	}
  647|       |
  648|  1.54k|#if defined(WITH_OPENSSL)
  649|  1.54k|	EVP_MD_CTX* mdctx = ctx->mdctx;
  650|       |
  651|  1.54k|	return EVP_DigestFinal_ex(mdctx, output, nullptr) == 1;
  652|       |
  653|       |#elif defined(WITH_MBEDTLS)
  654|       |	mbedtls_md_context_t* mdctx = ctx->mdctx;
  655|       |
  656|       |	if (mbedtls_md_finish(mdctx, output) == 0)
  657|       |		return TRUE;
  658|       |
  659|       |#endif
  660|      0|	return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  661|  1.54k|}
winpr_Digest_Free:
  706|  1.54k|{
  707|  1.54k|	if (!ctx)
  ------------------
  |  Branch (707:6): [True: 0, False: 1.54k]
  ------------------
  708|      0|		return;
  709|  1.54k|#if defined(WITH_OPENSSL)
  710|  1.54k|	if (ctx->mdctx)
  ------------------
  |  Branch (710:6): [True: 1.54k, False: 0]
  ------------------
  711|  1.54k|	{
  712|       |#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
  713|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  714|       |		EVP_MD_CTX_destroy(ctx->mdctx);
  715|       |#else
  716|  1.54k|		EVP_MD_CTX_free(ctx->mdctx);
  717|  1.54k|#endif
  718|  1.54k|	}
  719|       |
  720|       |#elif defined(WITH_MBEDTLS)
  721|       |	if (ctx->mdctx)
  722|       |	{
  723|       |		mbedtls_md_free(ctx->mdctx);
  724|       |		free(ctx->mdctx);
  725|       |	}
  726|       |
  727|       |#endif
  728|  1.54k|	free(ctx);
  729|  1.54k|}
winpr_Digest:
  756|  1.54k|{
  757|  1.54k|	BOOL result = FALSE;
  ------------------
  |  |  122|  1.54k|#define FALSE false
  ------------------
  758|  1.54k|	WINPR_DIGEST_CTX* ctx = winpr_Digest_New();
  759|       |
  760|  1.54k|	if (!ctx)
  ------------------
  |  Branch (760:6): [True: 0, False: 1.54k]
  ------------------
  761|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  762|       |
  763|  1.54k|	if (!winpr_Digest_Init(ctx, md))
  ------------------
  |  Branch (763:6): [True: 0, False: 1.54k]
  ------------------
  764|      0|		goto out;
  765|       |
  766|  1.54k|	if (!winpr_Digest_Update(ctx, input, ilen))
  ------------------
  |  Branch (766:6): [True: 0, False: 1.54k]
  ------------------
  767|      0|		goto out;
  768|       |
  769|  1.54k|	if (!winpr_Digest_Final(ctx, output, olen))
  ------------------
  |  Branch (769:6): [True: 0, False: 1.54k]
  ------------------
  770|      0|		goto out;
  771|       |
  772|  1.54k|	result = TRUE;
  ------------------
  |  |  126|  1.54k|#define TRUE true
  ------------------
  773|  1.54k|out:
  774|  1.54k|	winpr_Digest_Free(ctx);
  775|  1.54k|	return result;
  776|  1.54k|}
hash.c:winpr_Digest_Init_Internal:
  480|  1.54k|{
  481|  1.54k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.54k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.54k|	do                                                                                             \
  |  |  |  |   61|  1.54k|	{                                                                                              \
  |  |  |  |   62|  1.54k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.54k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.54k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.54k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.54k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.54k|                                                                                                   \
  |  |  |  |   70|  1.54k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.54k|	do                                                      \
  |  |  |  |  |  |   32|  1.54k|	{                                                       \
  |  |  |  |  |  |   33|  1.54k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.54k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.54k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.54k|                                                                                                   \
  |  |  |  |   72|  1.54k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.54k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.54k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.54k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  482|  1.54k|	EVP_MD_CTX* mdctx = ctx->mdctx;
  483|       |
  484|  1.54k|	if (!mdctx || !evp)
  ------------------
  |  Branch (484:6): [True: 0, False: 1.54k]
  |  Branch (484:16): [True: 0, False: 1.54k]
  ------------------
  485|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  486|       |
  487|  1.54k|	if (EVP_DigestInit_ex(mdctx, evp, nullptr) != 1)
  ------------------
  |  Branch (487:6): [True: 0, False: 1.54k]
  ------------------
  488|      0|	{
  489|      0|		WLog_ERR(TAG, "Failed to initialize digest %s", winpr_md_type_to_string(ctx->md));
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  490|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  491|      0|	}
  492|       |
  493|  1.54k|	return TRUE;
  ------------------
  |  |  126|  1.54k|#define TRUE true
  ------------------
  494|  1.54k|}

GetEnvironmentVariableA:
  168|      4|{
  169|      4|#if !defined(_UWP)
  170|      4|	size_t length = 0;
  171|       |
  172|       |	// NOLINTNEXTLINE(concurrency-mt-unsafe)
  173|      4|	char* env = getenv(lpName);
  174|       |
  175|      4|	if (!env)
  ------------------
  |  Branch (175:6): [True: 4, False: 0]
  ------------------
  176|      4|	{
  177|      4|		SetLastError(ERROR_ENVVAR_NOT_FOUND);
  ------------------
  |  |  342|      4|#define ERROR_ENVVAR_NOT_FOUND 0x000000CB
  ------------------
  178|      4|		return 0;
  179|      4|	}
  180|       |
  181|      0|	length = strlen(env);
  182|       |
  183|      0|	if ((length + 1 > nSize) || (!lpBuffer))
  ------------------
  |  Branch (183:6): [True: 0, False: 0]
  |  Branch (183:30): [True: 0, False: 0]
  ------------------
  184|      0|		return (DWORD)length + 1;
  185|       |
  186|      0|	CopyMemory(lpBuffer, env, length);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  187|      0|	lpBuffer[length] = '\0';
  188|       |
  189|      0|	return (DWORD)length;
  190|       |#else
  191|       |	SetLastError(ERROR_ENVVAR_NOT_FOUND);
  192|       |	return 0;
  193|       |#endif
  194|      0|}

SetLastError:
   54|      4|{
   55|      4|	PTEB pt = NtCurrentTeb();
   56|      4|	if (pt)
  ------------------
  |  Branch (56:6): [True: 4, False: 0]
  ------------------
   57|      4|	{
   58|      4|		pt->LastErrorValue = dwErrCode;
   59|      4|	}
   60|      4|}

InterlockedIncrement:
  240|   111k|{
  241|   111k|	WINPR_ASSERT(Addend);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  242|       |
  243|   111k|#if defined(__GNUC__) || defined(__clang__)
  244|   111k|	WINPR_PRAGMA_DIAG_PUSH
  245|   111k|	WINPR_PRAGMA_DIAG_IGNORED_ATOMIC_SEQ_CST
  246|   111k|	return __sync_add_and_fetch(Addend, 1);
  247|   111k|	WINPR_PRAGMA_DIAG_POP
  248|       |#else
  249|       |	return 0;
  250|       |#endif
  251|   111k|}
InterlockedDecrement:
  254|   111k|{
  255|   111k|	WINPR_ASSERT(Addend);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|       |
  257|   111k|#if defined(__GNUC__) || defined(__clang__)
  258|   111k|	WINPR_PRAGMA_DIAG_PUSH
  259|   111k|	WINPR_PRAGMA_DIAG_IGNORED_ATOMIC_SEQ_CST
  260|   111k|	return __sync_sub_and_fetch(Addend, 1);
  261|   111k|	WINPR_PRAGMA_DIAG_POP
  262|       |#else
  263|       |	return 0;
  264|       |#endif
  265|   111k|}
InterlockedCompareExchangePointer:
  311|      2|{
  312|      2|	WINPR_ASSERT(Destination);
  ------------------
  |  |   76|      2|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      2|	do                                                                                             \
  |  |  |  |   61|      2|	{                                                                                              \
  |  |  |  |   62|      2|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      2|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      2|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      2|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      2|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      2|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      2|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      2|                                                                                                   \
  |  |  |  |   70|      2|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      2|	do                                                      \
  |  |  |  |  |  |   32|      2|	{                                                       \
  |  |  |  |  |  |   33|      2|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      2|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      2|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      2|                                                                                                   \
  |  |  |  |   72|      2|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      2|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      2|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  313|       |
  314|      2|#if defined(__GNUC__) || defined(__clang__)
  315|      2|	WINPR_PRAGMA_DIAG_PUSH
  316|      2|	WINPR_PRAGMA_DIAG_IGNORED_ATOMIC_SEQ_CST
  317|      2|	return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
  318|      2|	WINPR_PRAGMA_DIAG_POP
  319|       |#else
  320|       |	return 0;
  321|       |#endif
  322|      2|}

NtCurrentTeb:
   50|      4|{
   51|      4|	PTEB teb = nullptr;
   52|       |
   53|      4|	if (pthread_once(&sTebOnceControl, sTebInitOnce) == 0)
  ------------------
  |  Branch (53:6): [True: 4, False: 0]
  ------------------
   54|      4|	{
   55|      4|		if ((teb = pthread_getspecific(sTebKey)) == nullptr)
  ------------------
  |  Branch (55:7): [True: 1, False: 3]
  ------------------
   56|      1|		{
   57|      1|			teb = calloc(1, sizeof(TEB));
   58|      1|			if (teb)
  ------------------
  |  Branch (58:8): [True: 1, False: 0]
  ------------------
   59|      1|				pthread_setspecific(sTebKey, teb);
   60|      1|		}
   61|      4|	}
   62|      4|	return teb;
   63|      4|}
nt.c:sTebInitOnce:
   45|      1|{
   46|      1|	pthread_key_create(&sTebKey, sTebDestruct);
   47|      1|}

InitializeCriticalSectionEx:
   55|  6.30k|{
   56|  6.30k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|  6.30k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.30k|	do                                                                                             \
  |  |  |  |   61|  6.30k|	{                                                                                              \
  |  |  |  |   62|  6.30k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.30k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.30k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.30k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.30k|                                                                                                   \
  |  |  |  |   70|  6.30k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.30k|	do                                                      \
  |  |  |  |  |  |   32|  6.30k|	{                                                       \
  |  |  |  |  |  |   33|  6.30k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.30k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.30k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.30k|                                                                                                   \
  |  |  |  |   72|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.30k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.30k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.30k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|       |	/**
   58|       |	 * See http://msdn.microsoft.com/en-us/library/ff541979(v=vs.85).aspx
   59|       |	 * - The LockCount field indicates the number of times that any thread has
   60|       |	 *   called the EnterCriticalSection routine for this critical section,
   61|       |	 *   minus one. This field starts at -1 for an unlocked critical section.
   62|       |	 *   Each call of EnterCriticalSection increments this value; each call of
   63|       |	 *   LeaveCriticalSection decrements it.
   64|       |	 * - The RecursionCount field indicates the number of times that the owning
   65|       |	 *   thread has called EnterCriticalSection for this critical section.
   66|       |	 */
   67|  6.30k|	if (Flags != 0)
  ------------------
  |  Branch (67:6): [True: 0, False: 6.30k]
  ------------------
   68|      0|	{
   69|      0|		WLog_WARN(TAG, "Flags unimplemented");
  ------------------
  |  |  346|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
   70|      0|	}
   71|       |
   72|  6.30k|	lpCriticalSection->DebugInfo = nullptr;
   73|  6.30k|	lpCriticalSection->LockCount = -1;
   74|  6.30k|	lpCriticalSection->SpinCount = 0;
   75|  6.30k|	lpCriticalSection->RecursionCount = 0;
   76|  6.30k|	lpCriticalSection->OwningThread = nullptr;
   77|  6.30k|	lpCriticalSection->LockSemaphore = (winpr_sem_t*)malloc(sizeof(winpr_sem_t));
   78|       |
   79|  6.30k|	if (!lpCriticalSection->LockSemaphore)
  ------------------
  |  Branch (79:6): [True: 0, False: 6.30k]
  ------------------
   80|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   81|       |
   82|       |#if defined(__APPLE__)
   83|       |
   84|       |	if (semaphore_create(mach_task_self(), lpCriticalSection->LockSemaphore, SYNC_POLICY_FIFO, 0) !=
   85|       |	    KERN_SUCCESS)
   86|       |		goto out_fail;
   87|       |
   88|       |#else
   89|       |
   90|  6.30k|	if (sem_init(lpCriticalSection->LockSemaphore, 0, 0) != 0)
  ------------------
  |  Branch (90:6): [True: 0, False: 6.30k]
  ------------------
   91|      0|		goto out_fail;
   92|       |
   93|  6.30k|#endif
   94|  6.30k|	SetCriticalSectionSpinCount(lpCriticalSection, dwSpinCount);
   95|  6.30k|	return TRUE;
  ------------------
  |  |  126|  6.30k|#define TRUE true
  ------------------
   96|      0|out_fail:
   97|      0|	free(lpCriticalSection->LockSemaphore);
   98|      0|	return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   99|  6.30k|}
InitializeCriticalSectionAndSpinCount:
  102|  6.30k|{
  103|  6.30k|	return InitializeCriticalSectionEx(lpCriticalSection, dwSpinCount, 0);
  104|  6.30k|}
SetCriticalSectionSpinCount:
  108|  6.30k|{
  109|  6.30k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|  6.30k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.30k|	do                                                                                             \
  |  |  |  |   61|  6.30k|	{                                                                                              \
  |  |  |  |   62|  6.30k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.30k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.30k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.30k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.30k|                                                                                                   \
  |  |  |  |   70|  6.30k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.30k|	do                                                      \
  |  |  |  |  |  |   32|  6.30k|	{                                                       \
  |  |  |  |  |  |   33|  6.30k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.30k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.30k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.30k|                                                                                                   \
  |  |  |  |   72|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.30k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.30k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.30k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  110|       |#if !defined(WINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT)
  111|       |	SYSTEM_INFO sysinfo;
  112|       |	DWORD dwPreviousSpinCount = lpCriticalSection->SpinCount;
  113|       |
  114|       |	if (dwSpinCount)
  115|       |	{
  116|       |		/* Don't spin on uniprocessor systems! */
  117|       |		GetNativeSystemInfo(&sysinfo);
  118|       |
  119|       |		if (sysinfo.dwNumberOfProcessors < 2)
  120|       |			dwSpinCount = 0;
  121|       |	}
  122|       |
  123|       |	lpCriticalSection->SpinCount = dwSpinCount;
  124|       |	return dwPreviousSpinCount;
  125|       |#else
  126|       |	// WLog_ERR("TODO", "TODO: implement");
  127|  6.30k|	return 0;
  128|  6.30k|#endif
  129|  6.30k|}
EnterCriticalSection:
  155|   111k|{
  156|   111k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|       |#if !defined(WINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT)
  158|       |	ULONG SpinCount = lpCriticalSection->SpinCount;
  159|       |
  160|       |	/* If we're lucky or if the current thread is already owner we can return early */
  161|       |	if (SpinCount && TryEnterCriticalSection(lpCriticalSection))
  162|       |		return;
  163|       |
  164|       |	/* Spin requested times but don't compete with another waiting thread */
  165|       |	while (SpinCount-- && lpCriticalSection->LockCount < 1)
  166|       |	{
  167|       |		/* Atomically try to acquire and check the if the section is free. */
  168|       |		if (InterlockedCompareExchange(&lpCriticalSection->LockCount, 0, -1) == -1)
  169|       |		{
  170|       |			lpCriticalSection->RecursionCount = 1;
  171|       |			lpCriticalSection->OwningThread = (HANDLE)(ULONG_PTR)GetCurrentThreadId();
  172|       |			return;
  173|       |		}
  174|       |
  175|       |		/* Failed to get the lock. Let the scheduler know that we're spinning. */
  176|       |		if (sched_yield() != 0)
  177|       |		{
  178|       |			/**
  179|       |			 * On some operating systems sched_yield is a stub.
  180|       |			 * usleep should at least trigger a context switch if any thread is waiting.
  181|       |			 * A ThreadYield() would be nice in winpr ...
  182|       |			 */
  183|       |			usleep(1);
  184|       |		}
  185|       |	}
  186|       |
  187|       |#endif
  188|       |
  189|       |	/* First try the fastest possible path to get the lock. */
  190|   111k|	if (InterlockedIncrement(&lpCriticalSection->LockCount))
  ------------------
  |  Branch (190:6): [True: 0, False: 111k]
  ------------------
  191|      0|	{
  192|       |		/* Section is already locked. Check if it is owned by the current thread. */
  193|      0|		if (lpCriticalSection->OwningThread == (HANDLE)(ULONG_PTR)GetCurrentThreadId())
  ------------------
  |  Branch (193:7): [True: 0, False: 0]
  ------------------
  194|      0|		{
  195|       |			/* Recursion. No need to wait. */
  196|      0|			lpCriticalSection->RecursionCount++;
  197|      0|			return;
  198|      0|		}
  199|       |
  200|       |		/* Section is locked by another thread. We have to wait. */
  201|      0|		WaitForCriticalSection(lpCriticalSection);
  202|      0|	}
  203|       |
  204|       |	/* We got the lock. Own it ... */
  205|   111k|	lpCriticalSection->RecursionCount = 1;
  206|   111k|	lpCriticalSection->OwningThread = (HANDLE)(ULONG_PTR)GetCurrentThreadId();
  207|   111k|}
LeaveCriticalSection:
  236|   111k|{
  237|   111k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|       |
  239|       |	/* Decrement RecursionCount and check if this is the last LeaveCriticalSection call ...*/
  240|   111k|	if (--lpCriticalSection->RecursionCount < 1)
  ------------------
  |  Branch (240:6): [True: 111k, False: 0]
  ------------------
  241|   111k|	{
  242|       |		/* Last recursion, clear owner, unlock and if there are other waiting threads ... */
  243|   111k|		lpCriticalSection->OwningThread = nullptr;
  244|       |
  245|   111k|		if (InterlockedDecrement(&lpCriticalSection->LockCount) >= 0)
  ------------------
  |  Branch (245:7): [True: 0, False: 111k]
  ------------------
  246|      0|		{
  247|       |			/* ...signal the semaphore to unblock the next waiting thread */
  248|      0|			UnWaitCriticalSection(lpCriticalSection);
  249|      0|		}
  250|   111k|	}
  251|      0|	else
  252|      0|	{
  253|      0|		(void)InterlockedDecrement(&lpCriticalSection->LockCount);
  254|      0|	}
  255|   111k|}
DeleteCriticalSection:
  258|  6.30k|{
  259|  6.30k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|  6.30k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.30k|	do                                                                                             \
  |  |  |  |   61|  6.30k|	{                                                                                              \
  |  |  |  |   62|  6.30k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.30k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.30k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.30k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.30k|                                                                                                   \
  |  |  |  |   70|  6.30k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.30k|	do                                                      \
  |  |  |  |  |  |   32|  6.30k|	{                                                       \
  |  |  |  |  |  |   33|  6.30k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.30k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.30k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.30k|                                                                                                   \
  |  |  |  |   72|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.30k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.30k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.30k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|       |
  261|  6.30k|	lpCriticalSection->LockCount = -1;
  262|  6.30k|	lpCriticalSection->SpinCount = 0;
  263|  6.30k|	lpCriticalSection->RecursionCount = 0;
  264|  6.30k|	lpCriticalSection->OwningThread = nullptr;
  265|       |
  266|  6.30k|	if (lpCriticalSection->LockSemaphore != nullptr)
  ------------------
  |  Branch (266:6): [True: 6.30k, False: 0]
  ------------------
  267|  6.30k|	{
  268|       |#if defined __APPLE__
  269|       |		semaphore_destroy(mach_task_self(), *((winpr_sem_t*)lpCriticalSection->LockSemaphore));
  270|       |#else
  271|  6.30k|		sem_destroy((winpr_sem_t*)lpCriticalSection->LockSemaphore);
  272|  6.30k|#endif
  273|  6.30k|		free(lpCriticalSection->LockSemaphore);
  274|  6.30k|		lpCriticalSection->LockSemaphore = nullptr;
  275|  6.30k|	}
  276|  6.30k|}

winpr_InitOnceExecuteOnce:
   55|  2.10k|{
   56|  2.10k|	for (;;)
   57|  2.10k|	{
   58|  2.10k|		switch ((ULONG_PTR)InitOnce->Ptr & 3)
   59|  2.10k|		{
   60|  2.09k|			case 2:
  ------------------
  |  Branch (60:4): [True: 2.09k, False: 2]
  ------------------
   61|       |				/* already completed successfully */
   62|  2.09k|				return TRUE;
  ------------------
  |  |  126|  2.09k|#define TRUE true
  ------------------
   63|       |
   64|      2|			case 0:
  ------------------
  |  Branch (64:4): [True: 2, False: 2.09k]
  ------------------
   65|       |
   66|       |				/* first time */
   67|      2|				if (InterlockedCompareExchangePointer(&InitOnce->Ptr, (PVOID)1, (PVOID)0) !=
  ------------------
  |  Branch (67:9): [True: 0, False: 2]
  ------------------
   68|      2|				    (PVOID)0)
   69|      0|				{
   70|       |					/* some other thread was faster */
   71|      0|					break;
   72|      0|				}
   73|       |
   74|       |				/* it's our job to call the init function */
   75|      2|				if (InitFn(InitOnce, Parameter, Context))
  ------------------
  |  Branch (75:9): [True: 2, False: 0]
  ------------------
   76|      2|				{
   77|       |					/* success */
   78|      2|					InitOnce->Ptr = (PVOID)2;
   79|      2|					return TRUE;
  ------------------
  |  |  126|      2|#define TRUE true
  ------------------
   80|      2|				}
   81|       |
   82|       |				/* the init function returned an error,  reset the status */
   83|      0|				InitOnce->Ptr = (PVOID)0;
   84|      0|				return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   85|       |
   86|      0|			case 1:
  ------------------
  |  Branch (86:4): [True: 0, False: 2.10k]
  ------------------
   87|       |				/* in progress */
   88|      0|				break;
   89|       |
   90|      0|			default:
  ------------------
  |  Branch (90:4): [True: 0, False: 2.10k]
  ------------------
   91|      0|				WLog_ERR(TAG, "internal error");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
   92|      0|				return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   93|  2.10k|		}
   94|       |
   95|      0|		Sleep(5);
   96|      0|	}
   97|  2.10k|}

GetLocalTime:
  278|   111k|{
  279|   111k|	time_t ct = 0;
  280|   111k|	struct tm tres;
  281|   111k|	struct tm* ltm = nullptr;
  282|   111k|	WORD wMilliseconds = 0;
  283|   111k|	UINT64 now = winpr_GetUnixTimeNS();
  284|   111k|	ct = WINPR_TIME_NS_TO_S(now);
  ------------------
  |  |  357|   111k|#define WINPR_TIME_NS_TO_S(ns) ((ns) / 1000000000ull) /** @since version 3.4.0 */
  ------------------
  285|   111k|	wMilliseconds = (WORD)(WINPR_TIME_NS_REM_MS(now));
  ------------------
  |  |  363|   111k|#define WINPR_TIME_NS_REM_MS(ns) (WINPR_TIME_NS_REM_US(ns) / 1000ull) /** @since version 3.4.0 */
  |  |  ------------------
  |  |  |  |  362|   111k|#define WINPR_TIME_NS_REM_US(ns) (WINPR_TIME_NS_REM_NS(ns) / 1000ull) /** @since version 3.4.0 */
  |  |  |  |  ------------------
  |  |  |  |  |  |  361|   111k|#define WINPR_TIME_NS_REM_NS(ns) ((ns) % 1000000000ull)               /** @since version 3.4.0 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|   111k|	ltm = localtime_r(&ct, &tres);
  287|   111k|	ZeroMemory(lpSystemTime, sizeof(SYSTEMTIME));
  ------------------
  |  |  126|   111k|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  288|       |
  289|   111k|	if (ltm)
  ------------------
  |  Branch (289:6): [True: 111k, False: 0]
  ------------------
  290|   111k|	{
  291|   111k|		lpSystemTime->wYear = (WORD)(ltm->tm_year + 1900);
  292|   111k|		lpSystemTime->wMonth = (WORD)(ltm->tm_mon + 1);
  293|   111k|		lpSystemTime->wDayOfWeek = (WORD)ltm->tm_wday;
  294|   111k|		lpSystemTime->wDay = (WORD)ltm->tm_mday;
  295|   111k|		lpSystemTime->wHour = (WORD)ltm->tm_hour;
  296|   111k|		lpSystemTime->wMinute = (WORD)ltm->tm_min;
  297|   111k|		lpSystemTime->wSecond = (WORD)ltm->tm_sec;
  298|   111k|		lpSystemTime->wMilliseconds = wMilliseconds;
  299|   111k|	}
  300|   111k|}
winpr_GetUnixTimeNS:
  630|   111k|{
  631|       |#if defined(_WIN32)
  632|       |
  633|       |	union
  634|       |	{
  635|       |		UINT64 u64;
  636|       |		FILETIME ft;
  637|       |	} t = WINPR_C_ARRAY_INIT;
  638|       |	GetSystemTimeAsFileTime(&t.ft);
  639|       |	return (t.u64 - FILETIME_TO_UNIX_OFFSET_S * 10000000ull) * 100ull;
  640|       |#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199309L)
  641|   111k|	struct timespec ts = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  642|   111k|	if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
  ------------------
  |  Branch (642:6): [True: 0, False: 111k]
  ------------------
  643|      0|		return 0;
  644|   111k|	return WINPR_ASSERTING_INT_CAST(uint64_t, ts.tv_sec) * 1000000000ull +
  ------------------
  |  |  112|   111k|	__extension__({                                                                             \
  |  |  113|   111k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   111k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   111k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   111k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   334k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 111k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 111k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   111k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   111k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   111k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   111k|	})
  ------------------
  645|   111k|	       WINPR_ASSERTING_INT_CAST(uint64_t, ts.tv_nsec);
  ------------------
  |  |  112|   111k|	__extension__({                                                                             \
  |  |  113|   111k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   111k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   111k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   111k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   334k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 111k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 111k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   111k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   111k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   111k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   111k|	})
  ------------------
  646|       |#else
  647|       |	struct timeval tv = WINPR_C_ARRAY_INIT;
  648|       |	if (gettimeofday(&tv, nullptr) != 0)
  649|       |		return 0;
  650|       |	return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000ull;
  651|       |#endif
  652|   111k|}

GetCurrentProcessId:
  583|   111k|{
  584|   111k|	return ((DWORD)getpid());
  585|   111k|}

GetCurrentThreadId:
  907|   111k|{
  908|       |#if defined(__FreeBSD__)
  909|       |	return WINPR_CXX_COMPAT_CAST(DWORD, pthread_getthreadid_np());
  910|       |#elif defined(__linux__)
  911|   111k|	return WINPR_CXX_COMPAT_CAST(DWORD, syscall(SYS_gettid));
  ------------------
  |  |   33|   111k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  ------------------
  912|       |#else
  913|       |	pthread_t tid = pthread_self();
  914|       |	/* Since pthread_t can be 64-bits on some systems, take just the    */
  915|       |	/* lower 32-bits of it for the thread ID returned by this function. */
  916|       |	uintptr_t ptid = WINPR_REINTERPRET_CAST(tid, pthread_t, uintptr_t);
  917|       |	return (ptid & UINT32_MAX) ^ (ptid >> 32);
  918|       |#endif
  919|   111k|}

winpr_atexit:
   33|      2|{
   34|      2|	atexit_count++;
   35|      2|	const int rc = atexit(fkt);
   36|      2|	if (rc != 0)
  ------------------
  |  Branch (36:6): [True: 0, False: 2]
  ------------------
   37|      0|	{
   38|      0|		char buffer[128] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|      0|	{                      \
  |  |   85|      0|	} /** @since version 3.24.0 */
  ------------------
   39|      0|		WLog_ERR(TAG, "atexit[%" PRIuz "] failed: %s [%d]", atexit_count,
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
   40|      0|		         winpr_strerror(errno, buffer, sizeof(buffer)), errno);
   41|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   42|      0|	}
   43|      2|	return TRUE;
  ------------------
  |  |  126|      2|#define TRUE true
  ------------------
   44|      2|}

ArrayList_SetItem:
  171|  1.11M|{
  172|  1.11M|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  1.11M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11M|	do                                                                                             \
  |  |  |  |   61|  1.11M|	{                                                                                              \
  |  |  |  |   62|  1.11M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11M|                                                                                                   \
  |  |  |  |   70|  1.11M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11M|	do                                                      \
  |  |  |  |  |  |   32|  1.11M|	{                                                       \
  |  |  |  |  |  |   33|  1.11M|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11M|                                                                                                   \
  |  |  |  |   72|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11M|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  173|  1.11M|	if (index >= arrayList->size)
  ------------------
  |  Branch (173:6): [True: 0, False: 1.11M]
  ------------------
  174|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  175|       |
  176|  1.11M|	if (arrayList->object.fnObjectNew)
  ------------------
  |  Branch (176:6): [True: 0, False: 1.11M]
  ------------------
  177|      0|	{
  178|      0|		arrayList->array[index] = arrayList->object.fnObjectNew(obj);
  179|      0|		if (obj && !arrayList->array[index])
  ------------------
  |  Branch (179:7): [True: 0, False: 0]
  |  Branch (179:14): [True: 0, False: 0]
  ------------------
  180|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  181|      0|	}
  182|  1.11M|	else
  183|  1.11M|	{
  184|  1.11M|		union
  185|  1.11M|		{
  186|  1.11M|			const void* cpv;
  187|  1.11M|			void* pv;
  188|  1.11M|		} cnv;
  189|  1.11M|		cnv.cpv = obj;
  190|  1.11M|		arrayList->array[index] = cnv.pv;
  191|  1.11M|	}
  192|  1.11M|	return TRUE;
  ------------------
  |  |  126|  1.11M|#define TRUE true
  ------------------
  193|  1.11M|}
ArrayList_Clear:
  259|  6.30k|{
  260|  6.30k|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  6.30k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.30k|	do                                                                                             \
  |  |  |  |   61|  6.30k|	{                                                                                              \
  |  |  |  |   62|  6.30k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.30k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.30k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.30k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.30k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.30k|                                                                                                   \
  |  |  |  |   70|  6.30k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.30k|	do                                                      \
  |  |  |  |  |  |   32|  6.30k|	{                                                       \
  |  |  |  |  |  |   33|  6.30k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.30k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.30k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.30k|                                                                                                   \
  |  |  |  |   72|  6.30k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.30k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.30k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.30k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|  6.30k|	ArrayList_Lock_Conditional(arrayList);
  262|       |
  263|  1.11M|	for (size_t index = 0; index < arrayList->size; index++)
  ------------------
  |  Branch (263:25): [True: 1.11M, False: 6.30k]
  ------------------
  264|  1.11M|	{
  265|  1.11M|		if (arrayList->object.fnObjectFree)
  ------------------
  |  Branch (265:7): [True: 555k, False: 555k]
  ------------------
  266|   555k|			arrayList->object.fnObjectFree(arrayList->array[index]);
  267|       |
  268|  1.11M|		arrayList->array[index] = nullptr;
  269|  1.11M|	}
  270|       |
  271|  6.30k|	arrayList->size = 0;
  272|       |
  273|  6.30k|	ArrayList_Unlock_Conditional(arrayList);
  274|  6.30k|}
ArrayList_Append:
  315|  1.11M|{
  316|  1.11M|	size_t index = 0;
  317|  1.11M|	BOOL rc = FALSE;
  ------------------
  |  |  122|  1.11M|#define FALSE false
  ------------------
  318|       |
  319|  1.11M|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  1.11M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11M|	do                                                                                             \
  |  |  |  |   61|  1.11M|	{                                                                                              \
  |  |  |  |   62|  1.11M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11M|                                                                                                   \
  |  |  |  |   70|  1.11M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11M|	do                                                      \
  |  |  |  |  |  |   32|  1.11M|	{                                                       \
  |  |  |  |  |  |   33|  1.11M|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11M|                                                                                                   \
  |  |  |  |   72|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11M|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  320|  1.11M|	ArrayList_Lock_Conditional(arrayList);
  321|       |
  322|  1.11M|	if (!ArrayList_EnsureCapacity(arrayList, 1))
  ------------------
  |  Branch (322:6): [True: 0, False: 1.11M]
  ------------------
  323|      0|		goto out;
  324|       |
  325|  1.11M|	index = arrayList->size++;
  326|  1.11M|	rc = ArrayList_SetItem(arrayList, index, obj);
  327|  1.11M|out:
  328|       |
  329|  1.11M|	ArrayList_Unlock_Conditional(arrayList);
  330|       |
  331|  1.11M|	return rc;
  332|  1.11M|}
ArrayList_Object:
  530|  10.5k|{
  531|  10.5k|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  10.5k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  10.5k|	do                                                                                             \
  |  |  |  |   61|  10.5k|	{                                                                                              \
  |  |  |  |   62|  10.5k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  10.5k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  10.5k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  10.5k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  10.5k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  10.5k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  10.5k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  10.5k|                                                                                                   \
  |  |  |  |   70|  10.5k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  10.5k|	do                                                      \
  |  |  |  |  |  |   32|  10.5k|	{                                                       \
  |  |  |  |  |  |   33|  10.5k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 10.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  10.5k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  10.5k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 10.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  10.5k|                                                                                                   \
  |  |  |  |   72|  10.5k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  10.5k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  10.5k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  10.5k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  532|  10.5k|	return &arrayList->object;
  533|  10.5k|}
ArrayList_New:
  577|  6.30k|{
  578|  6.30k|	wObject* obj = nullptr;
  579|  6.30k|	wArrayList* arrayList = nullptr;
  580|  6.30k|	arrayList = (wArrayList*)calloc(1, sizeof(wArrayList));
  581|       |
  582|  6.30k|	if (!arrayList)
  ------------------
  |  Branch (582:6): [True: 0, False: 6.30k]
  ------------------
  583|      0|		return nullptr;
  584|       |
  585|  6.30k|	arrayList->synchronized = synchronized;
  586|  6.30k|	arrayList->growthFactor = 2;
  587|  6.30k|	obj = ArrayList_Object(arrayList);
  588|  6.30k|	if (!obj)
  ------------------
  |  Branch (588:6): [True: 0, False: 6.30k]
  ------------------
  589|      0|		goto fail;
  590|  6.30k|	obj->fnObjectEquals = ArrayList_DefaultCompare;
  591|  6.30k|	if (!ArrayList_EnsureCapacity(arrayList, 32))
  ------------------
  |  Branch (591:6): [True: 0, False: 6.30k]
  ------------------
  592|      0|		goto fail;
  593|       |
  594|  6.30k|	if (!InitializeCriticalSectionAndSpinCount(&arrayList->lock, 4000))
  ------------------
  |  Branch (594:6): [True: 0, False: 6.30k]
  ------------------
  595|      0|		goto fail;
  596|  6.30k|	return arrayList;
  597|      0|fail:
  598|      0|	WINPR_PRAGMA_DIAG_PUSH
  599|      0|	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
  600|      0|	ArrayList_Free(arrayList);
  601|      0|	WINPR_PRAGMA_DIAG_POP
  602|      0|	return nullptr;
  603|  6.30k|}
ArrayList_Free:
  606|  6.30k|{
  607|  6.30k|	if (!arrayList)
  ------------------
  |  Branch (607:6): [True: 0, False: 6.30k]
  ------------------
  608|      0|		return;
  609|       |
  610|  6.30k|	ArrayList_Clear(arrayList);
  611|  6.30k|	DeleteCriticalSection(&arrayList->lock);
  612|  6.30k|	free((void*)arrayList->array);
  613|  6.30k|	free(arrayList);
  614|  6.30k|}
ArrayList.c:ArrayList_Lock_Conditional:
  120|  1.11M|{
  121|  1.11M|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  1.11M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11M|	do                                                                                             \
  |  |  |  |   61|  1.11M|	{                                                                                              \
  |  |  |  |   62|  1.11M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11M|                                                                                                   \
  |  |  |  |   70|  1.11M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11M|	do                                                      \
  |  |  |  |  |  |   32|  1.11M|	{                                                       \
  |  |  |  |  |  |   33|  1.11M|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11M|                                                                                                   \
  |  |  |  |   72|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11M|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  122|  1.11M|	if (arrayList->synchronized)
  ------------------
  |  Branch (122:6): [True: 0, False: 1.11M]
  ------------------
  123|      0|		EnterCriticalSection(&arrayList->lock);
  124|  1.11M|}
ArrayList.c:ArrayList_Unlock_Conditional:
  137|  1.11M|{
  138|  1.11M|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  1.11M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11M|	do                                                                                             \
  |  |  |  |   61|  1.11M|	{                                                                                              \
  |  |  |  |   62|  1.11M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11M|                                                                                                   \
  |  |  |  |   70|  1.11M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11M|	do                                                      \
  |  |  |  |  |  |   32|  1.11M|	{                                                       \
  |  |  |  |  |  |   33|  1.11M|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11M|                                                                                                   \
  |  |  |  |   72|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11M|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|  1.11M|	if (arrayList->synchronized)
  ------------------
  |  Branch (139:6): [True: 0, False: 1.11M]
  ------------------
  140|      0|		LeaveCriticalSection(&arrayList->lock);
  141|  1.11M|}
ArrayList.c:ArrayList_EnsureCapacity:
  199|  1.11M|{
  200|  1.11M|	WINPR_ASSERT(arrayList);
  ------------------
  |  |   76|  1.11M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11M|	do                                                                                             \
  |  |  |  |   61|  1.11M|	{                                                                                              \
  |  |  |  |   62|  1.11M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11M|                                                                                                   \
  |  |  |  |   70|  1.11M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11M|	do                                                      \
  |  |  |  |  |  |   32|  1.11M|	{                                                       \
  |  |  |  |  |  |   33|  1.11M|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11M|                                                                                                   \
  |  |  |  |   72|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11M|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|  1.11M|	WINPR_ASSERT(count > 0);
  ------------------
  |  |   76|  1.11M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11M|	do                                                                                             \
  |  |  |  |   61|  1.11M|	{                                                                                              \
  |  |  |  |   62|  1.11M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11M|                                                                                                   \
  |  |  |  |   70|  1.11M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11M|	do                                                      \
  |  |  |  |  |  |   32|  1.11M|	{                                                       \
  |  |  |  |  |  |   33|  1.11M|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11M|                                                                                                   \
  |  |  |  |   72|  1.11M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11M|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  202|       |
  203|  1.11M|	if (arrayList->size + count > arrayList->capacity)
  ------------------
  |  Branch (203:6): [True: 6.79k, False: 1.10M]
  ------------------
  204|  6.79k|	{
  205|  6.79k|		void** newArray = nullptr;
  206|  6.79k|		size_t newCapacity = arrayList->capacity * arrayList->growthFactor;
  207|  6.79k|		if (newCapacity < arrayList->size + count)
  ------------------
  |  Branch (207:7): [True: 6.30k, False: 496]
  ------------------
  208|  6.30k|			newCapacity = arrayList->size + count;
  209|       |
  210|  6.79k|		newArray = (void**)realloc((void*)arrayList->array, sizeof(void*) * newCapacity);
  211|       |
  212|  6.79k|		if (!newArray)
  ------------------
  |  Branch (212:7): [True: 0, False: 6.79k]
  ------------------
  213|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  214|       |
  215|  6.79k|		arrayList->array = newArray;
  216|  6.79k|		arrayList->capacity = newCapacity;
  217|  6.79k|	}
  218|       |
  219|  1.11M|	return TRUE;
  ------------------
  |  |  126|  1.11M|#define TRUE true
  ------------------
  220|  1.11M|}

winpr_HexStringToBinBuffer:
  188|    434|{
  189|    434|	size_t y = 0;
  190|    434|	size_t maxStrLen = 0;
  191|    434|	if (!str || !data || (strLength == 0) || (dataLength == 0))
  ------------------
  |  Branch (191:6): [True: 0, False: 434]
  |  Branch (191:14): [True: 0, False: 434]
  |  Branch (191:23): [True: 1, False: 433]
  |  Branch (191:43): [True: 0, False: 433]
  ------------------
  192|      1|		return 0;
  193|       |
  194|    433|	maxStrLen = strnlen(str, strLength);
  195|  5.55M|	for (size_t x = 0; x < maxStrLen;)
  ------------------
  |  Branch (195:21): [True: 5.55M, False: 431]
  ------------------
  196|  5.55M|	{
  197|  5.55M|		BYTE val = value(str[x++]);
  198|  5.55M|		if (x < maxStrLen)
  ------------------
  |  Branch (198:7): [True: 5.55M, False: 324]
  ------------------
  199|  5.55M|			val = (BYTE)(val << 4) | (value(str[x++]));
  200|  5.55M|		if (x < maxStrLen)
  ------------------
  |  Branch (200:7): [True: 5.55M, False: 433]
  ------------------
  201|  5.55M|		{
  202|  5.55M|			if (str[x] == ' ')
  ------------------
  |  Branch (202:8): [True: 6.70k, False: 5.54M]
  ------------------
  203|  6.70k|				x++;
  204|  5.55M|		}
  205|  5.55M|		data[y++] = val;
  206|  5.55M|		if (y >= dataLength)
  ------------------
  |  Branch (206:7): [True: 2, False: 5.55M]
  ------------------
  207|      2|			return y;
  208|  5.55M|	}
  209|    431|	return y;
  210|    433|}
print.c:value:
  177|  11.1M|{
  178|  11.1M|	if ((c >= '0') && (c <= '9'))
  ------------------
  |  Branch (178:6): [True: 9.89M, False: 1.21M]
  |  Branch (178:20): [True: 3.64M, False: 6.24M]
  ------------------
  179|  3.64M|		return (c - '0') & 0xFF;
  180|  7.46M|	if ((c >= 'A') && (c <= 'F'))
  ------------------
  |  Branch (180:6): [True: 572k, False: 6.89M]
  |  Branch (180:20): [True: 104k, False: 468k]
  ------------------
  181|   104k|		return (10 + c - 'A') & 0xFF;
  182|  7.35M|	if ((c >= 'a') && (c <= 'f'))
  ------------------
  |  Branch (182:6): [True: 246k, False: 7.11M]
  |  Branch (182:20): [True: 186k, False: 60.6k]
  ------------------
  183|   186k|		return (10 + c - 'a') & 0xFF;
  184|  7.17M|	return 0;
  185|  7.35M|}

winpr_InitializeSSL:
  350|  2.10k|{
  351|  2.10k|	static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
  ------------------
  |  |  402|  2.10k|#define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
  |  |  ------------------
  |  |  |  |  377|  2.10k|	{                     \
  |  |  |  |  378|  2.10k|		0                 \
  |  |  |  |  379|  2.10k|	}
  |  |  ------------------
  ------------------
  352|       |
  353|  2.10k|	if (!InitOnceExecuteOnce(&once, winpr_openssl_initialize, &flags, nullptr))
  ------------------
  |  |  424|  2.10k|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
  |  Branch (353:6): [True: 0, False: 2.10k]
  ------------------
  354|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  355|       |
  356|  2.10k|	return winpr_enable_fips(flags);
  357|  2.10k|}
winpr_CleanupSSL:
  378|      1|{
  379|      1|	if (flags & WINPR_SSL_CLEANUP_GLOBAL)
  ------------------
  |  |   32|      1|#define WINPR_SSL_CLEANUP_GLOBAL 0x01
  ------------------
  |  Branch (379:6): [True: 0, False: 1]
  ------------------
  380|      0|	{
  381|      0|		if (!g_winpr_openssl_initialized_by_winpr)
  ------------------
  |  Branch (381:7): [True: 0, False: 0]
  ------------------
  382|      0|		{
  383|      0|			WLog_WARN(TAG, "ssl was not initialized by winpr");
  ------------------
  |  |  346|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  384|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  385|      0|		}
  386|       |
  387|      0|		g_winpr_openssl_initialized_by_winpr = FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  388|       |#ifdef WINPR_OPENSSL_LOCKING_REQUIRED
  389|       |		_winpr_openssl_cleanup_locking();
  390|       |#endif
  391|       |#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
  392|       |		CRYPTO_cleanup_all_ex_data();
  393|       |		ERR_free_strings();
  394|       |		EVP_cleanup();
  395|       |#endif
  396|       |#ifdef WINPR_OPENSSL_LOCKING_REQUIRED
  397|       |		flags |= WINPR_SSL_CLEANUP_THREAD;
  398|       |#endif
  399|      0|	}
  400|       |
  401|       |#ifdef WINPR_OPENSSL_LOCKING_REQUIRED
  402|       |
  403|       |	if (flags & WINPR_SSL_CLEANUP_THREAD)
  404|       |	{
  405|       |#if (OPENSSL_VERSION_NUMBER < 0x10000000L) || defined(LIBRESSL_VERSION_NUMBER)
  406|       |		ERR_remove_state(0);
  407|       |#else
  408|       |		ERR_remove_thread_state(nullptr);
  409|       |#endif
  410|       |	}
  411|       |
  412|       |#endif
  413|       |#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
  414|       |	OSSL_LIB_CTX* ctx = OSSL_LIB_CTX_get0_global_default();
  415|       |	if (ctx)
  416|       |		OSSL_PROVIDER_do_all(ctx, unload, nullptr);
  417|       |#endif
  418|       |
  419|      1|	return TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  420|      1|}
ssl.c:winpr_openssl_initialize:
  292|      1|{
  293|      1|	DWORD flags = param ? *(PDWORD)param : WINPR_SSL_INIT_DEFAULT;
  ------------------
  |  |   27|      0|#define WINPR_SSL_INIT_DEFAULT 0x00
  ------------------
  |  Branch (293:16): [True: 1, False: 0]
  ------------------
  294|       |
  295|      1|	if (flags & WINPR_SSL_INIT_ALREADY_INITIALIZED)
  ------------------
  |  |   28|      1|#define WINPR_SSL_INIT_ALREADY_INITIALIZED 0x01
  ------------------
  |  Branch (295:6): [True: 0, False: 1]
  ------------------
  296|      0|	{
  297|      0|		return TRUE;
  ------------------
  |  |  126|      0|#define TRUE true
  ------------------
  298|      0|	}
  299|       |
  300|       |#ifdef WINPR_OPENSSL_LOCKING_REQUIRED
  301|       |
  302|       |	if (flags & WINPR_SSL_INIT_ENABLE_LOCKING)
  303|       |	{
  304|       |		if (!_winpr_openssl_initialize_locking())
  305|       |		{
  306|       |			return FALSE;
  307|       |		}
  308|       |	}
  309|       |
  310|       |#endif
  311|       |	/* SSL_load_error_strings() is void */
  312|       |#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
  313|       |	SSL_load_error_strings();
  314|       |	/* SSL_library_init() always returns "1" */
  315|       |	SSL_library_init();
  316|       |	OpenSSL_add_all_digests();
  317|       |	OpenSSL_add_all_ciphers();
  318|       |#else
  319|       |
  320|      1|	if (OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS |
  ------------------
  |  Branch (320:6): [True: 0, False: 1]
  ------------------
  321|      1|	                         OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS |
  322|      1|	                         OPENSSL_INIT_ENGINE_ALL_BUILTIN,
  323|      1|	                     nullptr) != 1)
  324|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  325|       |
  326|      1|#endif
  327|       |
  328|       |#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
  329|       |	/* The legacy provider is needed for MD4. */
  330|       |	s_winpr_openssl_provider_legacy = OSSL_PROVIDER_load(nullptr, "legacy");
  331|       |	if (s_winpr_openssl_provider_legacy == nullptr)
  332|       |	{
  333|       |		WLog_WARN(TAG, "OpenSSL LEGACY provider failed to load, no md4 support available!");
  334|       |	}
  335|       |	s_winpr_openssl_provider_default = OSSL_PROVIDER_load(nullptr, "default");
  336|       |	if (s_winpr_openssl_provider_default == nullptr)
  337|       |	{
  338|       |		WLog_WARN(TAG, "OpenSSL DEFAULT provider failed to load");
  339|       |	}
  340|       |#endif
  341|       |
  342|      1|	(void)winpr_atexit(winpr_openssl_cleanup);
  343|      1|	g_winpr_openssl_initialized_by_winpr = TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  344|      1|	return TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  345|      1|}
ssl.c:winpr_openssl_cleanup:
  286|      1|{
  287|      1|	winpr_CleanupSSL(WINPR_SSL_INIT_DEFAULT);
  ------------------
  |  |   27|      1|#define WINPR_SSL_INIT_DEFAULT 0x00
  ------------------
  288|      1|}
ssl.c:winpr_enable_fips:
  246|  2.10k|{
  247|  2.10k|	if (flags & WINPR_SSL_INIT_ENABLE_FIPS)
  ------------------
  |  |   30|  2.10k|#define WINPR_SSL_INIT_ENABLE_FIPS 0x4
  ------------------
  |  Branch (247:6): [True: 0, False: 2.10k]
  ------------------
  248|      0|	{
  249|       |#if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER)
  250|       |		WLog_ERR(TAG, "Openssl fips mode not available on openssl versions less than 1.0.1!");
  251|       |		return FALSE;
  252|       |#else
  253|      0|		WLog_DBG(TAG, "Ensuring openssl fips mode is enabled");
  ------------------
  |  |  342|      0|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  254|       |
  255|       |#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
  256|       |		s_winpr_openssl_provider_fips = OSSL_PROVIDER_load(nullptr, "fips");
  257|       |		if (s_winpr_openssl_provider_fips == nullptr)
  258|       |		{
  259|       |			WLog_WARN(TAG, "OpenSSL FIPS provider failed to load");
  260|       |		}
  261|       |		if (!EVP_default_properties_is_fips_enabled(nullptr))
  262|       |#else
  263|      0|		if (FIPS_mode() != 1)
  ------------------
  |  Branch (263:7): [True: 0, False: 0]
  ------------------
  264|      0|#endif
  265|      0|		{
  266|       |#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
  267|       |			if (EVP_set_default_properties(nullptr, "fips=yes"))
  268|       |#else
  269|      0|			if (FIPS_mode_set(1))
  ------------------
  |  Branch (269:8): [True: 0, False: 0]
  ------------------
  270|      0|#endif
  271|      0|				WLog_INFO(TAG, "Openssl fips mode enabled!");
  ------------------
  |  |  344|      0|	WLog_Print_dbg_tag(tag, WLOG_INFO, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  272|      0|			else
  273|      0|			{
  274|      0|				WLog_ERR(TAG, "Openssl fips mode enable failed!");
  ------------------
  |  |  348|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  ------------------
  275|      0|				return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  276|      0|			}
  277|      0|		}
  278|       |
  279|      0|#endif
  280|      0|	}
  281|       |
  282|  2.10k|	return TRUE;
  ------------------
  |  |  126|  2.10k|#define TRUE true
  ------------------
  283|  2.10k|}

WLog_Appender_Free:
   25|      1|{
   26|      1|	if (!appender)
  ------------------
  |  Branch (26:6): [True: 0, False: 1]
  ------------------
   27|      0|		return;
   28|       |
   29|      1|	if (appender->Layout)
  ------------------
  |  Branch (29:6): [True: 1, False: 0]
  ------------------
   30|      1|	{
   31|      1|		WLog_Layout_Free(log, appender->Layout);
   32|      1|		appender->Layout = nullptr;
   33|      1|	}
   34|       |
   35|      1|	DeleteCriticalSection(&appender->lock);
   36|      1|	appender->Free(appender);
   37|      1|}
WLog_GetLogAppender:
   40|   223k|{
   41|   223k|	if (!log)
  ------------------
  |  Branch (41:6): [True: 0, False: 223k]
  ------------------
   42|      0|		return nullptr;
   43|       |
   44|   223k|	if (!log->Appender)
  ------------------
  |  Branch (44:6): [True: 111k, False: 111k]
  ------------------
   45|   111k|		return WLog_GetLogAppender(log->Parent);
   46|       |
   47|   111k|	return log->Appender;
   48|   223k|}
WLog_OpenAppender:
   51|      1|{
   52|      1|	int status = 0;
   53|      1|	wLogAppender* appender = nullptr;
   54|       |
   55|      1|	appender = WLog_GetLogAppender(log);
   56|       |
   57|      1|	if (!appender)
  ------------------
  |  Branch (57:6): [True: 0, False: 1]
  ------------------
   58|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   59|       |
   60|      1|	if (!appender->Open)
  ------------------
  |  Branch (60:6): [True: 0, False: 1]
  ------------------
   61|      0|		return TRUE;
  ------------------
  |  |  126|      0|#define TRUE true
  ------------------
   62|       |
   63|      1|	if (!appender->active)
  ------------------
  |  Branch (63:6): [True: 1, False: 0]
  ------------------
   64|      1|	{
   65|      1|		status = appender->Open(log, appender);
   66|      1|		appender->active = TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
   67|      1|	}
   68|       |
   69|      1|	return status;
   70|      1|}
WLog_SetLogAppenderType:
  157|      1|{
  158|      1|	if (!log)
  ------------------
  |  Branch (158:6): [True: 0, False: 1]
  ------------------
  159|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  160|       |
  161|      1|	if (log->Appender)
  ------------------
  |  Branch (161:6): [True: 0, False: 1]
  ------------------
  162|      0|	{
  163|      0|		WLog_Appender_Free(log, log->Appender);
  164|      0|		log->Appender = nullptr;
  165|      0|	}
  166|       |
  167|      1|	log->Appender = WLog_Appender_New(log, logAppenderType);
  168|      1|	return log->Appender != nullptr;
  169|      1|}
Appender.c:WLog_Appender_New:
   95|      1|{
   96|      1|	wLogAppender* appender = nullptr;
   97|       |
   98|      1|	if (!log)
  ------------------
  |  Branch (98:6): [True: 0, False: 1]
  ------------------
   99|      0|		return nullptr;
  100|       |
  101|      1|	switch (logAppenderType)
  102|      1|	{
  103|      1|		case WLOG_APPENDER_CONSOLE:
  ------------------
  |  Branch (103:3): [True: 1, False: 0]
  ------------------
  104|      1|			appender = WLog_ConsoleAppender_New(log);
  105|      1|			break;
  106|      0|		case WLOG_APPENDER_FILE:
  ------------------
  |  Branch (106:3): [True: 0, False: 1]
  ------------------
  107|      0|			appender = WLog_FileAppender_New(log);
  108|      0|			break;
  109|      0|		case WLOG_APPENDER_BINARY:
  ------------------
  |  Branch (109:3): [True: 0, False: 1]
  ------------------
  110|      0|			appender = WLog_BinaryAppender_New(log);
  111|      0|			break;
  112|      0|		case WLOG_APPENDER_CALLBACK:
  ------------------
  |  Branch (112:3): [True: 0, False: 1]
  ------------------
  113|      0|			appender = WLog_CallbackAppender_New(log);
  114|      0|			break;
  115|      0|#ifdef WINPR_HAVE_SYSLOG_H
  116|      0|		case WLOG_APPENDER_SYSLOG:
  ------------------
  |  Branch (116:3): [True: 0, False: 1]
  ------------------
  117|      0|			appender = WLog_SyslogAppender_New(log);
  118|      0|			break;
  119|      0|#endif
  120|       |#ifdef WINPR_HAVE_JOURNALD_H
  121|       |		case WLOG_APPENDER_JOURNALD:
  122|       |			appender = WLog_JournaldAppender_New(log);
  123|       |			break;
  124|       |#endif
  125|      0|		case WLOG_APPENDER_UDP:
  ------------------
  |  Branch (125:3): [True: 0, False: 1]
  ------------------
  126|      0|			appender = WLog_UdpAppender_New(log);
  127|      0|			break;
  128|      0|		default:
  ------------------
  |  Branch (128:3): [True: 0, False: 1]
  ------------------
  129|      0|			(void)fprintf(stderr, "%s: unknown handler type %" PRIu32 "\n", __func__,
  130|      0|			              logAppenderType);
  131|      0|			appender = nullptr;
  132|      0|			break;
  133|      1|	}
  134|       |
  135|      1|	if (!appender)
  ------------------
  |  Branch (135:6): [True: 0, False: 1]
  ------------------
  136|      0|		appender = WLog_ConsoleAppender_New(log);
  137|       |
  138|      1|	if (!appender)
  ------------------
  |  Branch (138:6): [True: 0, False: 1]
  ------------------
  139|      0|		return nullptr;
  140|       |
  141|      1|	if (!(appender->Layout = WLog_Layout_New(log)))
  ------------------
  |  Branch (141:6): [True: 0, False: 1]
  ------------------
  142|      0|	{
  143|      0|		WLog_Appender_Free(log, appender);
  144|      0|		return nullptr;
  145|      0|	}
  146|       |
  147|      1|	if (!InitializeCriticalSectionAndSpinCount(&appender->lock, 4000))
  ------------------
  |  Branch (147:6): [True: 0, False: 1]
  ------------------
  148|      0|	{
  149|      0|		WLog_Appender_Free(log, appender);
  150|      0|		return nullptr;
  151|      0|	}
  152|       |
  153|      1|	return appender;
  154|      1|}

WLog_ConsoleAppender_New:
  243|      1|{
  244|      1|	wLogConsoleAppender* ConsoleAppender =
  245|      1|	    (wLogConsoleAppender*)calloc(1, sizeof(wLogConsoleAppender));
  246|       |
  247|      1|	if (!ConsoleAppender)
  ------------------
  |  Branch (247:6): [True: 0, False: 1]
  ------------------
  248|      0|		return nullptr;
  249|       |
  250|      1|	ConsoleAppender->common.Type = WLOG_APPENDER_CONSOLE;
  251|      1|	ConsoleAppender->common.Open = WLog_ConsoleAppender_Open;
  252|      1|	ConsoleAppender->common.Close = WLog_ConsoleAppender_Close;
  253|      1|	ConsoleAppender->common.WriteMessage = WLog_ConsoleAppender_WriteMessage;
  254|      1|	ConsoleAppender->common.WriteDataMessage = WLog_ConsoleAppender_WriteDataMessage;
  255|      1|	ConsoleAppender->common.WriteImageMessage = WLog_ConsoleAppender_WriteImageMessage;
  256|      1|	ConsoleAppender->common.WritePacketMessage = WLog_ConsoleAppender_WritePacketMessage;
  257|      1|	ConsoleAppender->common.Set = WLog_ConsoleAppender_Set;
  258|      1|	ConsoleAppender->common.Free = WLog_ConsoleAppender_Free;
  259|       |
  260|      1|	ConsoleAppender->outputStream = WLOG_CONSOLE_DEFAULT;
  ------------------
  |  |   29|      1|#define WLOG_CONSOLE_DEFAULT 0
  ------------------
  261|       |
  262|       |#ifdef _WIN32
  263|       |	if (IsDebuggerPresent())
  264|       |		ConsoleAppender->outputStream = WLOG_CONSOLE_DEBUG;
  265|       |#endif
  266|       |
  267|      1|	return &ConsoleAppender->common;
  268|      1|}
ConsoleAppender.c:WLog_ConsoleAppender_Open:
   43|      1|{
   44|      1|	return TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
   45|      1|}
ConsoleAppender.c:WLog_ConsoleAppender_WriteMessage:
   55|   111k|{
   56|   111k|	if (!appender)
  ------------------
  |  Branch (56:6): [True: 0, False: 111k]
  ------------------
   57|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
   58|       |
   59|   111k|	wLogConsoleAppender* consoleAppender = (wLogConsoleAppender*)appender;
   60|       |
   61|   111k|	char prefix[WLOG_MAX_PREFIX_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
   62|   111k|	WLog_Layout_GetMessagePrefix(log, appender->Layout, cmessage, prefix, sizeof(prefix));
   63|       |
   64|       |#ifdef _WIN32
   65|       |	if (consoleAppender->outputStream == WLOG_CONSOLE_DEBUG)
   66|       |	{
   67|       |		OutputDebugStringA(prefix);
   68|       |		OutputDebugStringA(cmessage->TextString);
   69|       |		OutputDebugStringA("\n");
   70|       |
   71|       |		return TRUE;
   72|       |	}
   73|       |#endif
   74|       |#ifdef ANDROID
   75|       |	android_LogPriority level;
   76|       |	switch (cmessage->Level)
   77|       |	{
   78|       |		case WLOG_TRACE:
   79|       |			level = ANDROID_LOG_VERBOSE;
   80|       |			break;
   81|       |		case WLOG_DEBUG:
   82|       |			level = ANDROID_LOG_DEBUG;
   83|       |			break;
   84|       |		case WLOG_INFO:
   85|       |			level = ANDROID_LOG_INFO;
   86|       |			break;
   87|       |		case WLOG_WARN:
   88|       |			level = ANDROID_LOG_WARN;
   89|       |			break;
   90|       |		case WLOG_ERROR:
   91|       |			level = ANDROID_LOG_ERROR;
   92|       |			break;
   93|       |		case WLOG_FATAL:
   94|       |			level = ANDROID_LOG_FATAL;
   95|       |			break;
   96|       |		case WLOG_OFF:
   97|       |			level = ANDROID_LOG_SILENT;
   98|       |			break;
   99|       |		default:
  100|       |			level = ANDROID_LOG_FATAL;
  101|       |			break;
  102|       |	}
  103|       |
  104|       |	if (level != ANDROID_LOG_SILENT)
  105|       |		__android_log_print(level, log->Name, "%s%s", prefix, cmessage->TextString);
  106|       |
  107|       |#else
  108|   111k|	FILE* fp = nullptr;
  109|   111k|	switch (consoleAppender->outputStream)
  110|   111k|	{
  111|      0|		case WLOG_CONSOLE_STDOUT:
  ------------------
  |  |   30|      0|#define WLOG_CONSOLE_STDOUT 1
  ------------------
  |  Branch (111:3): [True: 0, False: 111k]
  ------------------
  112|      0|			fp = stdout;
  113|      0|			break;
  114|      0|		case WLOG_CONSOLE_STDERR:
  ------------------
  |  |   31|      0|#define WLOG_CONSOLE_STDERR 2
  ------------------
  |  Branch (114:3): [True: 0, False: 111k]
  ------------------
  115|      0|			fp = stderr;
  116|      0|			break;
  117|   111k|		default:
  ------------------
  |  Branch (117:3): [True: 111k, False: 0]
  ------------------
  118|   111k|			switch (cmessage->Level)
  119|   111k|			{
  120|      0|				case WLOG_TRACE:
  ------------------
  |  Branch (120:5): [True: 0, False: 111k]
  ------------------
  121|      0|				case WLOG_DEBUG:
  ------------------
  |  Branch (121:5): [True: 0, False: 111k]
  ------------------
  122|      0|				case WLOG_INFO:
  ------------------
  |  Branch (122:5): [True: 0, False: 111k]
  ------------------
  123|      0|					fp = stdout;
  124|      0|					break;
  125|   111k|				default:
  ------------------
  |  Branch (125:5): [True: 111k, False: 0]
  ------------------
  126|   111k|					fp = stderr;
  127|   111k|					break;
  128|   111k|			}
  129|   111k|			break;
  130|   111k|	}
  131|       |
  132|   111k|	if (cmessage->Level != WLOG_OFF)
  ------------------
  |  Branch (132:6): [True: 111k, False: 0]
  ------------------
  133|   111k|		(void)fprintf(fp, "%s%s\n", prefix, cmessage->TextString);
  134|   111k|#endif
  135|   111k|	return TRUE;
  ------------------
  |  |  126|   111k|#define TRUE true
  ------------------
  136|   111k|}
ConsoleAppender.c:WLog_ConsoleAppender_Free:
  230|      1|{
  231|      1|	if (appender)
  ------------------
  |  Branch (231:6): [True: 1, False: 0]
  ------------------
  232|      1|	{
  233|      1|		if (appender->PacketMessageContext)
  ------------------
  |  Branch (233:7): [True: 0, False: 1]
  ------------------
  234|      0|		{
  235|      0|			Pcap_Close((wPcap*)appender->PacketMessageContext);
  236|      0|		}
  237|       |
  238|      1|		free(appender);
  239|      1|	}
  240|      1|}

WLog_Layout_GetMessagePrefix:
  246|   111k|{
  247|   111k|	char format[WLOG_MAX_PREFIX_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  248|       |
  249|   111k|	WINPR_ASSERT(layout);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  250|   111k|	WINPR_ASSERT(message);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  251|   111k|	WINPR_ASSERT(prefix);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  252|       |
  253|   111k|	struct format_tid_arg targ = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  254|       |
  255|   111k|	SYSTEMTIME localTime = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  256|   111k|	GetLocalTime(&localTime);
  257|       |
  258|   111k|	struct format_option_recurse recurse = {
  259|   111k|		.options = nullptr, .nroptions = 0, .log = log, .layout = layout, .message = message
  260|   111k|	};
  261|       |
  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  263|   111k|	struct format_option options[] = {
  264|   111k|		{ ENTRY("%ctx"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  265|   111k|		  ENTRY("%s"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  266|   111k|		  log->custom,
  267|   111k|		  { .pv = log->context },
  268|   111k|		  nullptr,
  269|   111k|		  &recurse }, /* log context */
  270|   111k|		{ ENTRY("%dw"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  271|   111k|		  ENTRY("%u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  272|   111k|		  nullptr,
  273|   111k|		  { .s = localTime.wDayOfWeek },
  274|   111k|		  nullptr,
  275|   111k|		  &recurse }, /* day of week */
  276|   111k|		{ ENTRY("%dy"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  277|   111k|		  ENTRY("%u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  278|   111k|		  nullptr,
  279|   111k|		  { .s = localTime.wDay },
  280|   111k|		  nullptr,
  281|   111k|		  &recurse }, /* day of year
  282|       |		               */
  283|   111k|		{ ENTRY("%fl"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  284|   111k|		  ENTRY("%s"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  285|   111k|		  nullptr,
  286|   111k|		  { .cpv = message->FileName },
  287|   111k|		  nullptr,
  288|   111k|		  &recurse }, /* file
  289|       |		               */
  290|   111k|		{ ENTRY("%fn"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  291|   111k|		  ENTRY("%s"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  292|   111k|		  nullptr,
  293|   111k|		  { .cpv = message->FunctionName },
  294|   111k|		  nullptr,
  295|   111k|		  &recurse }, /* function
  296|       |		               */
  297|   111k|		{ ENTRY("%hr"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  298|   111k|		  ENTRY("%02u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  299|   111k|		  nullptr,
  300|   111k|		  { .s = localTime.wHour },
  301|   111k|		  nullptr,
  302|   111k|		  &recurse }, /* hours
  303|       |		               */
  304|   111k|		{ ENTRY("%ln"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  305|   111k|		  ENTRY("%" PRIuz),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  306|   111k|		  nullptr,
  307|   111k|		  { .s = message->LineNumber },
  308|   111k|		  nullptr,
  309|   111k|		  &recurse }, /* line number */
  310|   111k|		{ ENTRY("%lv"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  311|   111k|		  ENTRY("%s"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  312|   111k|		  nullptr,
  313|   111k|		  { .cpv = WLOG_LEVELS[message->Level] },
  314|   111k|		  nullptr,
  315|   111k|		  &recurse }, /* log level */
  316|   111k|		{ ENTRY("%mi"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  317|   111k|		  ENTRY("%02u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  318|   111k|		  nullptr,
  319|   111k|		  { .s = localTime.wMinute },
  320|   111k|		  nullptr,
  321|   111k|		  &recurse }, /* minutes
  322|       |		               */
  323|   111k|		{ ENTRY("%ml"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  324|   111k|		  ENTRY("%03u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  325|   111k|		  nullptr,
  326|   111k|		  { .s = localTime.wMilliseconds },
  327|   111k|		  nullptr,
  328|   111k|		  &recurse }, /* milliseconds */
  329|   111k|		{ ENTRY("%mn"), ENTRY("%s"), nullptr, { .cpv = log->Name }, nullptr, &recurse }, /* module
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
              		{ ENTRY("%mn"), ENTRY("%s"), nullptr, { .cpv = log->Name }, nullptr, &recurse }, /* module
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  330|       |		                                                                                    name */
  331|   111k|		{ ENTRY("%mo"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  332|   111k|		  ENTRY("%u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  333|   111k|		  nullptr,
  334|   111k|		  { .s = localTime.wMonth },
  335|   111k|		  nullptr,
  336|   111k|		  &recurse }, /* month
  337|       |		               */
  338|   111k|		{ ENTRY("%pid"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  339|   111k|		  ENTRY("%u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  340|   111k|		  nullptr,
  341|   111k|		  { .s = GetCurrentProcessId() },
  342|   111k|		  nullptr,
  343|   111k|		  &recurse }, /* process id */
  344|   111k|		{ ENTRY("%se"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  345|   111k|		  ENTRY("%02u"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  346|   111k|		  nullptr,
  347|   111k|		  { .s = localTime.wSecond },
  348|   111k|		  nullptr,
  349|   111k|		  &recurse },                                                                /* seconds
  350|       |		                                                                              */
  351|   111k|		{ ENTRY("%tid"), ENTRY("%s"), get_tid, { .pv = &targ }, nullptr, &recurse }, /* thread id */
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
              		{ ENTRY("%tid"), ENTRY("%s"), get_tid, { .pv = &targ }, nullptr, &recurse }, /* thread id */
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  352|   111k|		{ ENTRY("%yr"), ENTRY("%u"), nullptr, { .s = localTime.wYear }, nullptr, &recurse }, /* year
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
              		{ ENTRY("%yr"), ENTRY("%u"), nullptr, { .s = localTime.wYear }, nullptr, &recurse }, /* year
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  353|       |		                                                                                      */
  354|   111k|		{ ENTRY("%{"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  355|   111k|		  ENTRY("%}"),
  ------------------
  |  |  262|   111k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  356|   111k|		  nullptr,
  357|   111k|		  { .pv = log->context },
  358|   111k|		  skip_if_null,
  359|   111k|		  &recurse }, /* skip if no context */
  360|   111k|	};
  361|       |
  362|   111k|	recurse.options = options;
  363|   111k|	recurse.nroptions = ARRAYSIZE(options);
  ------------------
  |  |  966|   111k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|   111k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|   111k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  364|       |
  365|   111k|	if (!replace_format_string(layout->FormatString, &recurse, format, ARRAYSIZE(format)))
  ------------------
  |  |  966|   111k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|   111k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|   111k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (365:6): [True: 0, False: 111k]
  ------------------
  366|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  367|       |
  368|   111k|	WINPR_PRAGMA_DIAG_PUSH
  369|   111k|	WINPR_PRAGMA_DIAG_IGNORED_FORMAT_SECURITY
  370|       |
  371|   111k|	WLog_PrintMessagePrefix(prefix, prefixlen, format);
  372|       |
  373|   111k|	WINPR_PRAGMA_DIAG_POP
  374|       |
  375|   111k|	return TRUE;
  ------------------
  |  |  126|   111k|#define TRUE true
  ------------------
  376|   111k|}
WLog_Layout_New:
  403|      1|{
  404|      1|	LPCSTR prefix = "WLOG_PREFIX";
  405|      1|	DWORD nSize = 0;
  406|      1|	char* env = nullptr;
  407|      1|	wLogLayout* layout = nullptr;
  408|      1|	layout = (wLogLayout*)calloc(1, sizeof(wLogLayout));
  409|       |
  410|      1|	if (!layout)
  ------------------
  |  Branch (410:6): [True: 0, False: 1]
  ------------------
  411|      0|		return nullptr;
  412|       |
  413|      1|	nSize = GetEnvironmentVariableA(prefix, nullptr, 0);
  414|       |
  415|      1|	if (nSize)
  ------------------
  |  Branch (415:6): [True: 0, False: 1]
  ------------------
  416|      0|	{
  417|      0|		env = (LPSTR)malloc(nSize);
  418|       |
  419|      0|		if (!env)
  ------------------
  |  Branch (419:7): [True: 0, False: 0]
  ------------------
  420|      0|		{
  421|      0|			free(layout);
  422|      0|			return nullptr;
  423|      0|		}
  424|       |
  425|      0|		if (GetEnvironmentVariableA(prefix, env, nSize) != nSize - 1)
  ------------------
  |  Branch (425:7): [True: 0, False: 0]
  ------------------
  426|      0|		{
  427|      0|			free(env);
  428|      0|			free(layout);
  429|      0|			return nullptr;
  430|      0|		}
  431|      0|	}
  432|       |
  433|      1|	if (env)
  ------------------
  |  Branch (433:6): [True: 0, False: 1]
  ------------------
  434|      0|		layout->FormatString = env;
  435|      1|	else
  436|      1|	{
  437|       |#ifdef ANDROID
  438|       |		layout->FormatString = _strdup("[pid=%pid:tid=%tid] - [%fn]%{[%ctx]%}: ");
  439|       |#else
  440|      1|		layout->FormatString =
  441|      1|		    _strdup("[%hr:%mi:%se:%ml] [%pid:%tid] [%lv][%mn] - [%fn]%{[%ctx]%}: ");
  442|      1|#endif
  443|       |
  444|      1|		if (!layout->FormatString)
  ------------------
  |  Branch (444:7): [True: 0, False: 1]
  ------------------
  445|      0|		{
  446|      0|			free(layout);
  447|      0|			return nullptr;
  448|      0|		}
  449|      1|	}
  450|       |
  451|      1|	return layout;
  452|      1|}
WLog_Layout_Free:
  455|      1|{
  456|      1|	if (layout)
  ------------------
  |  Branch (456:6): [True: 1, False: 0]
  ------------------
  457|      1|	{
  458|      1|		if (layout->FormatString)
  ------------------
  |  Branch (458:7): [True: 1, False: 0]
  ------------------
  459|      1|		{
  460|      1|			free(layout->FormatString);
  461|      1|			layout->FormatString = nullptr;
  462|      1|		}
  463|       |
  464|      1|		free(layout);
  465|      1|	}
  466|      1|}
Layout.c:get_tid:
  101|   111k|{
  102|   111k|	struct format_tid_arg* targ = arg;
  103|   111k|	WINPR_ASSERT(targ);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|       |
  105|   111k|	size_t tid = 0;
  106|   111k|#if defined __linux__ && !defined ANDROID
  107|       |	/* On Linux we prefer to see the LWP id */
  108|   111k|	tid = (size_t)syscall(SYS_gettid);
  109|       |#else
  110|       |	tid = (size_t)GetCurrentThreadId();
  111|       |#endif
  112|   111k|	(void)_snprintf(targ->tid, sizeof(targ->tid), "%08" PRIxz, tid);
  ------------------
  |  |  251|   111k|#define _snprintf snprintf
  ------------------
              	(void)_snprintf(targ->tid, sizeof(targ->tid), "%08" PRIxz, tid);
  ------------------
  |  |  487|   111k|#define PRIxz "zx"
  ------------------
  113|   111k|	return targ->tid;
  114|   111k|}
Layout.c:skip_if_null:
  150|   111k|{
  151|   111k|	WINPR_ASSERT(opt);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|   111k|	WINPR_ASSERT(fmt);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|   111k|	WINPR_ASSERT(preplacelen);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|   111k|	WINPR_ASSERT(pskiplen);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|       |
  156|   111k|	*preplacelen = 0;
  157|   111k|	*pskiplen = 0;
  158|       |
  159|   111k|	const char* str = &fmt[opt->fmtlen]; /* Skip first %{ from string */
  160|   111k|	const char* end = strstr(str, opt->replace);
  161|   111k|	if (!end)
  ------------------
  |  Branch (161:6): [True: 0, False: 111k]
  ------------------
  162|      0|		return nullptr;
  163|   111k|	*pskiplen = WINPR_ASSERTING_INT_CAST(size_t, end - fmt) + opt->replacelen;
  ------------------
  |  |  112|   111k|	__extension__({                                                                             \
  |  |  113|   111k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   111k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   111k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   111k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   334k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 111k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 111k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   111k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   111k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   111k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   111k|	})
  ------------------
  164|       |
  165|   111k|	if (!opt->arg.cpv)
  ------------------
  |  Branch (165:6): [True: 111k, False: 0]
  ------------------
  166|   111k|		return nullptr;
  167|       |
  168|      0|	const size_t replacelen = WINPR_ASSERTING_INT_CAST(size_t, end - str);
  ------------------
  |  |  112|      0|	__extension__({                                                                             \
  |  |  113|      0|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|      0|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|      0|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|	do                                                                                             \
  |  |  |  |  |  |   61|      0|	{                                                                                              \
  |  |  |  |  |  |   62|      0|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|      0|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|      0|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|      0|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|      0|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|      0|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|      0|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|      0|                                                                                                   \
  |  |  |  |  |  |   70|      0|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|      0|	do                                                      \
  |  |  |  |  |  |  |  |   32|      0|	{                                                       \
  |  |  |  |  |  |  |  |   33|      0|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|      0|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|                                                                                                   \
  |  |  |  |  |  |   72|      0|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|      0|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|      0|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|      0|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|      0|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|      0|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|	do                                                                                             \
  |  |  |  |  |  |   61|      0|	{                                                                                              \
  |  |  |  |  |  |   62|      0|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|      0|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|      0|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|      0|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|      0|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|      0|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|      0|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|      0|                                                                                                   \
  |  |  |  |  |  |   70|      0|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|      0|	do                                                      \
  |  |  |  |  |  |  |  |   32|      0|	{                                                       \
  |  |  |  |  |  |  |  |   33|      0|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|      0|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|      0|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|                                                                                                   \
  |  |  |  |  |  |   72|      0|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|      0|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|      0|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|      0|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|      0|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|      0|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|      0|	})
  ------------------
  169|       |
  170|      0|	char buffer[WLOG_MAX_PREFIX_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|      0|	{                      \
  |  |   85|      0|	} /** @since version 3.24.0 */
  ------------------
  171|      0|	memcpy(buffer, str, MIN(replacelen, ARRAYSIZE(buffer) - 1));
  ------------------
  |  |   42|      0|#define MIN(x, y) (((x) < (y)) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (42:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  172|       |
  173|      0|	if (!replace_format_string(buffer, opt->recurse, opt->recurse->buffer,
  ------------------
  |  Branch (173:6): [True: 0, False: 0]
  ------------------
  174|      0|	                           ARRAYSIZE(opt->recurse->buffer)))
  ------------------
  |  |  966|      0|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      0|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      0|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  175|      0|		return nullptr;
  176|       |
  177|      0|	*preplacelen = strnlen(opt->recurse->buffer, ARRAYSIZE(opt->recurse->buffer));
  ------------------
  |  |  966|      0|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      0|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      0|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|      0|	return opt->recurse->buffer;
  179|      0|}
Layout.c:replace_format_string:
  183|   111k|{
  184|   111k|	WINPR_ASSERT(FormatString);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|   111k|	WINPR_ASSERT(recurse);
  ------------------
  |  |   76|   111k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|   111k|	do                                                                                             \
  |  |  |  |   61|   111k|	{                                                                                              \
  |  |  |  |   62|   111k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|   111k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|   111k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|   111k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|   111k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|   111k|                                                                                                   \
  |  |  |  |   70|   111k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|   111k|	do                                                      \
  |  |  |  |  |  |   32|   111k|	{                                                       \
  |  |  |  |  |  |   33|   111k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   111k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|   111k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 111k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   111k|                                                                                                   \
  |  |  |  |   72|   111k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|   111k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|   111k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|   111k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|       |
  187|   111k|	size_t index = 0;
  188|   111k|	const char* prefix = WLog_GetGlobalPrefix();
  189|   111k|	if (prefix)
  ------------------
  |  Branch (189:6): [True: 0, False: 111k]
  ------------------
  190|      0|	{
  191|      0|		const int res = _snprintf(format, formatlen, "{%s}", prefix);
  ------------------
  |  |  251|      0|#define _snprintf snprintf
  ------------------
  192|      0|		if (res < 0)
  ------------------
  |  Branch (192:7): [True: 0, False: 0]
  ------------------
  193|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  194|      0|		index = (size_t)res;
  195|      0|	}
  196|       |
  197|  3.56M|	while (*FormatString)
  ------------------
  |  Branch (197:9): [True: 3.45M, False: 111k]
  ------------------
  198|  3.45M|	{
  199|  3.45M|		const struct format_option* opt =
  200|  3.45M|		    bsearch(FormatString, recurse->options, recurse->nroptions,
  201|  3.45M|		            sizeof(struct format_option), opt_compare_fn);
  202|  3.45M|		if (opt)
  ------------------
  |  Branch (202:7): [True: 1.11M, False: 2.34M]
  ------------------
  203|  1.11M|		{
  204|  1.11M|			size_t replacelen = opt->replacelen;
  205|  1.11M|			size_t fmtlen = opt->fmtlen;
  206|  1.11M|			const char* replace = opt->replace;
  207|  1.11M|			const void* arg = opt->arg.cpv;
  208|       |
  209|  1.11M|			if (opt->ext)
  ------------------
  |  Branch (209:8): [True: 111k, False: 1.00M]
  ------------------
  210|   111k|				replace = opt->ext(opt, FormatString, &replacelen, &fmtlen);
  211|  1.11M|			if (opt->fkt)
  ------------------
  |  Branch (211:8): [True: 111k, False: 1.00M]
  ------------------
  212|   111k|				arg = opt->fkt(opt->arg.pv);
  213|       |
  214|  1.11M|			if (replace && (replacelen > 0))
  ------------------
  |  Branch (214:8): [True: 1.00M, False: 111k]
  |  Branch (214:19): [True: 1.00M, False: 0]
  ------------------
  215|  1.00M|			{
  216|  1.00M|				WINPR_PRAGMA_DIAG_PUSH
  217|  1.00M|				WINPR_PRAGMA_DIAG_IGNORED_FORMAT_NONLITERAL
  218|  1.00M|				const int rc = _snprintf(&format[index], formatlen - index, replace, arg);
  ------------------
  |  |  251|  1.00M|#define _snprintf snprintf
  ------------------
  219|  1.00M|				WINPR_PRAGMA_DIAG_POP
  220|  1.00M|				if (rc < 0)
  ------------------
  |  Branch (220:9): [True: 0, False: 1.00M]
  ------------------
  221|      0|					return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  222|  1.00M|				if (!check_and_log_format_size(format, formatlen, index,
  ------------------
  |  Branch (222:9): [True: 0, False: 1.00M]
  ------------------
  223|  1.00M|				                               WINPR_ASSERTING_INT_CAST(size_t, rc)))
  ------------------
  |  |  112|  1.00M|	__extension__({                                                                             \
  |  |  113|  1.00M|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  1.00M|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  1.00M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.00M|	do                                                                                             \
  |  |  |  |  |  |   61|  1.00M|	{                                                                                              \
  |  |  |  |  |  |   62|  1.00M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.00M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.00M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.00M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.00M|                                                                                                   \
  |  |  |  |  |  |   70|  1.00M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.00M|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.00M|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.00M|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.00M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.00M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.00M|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.00M|                                                                                                   \
  |  |  |  |  |  |   72|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.00M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.00M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.00M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  1.00M|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  1.00M|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  1.00M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.00M|	do                                                                                             \
  |  |  |  |  |  |   61|  1.00M|	{                                                                                              \
  |  |  |  |  |  |   62|  1.00M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.00M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.00M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.00M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.00M|                                                                                                   \
  |  |  |  |  |  |   70|  1.00M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.00M|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.00M|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.01M|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.00M, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.00M, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.00M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.00M|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.00M|                                                                                                   \
  |  |  |  |  |  |   72|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.00M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.00M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.00M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  1.00M|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  1.00M|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  1.00M|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  1.00M|	})
  ------------------
  224|      0|					return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  225|  1.00M|				index += WINPR_ASSERTING_INT_CAST(size_t, rc);
  ------------------
  |  |  112|  1.00M|	__extension__({                                                                             \
  |  |  113|  1.00M|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  1.00M|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  1.00M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.00M|	do                                                                                             \
  |  |  |  |  |  |   61|  1.00M|	{                                                                                              \
  |  |  |  |  |  |   62|  1.00M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.00M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.00M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.00M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.00M|                                                                                                   \
  |  |  |  |  |  |   70|  1.00M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.00M|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.00M|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.00M|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.00M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.00M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.00M|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.00M|                                                                                                   \
  |  |  |  |  |  |   72|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.00M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.00M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.00M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  1.00M|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  1.00M|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  1.00M|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.00M|	do                                                                                             \
  |  |  |  |  |  |   61|  1.00M|	{                                                                                              \
  |  |  |  |  |  |   62|  1.00M|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.00M|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.00M|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.00M|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.00M|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.00M|                                                                                                   \
  |  |  |  |  |  |   70|  1.00M|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.00M|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.00M|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.01M|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.00M, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 1.00M, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.00M|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.00M|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.00M|                                                                                                   \
  |  |  |  |  |  |   72|  1.00M|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.00M|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.00M|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.00M|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  1.00M|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  1.00M|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  1.00M|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  1.00M|	})
  ------------------
  226|  1.00M|			}
  227|  1.11M|			FormatString += fmtlen;
  228|  1.11M|		}
  229|  2.34M|		else
  230|  2.34M|		{
  231|       |			/* Unknown format string */
  232|  2.34M|			if (*FormatString == '%')
  ------------------
  |  Branch (232:8): [True: 0, False: 2.34M]
  ------------------
  233|      0|				return log_invalid_fmt(FormatString);
  234|       |
  235|  2.34M|			if (!check_and_log_format_size(format, formatlen, index, 1))
  ------------------
  |  Branch (235:8): [True: 0, False: 2.34M]
  ------------------
  236|      0|				return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  237|  2.34M|			format[index++] = *FormatString++;
  238|  2.34M|		}
  239|  3.45M|	}
  240|       |
  241|   111k|	return check_and_log_format_size(format, formatlen, index, 0);
  242|   111k|}
Layout.c:opt_compare_fn:
  137|  13.7M|{
  138|  13.7M|	const char* what = a;
  139|  13.7M|	const struct format_option* opt = b;
  140|  13.7M|	if (!opt)
  ------------------
  |  Branch (140:6): [True: 0, False: 13.7M]
  ------------------
  141|      0|		return -1;
  142|  13.7M|	return strncmp(what, opt->fmt, opt->fmtlen);
  143|  13.7M|}
Layout.c:check_and_log_format_size:
  123|  3.45M|{
  124|       |	/* format string must be '\0' terminated, so abort at size - 1 */
  125|  3.45M|	if (index + add + 1 >= size)
  ------------------
  |  Branch (125:6): [True: 0, False: 3.45M]
  ------------------
  126|      0|	{
  127|      0|		(void)fprintf(stderr,
  128|      0|		              "Format string too long ['%s', max %" PRIuz ", used %" PRIuz
  129|      0|		              ", adding %" PRIuz "]\n",
  130|      0|		              format, size, index, add);
  131|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  132|      0|	}
  133|  3.45M|	return TRUE;
  ------------------
  |  |  126|  3.45M|#define TRUE true
  ------------------
  134|  3.45M|}
Layout.c:WLog_PrintMessagePrefix:
   93|   111k|{
   94|   111k|	va_list args = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
   95|   111k|	va_start(args, format);
   96|   111k|	WLog_PrintMessagePrefixVA(prefix, prefixlen, format, args);
   97|       |	va_end(args);
   98|   111k|}
Layout.c:WLog_PrintMessagePrefixVA:
   86|   111k|{
   87|   111k|	(void)vsnprintf(prefix, prefixlen, format, args);
   88|   111k|}

WLog_PrintTextMessageVA:
  420|   111k|{
  421|   111k|	wLogMessage message = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  422|   111k|	message.Type = WLOG_MESSAGE_TEXT;
  423|   111k|	message.Level = level;
  424|   111k|	message.LineNumber = line;
  425|   111k|	message.FileName = file;
  426|   111k|	message.FunctionName = function;
  427|       |
  428|   111k|	message.FormatString = fmt;
  429|       |
  430|   111k|	return WLog_PrintTextMessageInternal(log, &message, args);
  431|   111k|}
WLog_GetLogLevel:
  456|   115k|{
  457|   115k|	if (!log)
  ------------------
  |  Branch (457:6): [True: 0, False: 115k]
  ------------------
  458|      0|		return WLOG_OFF;
  459|       |
  460|   115k|	if (log->FilterLevel <= WLOG_FILTER_NOT_INITIALIZED)
  ------------------
  |  |   53|   115k|#define WLOG_FILTER_NOT_INITIALIZED (-2)
  ------------------
  |  Branch (460:6): [True: 0, False: 115k]
  ------------------
  461|      0|		log->FilterLevel = WLog_GetFilterLogLevel(log);
  462|       |
  463|   115k|	if (log->FilterLevel > WLOG_FILTER_NOT_FILTERED)
  ------------------
  |  |   52|   115k|#define WLOG_FILTER_NOT_FILTERED (-1)
  ------------------
  |  Branch (463:6): [True: 0, False: 115k]
  ------------------
  464|      0|		return (DWORD)log->FilterLevel;
  465|   115k|	else if (log->Level == WLOG_LEVEL_INHERIT)
  ------------------
  |  Branch (465:11): [True: 1, False: 115k]
  ------------------
  466|      1|		log->Level = WLog_GetLogLevel(log->Parent);
  467|       |
  468|   115k|	return log->Level;
  469|   115k|}
WLog_IsLevelActive:
  472|   115k|{
  473|   115k|	DWORD level = 0;
  474|       |
  475|   115k|	if (!_log)
  ------------------
  |  Branch (475:6): [True: 0, False: 115k]
  ------------------
  476|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  477|       |
  478|   115k|	level = WLog_GetLogLevel(_log);
  479|       |
  480|   115k|	if (level == WLOG_OFF)
  ------------------
  |  Branch (480:6): [True: 0, False: 115k]
  ------------------
  481|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  482|       |
  483|   115k|	return _log_level >= level;
  484|   115k|}
WLog_GetRoot:
  954|      1|{
  955|      1|	if (!InitOnceExecuteOnce(&g_WLogInitialized, WLog_InitializeRoot, nullptr, nullptr))
  ------------------
  |  |  424|      1|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
  |  Branch (955:6): [True: 0, False: 1]
  ------------------
  956|      0|		return nullptr;
  957|       |
  958|      1|	return g_RootLog;
  959|      1|}
WLog_Get:
 1053|      1|{
 1054|      1|	wLog* root = WLog_GetRoot();
 1055|      1|	return WLog_Get_int(root, name);
 1056|      1|}
WLog_GetGlobalPrefix:
 1111|   111k|{
 1112|   111k|	return g_GlobalPrefix;
 1113|   111k|}
wlog.c:WLog_PrintTextMessageInternal:
  354|   111k|{
  355|   111k|	assert(cmessage);
  ------------------
  |  Branch (355:2): [True: 0, False: 111k]
  |  Branch (355:2): [True: 111k, False: 0]
  ------------------
  356|       |
  357|   111k|	char formattedLogMessage[WLOG_MAX_STRING_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|   111k|	{                      \
  |  |   85|   111k|	} /** @since version 3.24.0 */
  ------------------
  358|   111k|	wLogMessage message = *cmessage;
  359|   111k|	message.TextString = formattedLogMessage;
  360|       |
  361|   111k|	WINPR_PRAGMA_DIAG_PUSH
  362|   111k|	WINPR_PRAGMA_DIAG_IGNORED_FORMAT_NONLITERAL
  363|   111k|	if (vsnprintf(formattedLogMessage, ARRAYSIZE(formattedLogMessage) - 1, cmessage->FormatString,
  ------------------
  |  |  966|   111k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|   111k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|   111k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (363:6): [True: 0, False: 111k]
  ------------------
  364|   111k|	              args) < 0)
  365|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  366|   111k|	WINPR_PRAGMA_DIAG_POP
  367|       |
  368|   111k|	return WLog_Write(log, &message);
  369|   111k|}
wlog.c:WLog_Write:
  232|   111k|{
  233|   111k|	BOOL status = FALSE;
  ------------------
  |  |  122|   111k|#define FALSE false
  ------------------
  234|   111k|	wLogAppender* appender = WLog_GetLogAppender(log);
  235|       |
  236|   111k|	if (!appender)
  ------------------
  |  Branch (236:6): [True: 0, False: 111k]
  ------------------
  237|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  238|       |
  239|   111k|	if (!appender->active)
  ------------------
  |  Branch (239:6): [True: 1, False: 111k]
  ------------------
  240|      1|		if (!WLog_OpenAppender(log))
  ------------------
  |  Branch (240:7): [True: 0, False: 1]
  ------------------
  241|      0|			return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  242|       |
  243|   111k|	EnterCriticalSection(&appender->lock);
  244|       |
  245|   111k|	if (appender->WriteMessage)
  ------------------
  |  Branch (245:6): [True: 111k, False: 0]
  ------------------
  246|   111k|	{
  247|   111k|		if (appender->recursive)
  ------------------
  |  Branch (247:7): [True: 0, False: 111k]
  ------------------
  248|      0|			status = log_recursion(message->FileName, message->FunctionName, message->LineNumber);
  249|   111k|		else
  250|   111k|		{
  251|   111k|			appender->recursive = TRUE;
  ------------------
  |  |  126|   111k|#define TRUE true
  ------------------
  252|   111k|			status = appender->WriteMessage(log, appender, message);
  253|   111k|			appender->recursive = FALSE;
  ------------------
  |  |  122|   111k|#define FALSE false
  ------------------
  254|   111k|		}
  255|   111k|	}
  256|       |
  257|   111k|	LeaveCriticalSection(&appender->lock);
  258|   111k|	return status;
  259|   111k|}
wlog.c:WLog_GetFilterLogLevel:
  767|      2|{
  768|      2|	BOOL match = FALSE;
  ------------------
  |  |  122|      2|#define FALSE false
  ------------------
  769|       |
  770|      2|	if (log->FilterLevel >= 0)
  ------------------
  |  Branch (770:6): [True: 0, False: 2]
  ------------------
  771|      0|		return log->FilterLevel;
  772|       |
  773|      2|	log->FilterLevel = WLOG_FILTER_NOT_FILTERED;
  ------------------
  |  |   52|      2|#define WLOG_FILTER_NOT_FILTERED (-1)
  ------------------
  774|      2|	for (DWORD i = 0; i < g_FilterCount; i++)
  ------------------
  |  Branch (774:20): [True: 0, False: 2]
  ------------------
  775|      0|	{
  776|      0|		const wLogFilter* filter = &g_Filters[i];
  777|      0|		for (DWORD j = 0; j < filter->NameCount; j++)
  ------------------
  |  Branch (777:21): [True: 0, False: 0]
  ------------------
  778|      0|		{
  779|      0|			if (j >= log->NameCount)
  ------------------
  |  Branch (779:8): [True: 0, False: 0]
  ------------------
  780|      0|				break;
  781|       |
  782|      0|			if (_stricmp(filter->Names[j], "*") == 0)
  ------------------
  |  Branch (782:8): [True: 0, False: 0]
  ------------------
  783|      0|			{
  784|      0|				match = TRUE;
  ------------------
  |  |  126|      0|#define TRUE true
  ------------------
  785|      0|				assert(filter->Level <= INT32_MAX);
  ------------------
  |  Branch (785:5): [True: 0, False: 0]
  |  Branch (785:5): [True: 0, False: 0]
  ------------------
  786|      0|				log->FilterLevel = (LONG)filter->Level;
  787|      0|				break;
  788|      0|			}
  789|       |
  790|      0|			if (_stricmp(filter->Names[j], log->Names[j]) != 0)
  ------------------
  |  Branch (790:8): [True: 0, False: 0]
  ------------------
  791|      0|				break;
  792|       |
  793|      0|			if (j == (log->NameCount - 1))
  ------------------
  |  Branch (793:8): [True: 0, False: 0]
  ------------------
  794|      0|			{
  795|      0|				match = log->NameCount == filter->NameCount;
  796|      0|				if (match)
  ------------------
  |  Branch (796:9): [True: 0, False: 0]
  ------------------
  797|      0|				{
  798|      0|					assert(filter->Level <= INT32_MAX);
  ------------------
  |  Branch (798:6): [True: 0, False: 0]
  |  Branch (798:6): [True: 0, False: 0]
  ------------------
  799|      0|					log->FilterLevel = (LONG)filter->Level;
  800|      0|				}
  801|      0|				break;
  802|      0|			}
  803|      0|		}
  804|       |
  805|      0|		if (match)
  ------------------
  |  Branch (805:7): [True: 0, False: 0]
  ------------------
  806|      0|			break;
  807|      0|	}
  808|       |
  809|      2|	return log->FilterLevel;
  810|      2|}
wlog.c:WLog_InitializeRoot:
  113|      1|{
  114|      1|	char* env = nullptr;
  115|      1|	DWORD nSize = 0;
  116|      1|	DWORD logAppenderType = 0;
  117|      1|	LPCSTR appender = "WLOG_APPENDER";
  118|       |
  119|      1|	WINPR_UNUSED(InitOnce);
  ------------------
  |  |  715|      1|#define WINPR_UNUSED(x) (void)(x)
  ------------------
  120|      1|	WINPR_UNUSED(Parameter);
  ------------------
  |  |  715|      1|#define WINPR_UNUSED(x) (void)(x)
  ------------------
  121|      1|	WINPR_UNUSED(Context);
  ------------------
  |  |  715|      1|#define WINPR_UNUSED(x) (void)(x)
  ------------------
  122|       |
  123|      1|	if (!(g_RootLog = WLog_New("", nullptr)))
  ------------------
  |  Branch (123:6): [True: 0, False: 1]
  ------------------
  124|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  125|       |
  126|      1|	g_RootLog->IsRoot = TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  127|      1|	logAppenderType = WLOG_APPENDER_CONSOLE;
  128|      1|	nSize = GetEnvironmentVariableA(appender, nullptr, 0);
  129|       |
  130|      1|	if (nSize)
  ------------------
  |  Branch (130:6): [True: 0, False: 1]
  ------------------
  131|      0|	{
  132|      0|		env = (LPSTR)malloc(nSize);
  133|       |
  134|      0|		if (!env)
  ------------------
  |  Branch (134:7): [True: 0, False: 0]
  ------------------
  135|      0|			goto fail;
  136|       |
  137|      0|		if (GetEnvironmentVariableA(appender, env, nSize) != nSize - 1)
  ------------------
  |  Branch (137:7): [True: 0, False: 0]
  ------------------
  138|      0|		{
  139|      0|			(void)fprintf(stderr, "%s environment variable modified in my back", appender);
  140|      0|			free(env);
  141|      0|			goto fail;
  142|      0|		}
  143|       |
  144|      0|		if (_stricmp(env, "CONSOLE") == 0)
  ------------------
  |  Branch (144:7): [True: 0, False: 0]
  ------------------
  145|      0|			logAppenderType = WLOG_APPENDER_CONSOLE;
  146|      0|		else if (_stricmp(env, "FILE") == 0)
  ------------------
  |  Branch (146:12): [True: 0, False: 0]
  ------------------
  147|      0|			logAppenderType = WLOG_APPENDER_FILE;
  148|      0|		else if (_stricmp(env, "BINARY") == 0)
  ------------------
  |  Branch (148:12): [True: 0, False: 0]
  ------------------
  149|      0|			logAppenderType = WLOG_APPENDER_BINARY;
  150|       |
  151|      0|#ifdef WINPR_HAVE_SYSLOG_H
  152|      0|		else if (_stricmp(env, "SYSLOG") == 0)
  ------------------
  |  Branch (152:12): [True: 0, False: 0]
  ------------------
  153|      0|			logAppenderType = WLOG_APPENDER_SYSLOG;
  154|       |
  155|      0|#endif /* WINPR_HAVE_SYSLOG_H */
  156|       |#ifdef WINPR_HAVE_JOURNALD_H
  157|       |		else if (_stricmp(env, "JOURNALD") == 0)
  158|       |			logAppenderType = WLOG_APPENDER_JOURNALD;
  159|       |
  160|       |#endif
  161|      0|		else if (_stricmp(env, "UDP") == 0)
  ------------------
  |  Branch (161:12): [True: 0, False: 0]
  ------------------
  162|      0|			logAppenderType = WLOG_APPENDER_UDP;
  163|       |
  164|      0|		free(env);
  165|      0|	}
  166|       |
  167|      1|	if (!WLog_SetLogAppenderType(g_RootLog, logAppenderType))
  ------------------
  |  Branch (167:6): [True: 0, False: 1]
  ------------------
  168|      0|		goto fail;
  169|       |
  170|      1|	if (!WLog_ParseFilters(g_RootLog))
  ------------------
  |  Branch (170:6): [True: 0, False: 1]
  ------------------
  171|      0|		goto fail;
  172|       |
  173|      1|	(void)winpr_atexit(WLog_Uninit_);
  174|       |
  175|      1|	return TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  176|      0|fail:
  177|      0|	WLog_Uninit_();
  178|      0|	return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  179|      1|}
wlog.c:WLog_ParseFilters:
  741|      1|{
  742|      1|	LPCSTR filter = "WLOG_FILTER";
  743|      1|	BOOL res = FALSE;
  ------------------
  |  |  122|      1|#define FALSE false
  ------------------
  744|      1|	char* env = nullptr;
  745|      1|	DWORD nSize = 0;
  746|      1|	free(g_Filters);
  747|      1|	g_Filters = nullptr;
  748|      1|	g_FilterCount = 0;
  749|      1|	nSize = GetEnvironmentVariableA(filter, nullptr, 0);
  750|       |
  751|      1|	if (nSize < 1)
  ------------------
  |  Branch (751:6): [True: 1, False: 0]
  ------------------
  752|      1|		return TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  753|       |
  754|      0|	env = (LPSTR)malloc(nSize);
  755|       |
  756|      0|	if (!env)
  ------------------
  |  Branch (756:6): [True: 0, False: 0]
  ------------------
  757|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  758|       |
  759|      0|	if (GetEnvironmentVariableA(filter, env, nSize) == nSize - 1)
  ------------------
  |  Branch (759:6): [True: 0, False: 0]
  ------------------
  760|      0|		res = WLog_AddStringLogFilters_int(root, env);
  761|       |
  762|      0|	free(env);
  763|      0|	return res;
  764|      0|}
wlog.c:WLog_Uninit_:
   81|      1|{
   82|      1|	wLog* child = nullptr;
   83|      1|	wLog* root = g_RootLog;
   84|       |
   85|      1|	if (!root)
  ------------------
  |  Branch (85:6): [True: 0, False: 1]
  ------------------
   86|      0|		return;
   87|       |
   88|      2|	for (DWORD index = 0; index < root->ChildrenCount; index++)
  ------------------
  |  Branch (88:24): [True: 1, False: 1]
  ------------------
   89|      1|	{
   90|      1|		child = root->Children[index];
   91|      1|		WLog_Free(child);
   92|      1|	}
   93|       |
   94|      1|	WLog_Free(root);
   95|      1|	g_RootLog = nullptr;
   96|      1|	free(g_GlobalPrefix);
   97|      1|	g_GlobalPrefix = nullptr;
   98|      1|}
wlog.c:WLog_Get_int:
 1031|      1|{
 1032|      1|	wLog* log = nullptr;
 1033|       |
 1034|      1|	if (!(log = WLog_FindChild(root, name)))
  ------------------
  |  Branch (1034:6): [True: 1, False: 0]
  ------------------
 1035|      1|	{
 1036|      1|		if (!root)
  ------------------
  |  Branch (1036:7): [True: 0, False: 1]
  ------------------
 1037|      0|			return nullptr;
 1038|       |
 1039|      1|		if (!(log = WLog_New(name, root)))
  ------------------
  |  Branch (1039:7): [True: 0, False: 1]
  ------------------
 1040|      0|			return nullptr;
 1041|       |
 1042|      1|		if (!WLog_AddChild(root, log))
  ------------------
  |  Branch (1042:7): [True: 0, False: 1]
  ------------------
 1043|      0|		{
 1044|      0|			WLog_Free(log);
 1045|      0|			return nullptr;
 1046|      0|		}
 1047|      1|	}
 1048|       |
 1049|      1|	return log;
 1050|      1|}
wlog.c:WLog_FindChild:
 1006|      1|{
 1007|      1|	wLog* child = nullptr;
 1008|       |
 1009|      1|	if (!root)
  ------------------
  |  Branch (1009:6): [True: 0, False: 1]
  ------------------
 1010|      0|		return nullptr;
 1011|       |
 1012|      1|	WLog_Lock(root);
 1013|       |
 1014|      1|	for (DWORD index = 0; index < root->ChildrenCount; index++)
  ------------------
  |  Branch (1014:24): [True: 0, False: 1]
  ------------------
 1015|      0|	{
 1016|      0|		wLog* cchild = root->Children[index];
 1017|       |
 1018|      0|		if (strcmp(cchild->Name, name) == 0)
  ------------------
  |  Branch (1018:7): [True: 0, False: 0]
  ------------------
 1019|      0|		{
 1020|      0|			child = cchild;
 1021|      0|			break;
 1022|      0|		}
 1023|      0|	}
 1024|       |
 1025|      1|	WLog_Unlock(root);
 1026|       |
 1027|      1|	return child;
 1028|      1|}
wlog.c:WLog_Lock:
  101|      2|{
  102|      2|	WINPR_ASSERT(log);
  ------------------
  |  |   76|      2|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      2|	do                                                                                             \
  |  |  |  |   61|      2|	{                                                                                              \
  |  |  |  |   62|      2|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      2|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      2|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      2|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      2|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      2|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      2|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      2|                                                                                                   \
  |  |  |  |   70|      2|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      2|	do                                                      \
  |  |  |  |  |  |   32|      2|	{                                                       \
  |  |  |  |  |  |   33|      2|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      2|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      2|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      2|                                                                                                   \
  |  |  |  |   72|      2|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      2|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      2|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|      2|	EnterCriticalSection(&log->lock);
  104|      2|}
wlog.c:WLog_Unlock:
  107|      2|{
  108|      2|	WINPR_ASSERT(log);
  ------------------
  |  |   76|      2|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      2|	do                                                                                             \
  |  |  |  |   61|      2|	{                                                                                              \
  |  |  |  |   62|      2|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      2|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      2|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      2|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      2|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      2|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      2|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      2|                                                                                                   \
  |  |  |  |   70|      2|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      2|	do                                                      \
  |  |  |  |  |  |   32|      2|	{                                                       \
  |  |  |  |  |  |   33|      2|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      2|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      2|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      2|                                                                                                   \
  |  |  |  |   72|      2|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      2|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      2|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      2|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|      2|	LeaveCriticalSection(&log->lock);
  110|      2|}
wlog.c:WLog_AddChild:
  962|      1|{
  963|      1|	BOOL status = FALSE;
  ------------------
  |  |  122|      1|#define FALSE false
  ------------------
  964|       |
  965|      1|	WLog_Lock(parent);
  966|       |
  967|      1|	if (parent->ChildrenCount >= parent->ChildrenSize)
  ------------------
  |  Branch (967:6): [True: 1, False: 0]
  ------------------
  968|      1|	{
  969|      1|		parent->ChildrenSize = parent->ChildrenCount + 4;
  970|       |
  971|      1|		if (parent->ChildrenSize == 0)
  ------------------
  |  Branch (971:7): [True: 0, False: 1]
  ------------------
  972|      0|		{
  973|      0|			free((void*)parent->Children);
  974|      0|			parent->Children = nullptr;
  975|      0|		}
  976|      1|		else
  977|      1|		{
  978|      1|			wLog** tmp =
  979|      1|			    (wLog**)realloc((void*)parent->Children, sizeof(wLog*) * parent->ChildrenSize);
  980|       |
  981|      1|			if (!tmp)
  ------------------
  |  Branch (981:8): [True: 0, False: 1]
  ------------------
  982|      0|			{
  983|      0|				free((void*)parent->Children);
  984|      0|				parent->Children = nullptr;
  985|      0|				goto exit;
  986|      0|			}
  987|       |
  988|      1|			parent->Children = tmp;
  989|      1|		}
  990|      1|	}
  991|       |
  992|      1|	if (!parent->Children)
  ------------------
  |  Branch (992:6): [True: 0, False: 1]
  ------------------
  993|      0|		goto exit;
  994|       |
  995|      1|	parent->Children[parent->ChildrenCount++] = child;
  996|      1|	child->Parent = parent;
  997|       |
  998|      1|	WLog_Unlock(parent);
  999|       |
 1000|      1|	status = TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
 1001|      1|exit:
 1002|      1|	return status;
 1003|      1|}
wlog.c:WLog_New:
  857|      2|{
  858|      2|	wLog* log = nullptr;
  859|      2|	char* env = nullptr;
  860|      2|	DWORD nSize = 0;
  861|      2|	int iLevel = 0;
  862|      2|	log = (wLog*)calloc(1, sizeof(wLog));
  863|       |
  864|      2|	if (!log)
  ------------------
  |  Branch (864:6): [True: 0, False: 2]
  ------------------
  865|      0|		return nullptr;
  866|       |
  867|      2|	log->Name = _strdup(name);
  868|       |
  869|      2|	if (!log->Name)
  ------------------
  |  Branch (869:6): [True: 0, False: 2]
  ------------------
  870|      0|		goto out_fail;
  871|       |
  872|      2|	if (!WLog_ParseName(log, name))
  ------------------
  |  Branch (872:6): [True: 0, False: 2]
  ------------------
  873|      0|		goto out_fail;
  874|       |
  875|      2|	log->Parent = rootLogger;
  876|      2|	log->FilterLevel = WLOG_FILTER_NOT_INITIALIZED;
  ------------------
  |  |   53|      2|#define WLOG_FILTER_NOT_INITIALIZED (-2)
  ------------------
  877|       |
  878|      2|	if (rootLogger)
  ------------------
  |  Branch (878:6): [True: 1, False: 1]
  ------------------
  879|      1|	{
  880|      1|		log->Level = WLOG_LEVEL_INHERIT;
  881|      1|		log->inherit = TRUE;
  ------------------
  |  |  126|      1|#define TRUE true
  ------------------
  882|      1|	}
  883|      1|	else
  884|      1|	{
  885|      1|		LPCSTR level = "WLOG_LEVEL";
  886|      1|		log->Level = WLOG_INFO;
  887|      1|		nSize = GetEnvironmentVariableA(level, nullptr, 0);
  888|       |
  889|      1|		if (nSize)
  ------------------
  |  Branch (889:7): [True: 0, False: 1]
  ------------------
  890|      0|		{
  891|      0|			env = (LPSTR)malloc(nSize);
  892|       |
  893|      0|			if (!env)
  ------------------
  |  Branch (893:8): [True: 0, False: 0]
  ------------------
  894|      0|				goto out_fail;
  895|       |
  896|      0|			if (GetEnvironmentVariableA(level, env, nSize) != nSize - 1)
  ------------------
  |  Branch (896:8): [True: 0, False: 0]
  ------------------
  897|      0|			{
  898|      0|				(void)fprintf(stderr, "%s environment variable changed in my back !\n", level);
  899|      0|				free(env);
  900|      0|				goto out_fail;
  901|      0|			}
  902|       |
  903|      0|			iLevel = WLog_ParseLogLevel(env);
  904|      0|			free(env);
  905|       |
  906|      0|			if (iLevel >= 0)
  ------------------
  |  Branch (906:8): [True: 0, False: 0]
  ------------------
  907|      0|			{
  908|      0|				if (!WLog_SetLogLevel(log, (DWORD)iLevel))
  ------------------
  |  Branch (908:9): [True: 0, False: 0]
  ------------------
  909|      0|					goto out_fail;
  910|      0|			}
  911|      0|		}
  912|      1|	}
  913|       |
  914|      2|	iLevel = WLog_GetFilterLogLevel(log);
  915|       |
  916|      2|	if (iLevel >= 0)
  ------------------
  |  Branch (916:6): [True: 0, False: 2]
  ------------------
  917|      0|	{
  918|      0|		if (!WLog_SetLogLevel(log, (DWORD)iLevel))
  ------------------
  |  Branch (918:7): [True: 0, False: 0]
  ------------------
  919|      0|			goto out_fail;
  920|      0|	}
  921|       |
  922|      2|	if (!InitializeCriticalSectionAndSpinCount(&log->lock, 4000))
  ------------------
  |  Branch (922:6): [True: 0, False: 2]
  ------------------
  923|      0|		goto out_fail;
  924|       |
  925|      2|	return log;
  926|      0|out_fail:
  927|      0|	WLog_Free(log);
  928|      0|	return nullptr;
  929|      2|}
wlog.c:WLog_ParseName:
  813|      2|{
  814|      2|	const char* cp = name;
  815|      2|	char* p = nullptr;
  816|      2|	size_t count = 1;
  817|      2|	LPSTR names = nullptr;
  818|       |
  819|      4|	while ((cp = strchr(cp, '.')) != nullptr)
  ------------------
  |  Branch (819:9): [True: 2, False: 2]
  ------------------
  820|      2|	{
  821|      2|		count++;
  822|      2|		cp++;
  823|      2|	}
  824|       |
  825|      2|	names = _strdup(name);
  826|       |
  827|      2|	if (!names)
  ------------------
  |  Branch (827:6): [True: 0, False: 2]
  ------------------
  828|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  829|       |
  830|      2|	log->NameCount = count;
  831|      2|	log->Names = (LPSTR*)calloc((count + 1UL), sizeof(LPSTR));
  832|       |
  833|      2|	if (!log->Names)
  ------------------
  |  Branch (833:6): [True: 0, False: 2]
  ------------------
  834|      0|	{
  835|      0|		free(names);
  836|      0|		return FALSE;
  ------------------
  |  |  122|      0|#define FALSE false
  ------------------
  837|      0|	}
  838|       |
  839|      2|	log->Names[count] = nullptr;
  840|      2|	count = 0;
  841|      2|	p = (char*)names;
  842|      2|	log->Names[count++] = p;
  843|       |
  844|      4|	while ((p = strchr(p, '.')) != nullptr)
  ------------------
  |  Branch (844:9): [True: 2, False: 2]
  ------------------
  845|      2|	{
  846|      2|		if (count < log->NameCount)
  ------------------
  |  Branch (846:7): [True: 2, False: 0]
  ------------------
  847|      2|			log->Names[count++] = p + 1;
  848|       |
  849|      2|		*p = '\0';
  850|      2|		p++;
  851|      2|	}
  852|       |
  853|      2|	return TRUE;
  ------------------
  |  |  126|      2|#define TRUE true
  ------------------
  854|      2|}
wlog.c:WLog_Free:
  932|      2|{
  933|      2|	if (log)
  ------------------
  |  Branch (933:6): [True: 2, False: 0]
  ------------------
  934|      2|	{
  935|      2|		if (log->Appender)
  ------------------
  |  Branch (935:7): [True: 1, False: 1]
  ------------------
  936|      1|		{
  937|      1|			WLog_Appender_Free(log, log->Appender);
  938|      1|			log->Appender = nullptr;
  939|      1|		}
  940|       |
  941|      2|		free(log->Name);
  942|       |
  943|       |		/* The first element in this array is allocated, the rest are indices into this variable */
  944|      2|		if (log->Names)
  ------------------
  |  Branch (944:7): [True: 2, False: 0]
  ------------------
  945|      2|			free(log->Names[0]);
  946|      2|		free((void*)log->Names);
  947|      2|		free((void*)log->Children);
  948|      2|		DeleteCriticalSection(&log->lock);
  949|      2|		free(log);
  950|      2|	}
  951|      2|}

