string.c:winpr_Data_Get_UINT16:
   59|    536|	{
   60|    536|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    536|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    536|	do                                                                                             \
  |  |  |  |   61|    536|	{                                                                                              \
  |  |  |  |   62|    536|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    536|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    536|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    536|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    536|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    536|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    536|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    536|                                                                                                   \
  |  |  |  |   70|    536|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    536|	do                                                      \
  |  |  |  |  |  |   32|    536|	{                                                       \
  |  |  |  |  |  |   33|    536|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 536]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    536|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    536|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 536]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    536|                                                                                                   \
  |  |  |  |   72|    536|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    536|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    536|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    536|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 536]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|    536|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|    536|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    536|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
   62|    536|		const size_t typesize = sizeof(UINT16);
   63|    536|		UINT16 v = 0;
   64|  1.60k|		for (size_t x = 0; x < typesize; x++)
  ------------------
  |  Branch (64:22): [True: 1.07k, False: 536]
  ------------------
   65|  1.07k|		{
   66|  1.07k|			v <<= 8;
   67|  1.07k|			v |= ptr[typesize - x - 1];
   68|  1.07k|		}
   69|    536|		return v;
   70|    536|	}
string.c:winpr_Data_Write_UINT16:
  235|    536|	{
  236|    536|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    536|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    536|	do                                                                                             \
  |  |  |  |   61|    536|	{                                                                                              \
  |  |  |  |   62|    536|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    536|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    536|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    536|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    536|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    536|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    536|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    536|                                                                                                   \
  |  |  |  |   70|    536|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    536|	do                                                      \
  |  |  |  |  |  |   32|    536|	{                                                       \
  |  |  |  |  |  |   33|    536|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 536]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    536|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    536|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 536]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    536|                                                                                                   \
  |  |  |  |   72|    536|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    536|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    536|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    536|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 536]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|    536|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|    536|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    536|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  238|    536|		b[0] = v & 0xFF;
  239|    536|		b[1] = (v >> 8) & 0xFF;
  240|    536|	}
ntlm_message.c:winpr_Data_Get_UINT16:
   59|  8.57k|	{
   60|  8.57k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  8.57k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  8.57k|	do                                                                                             \
  |  |  |  |   61|  8.57k|	{                                                                                              \
  |  |  |  |   62|  8.57k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  8.57k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  8.57k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  8.57k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  8.57k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  8.57k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  8.57k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  8.57k|                                                                                                   \
  |  |  |  |   70|  8.57k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  8.57k|	do                                                      \
  |  |  |  |  |  |   32|  8.57k|	{                                                       \
  |  |  |  |  |  |   33|  8.57k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 8.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  8.57k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  8.57k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 8.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  8.57k|                                                                                                   \
  |  |  |  |   72|  8.57k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  8.57k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  8.57k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  8.57k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 8.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|  8.57k|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|  8.57k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  8.57k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
   62|  8.57k|		const size_t typesize = sizeof(UINT16);
   63|  8.57k|		UINT16 v = 0;
   64|  25.7k|		for (size_t x = 0; x < typesize; x++)
  ------------------
  |  Branch (64:22): [True: 17.1k, False: 8.57k]
  ------------------
   65|  17.1k|		{
   66|  17.1k|			v <<= 8;
   67|  17.1k|			v |= ptr[typesize - x - 1];
   68|  17.1k|		}
   69|  8.57k|		return v;
   70|  8.57k|	}
ntlm_message.c:winpr_Data_Write_UINT32:
  258|  6.65k|	{
  259|  6.65k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  6.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.65k|	do                                                                                             \
  |  |  |  |   61|  6.65k|	{                                                                                              \
  |  |  |  |   62|  6.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.65k|                                                                                                   \
  |  |  |  |   70|  6.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.65k|	do                                                      \
  |  |  |  |  |  |   32|  6.65k|	{                                                       \
  |  |  |  |  |  |   33|  6.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.65k|                                                                                                   \
  |  |  |  |   72|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.65k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|  6.65k|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|  6.65k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  6.65k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  261|  6.65k|		winpr_Data_Write_UINT16(b, v & 0xFFFF);
  262|  6.65k|		winpr_Data_Write_UINT16(b + 2, (v >> 16) & 0xFFFF);
  263|  6.65k|	}
ntlm_message.c:winpr_Data_Write_UINT16:
  235|  20.2k|	{
  236|  20.2k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  20.2k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  20.2k|	do                                                                                             \
  |  |  |  |   61|  20.2k|	{                                                                                              \
  |  |  |  |   62|  20.2k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  20.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  20.2k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  20.2k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  20.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  20.2k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  20.2k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  20.2k|                                                                                                   \
  |  |  |  |   70|  20.2k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  20.2k|	do                                                      \
  |  |  |  |  |  |   32|  20.2k|	{                                                       \
  |  |  |  |  |  |   33|  20.2k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  20.2k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  20.2k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 20.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  20.2k|                                                                                                   \
  |  |  |  |   72|  20.2k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  20.2k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  20.2k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  20.2k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|  20.2k|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|  20.2k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  20.2k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  238|  20.2k|		b[0] = v & 0xFF;
  239|  20.2k|		b[1] = (v >> 8) & 0xFF;
  240|  20.2k|	}
ntlm_message.c:winpr_Data_Get_UINT32:
  113|  7.47k|	{
  114|  7.47k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  7.47k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  7.47k|	do                                                                                             \
  |  |  |  |   61|  7.47k|	{                                                                                              \
  |  |  |  |   62|  7.47k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  7.47k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  7.47k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  7.47k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  7.47k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  7.47k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  7.47k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  7.47k|                                                                                                   \
  |  |  |  |   70|  7.47k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  7.47k|	do                                                      \
  |  |  |  |  |  |   32|  7.47k|	{                                                       \
  |  |  |  |  |  |   33|  7.47k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  7.47k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  7.47k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  7.47k|                                                                                                   \
  |  |  |  |   72|  7.47k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  7.47k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  7.47k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  7.47k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 7.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|  7.47k|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|  7.47k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  7.47k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  116|  7.47k|		const size_t typesize = sizeof(UINT32);
  117|  7.47k|		UINT32 v = 0;
  118|  37.3k|		for (size_t x = 0; x < typesize; x++)
  ------------------
  |  Branch (118:22): [True: 29.9k, False: 7.47k]
  ------------------
  119|  29.9k|		{
  120|  29.9k|			v <<= 8;
  121|  29.9k|			v |= ptr[typesize - x - 1];
  122|  29.9k|		}
  123|  7.47k|		return v;
  124|  7.47k|	}
ntlm_av_pairs.c:winpr_Data_Get_UINT16:
   59|  77.8k|	{
   60|  77.8k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  77.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  77.8k|	do                                                                                             \
  |  |  |  |   61|  77.8k|	{                                                                                              \
  |  |  |  |   62|  77.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  77.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  77.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  77.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  77.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  77.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  77.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  77.8k|                                                                                                   \
  |  |  |  |   70|  77.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  77.8k|	do                                                      \
  |  |  |  |  |  |   32|  77.8k|	{                                                       \
  |  |  |  |  |  |   33|  77.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 77.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  77.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  77.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 77.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  77.8k|                                                                                                   \
  |  |  |  |   72|  77.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  77.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  77.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  77.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 77.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|  77.8k|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|  77.8k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  77.8k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
   62|  77.8k|		const size_t typesize = sizeof(UINT16);
   63|  77.8k|		UINT16 v = 0;
   64|   233k|		for (size_t x = 0; x < typesize; x++)
  ------------------
  |  Branch (64:22): [True: 155k, False: 77.8k]
  ------------------
   65|   155k|		{
   66|   155k|			v <<= 8;
   67|   155k|			v |= ptr[typesize - x - 1];
   68|   155k|		}
   69|  77.8k|		return v;
   70|  77.8k|	}
ntlm_av_pairs.c:winpr_Data_Write_UINT16:
  235|  17.3k|	{
  236|  17.3k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  17.3k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  17.3k|	do                                                                                             \
  |  |  |  |   61|  17.3k|	{                                                                                              \
  |  |  |  |   62|  17.3k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  17.3k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  17.3k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  17.3k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  17.3k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  17.3k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  17.3k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  17.3k|                                                                                                   \
  |  |  |  |   70|  17.3k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  17.3k|	do                                                      \
  |  |  |  |  |  |   32|  17.3k|	{                                                       \
  |  |  |  |  |  |   33|  17.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 17.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  17.3k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  17.3k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  17.3k|                                                                                                   \
  |  |  |  |   72|  17.3k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  17.3k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  17.3k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  17.3k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 17.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|  17.3k|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|  17.3k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  17.3k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  238|  17.3k|		b[0] = v & 0xFF;
  239|  17.3k|		b[1] = (v >> 8) & 0xFF;
  240|  17.3k|	}
ntlm_av_pairs.c:winpr_Data_Write_UINT32:
  258|    288|	{
  259|    288|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    288|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    288|	do                                                                                             \
  |  |  |  |   61|    288|	{                                                                                              \
  |  |  |  |   62|    288|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    288|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    288|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    288|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    288|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    288|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    288|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    288|                                                                                                   \
  |  |  |  |   70|    288|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    288|	do                                                      \
  |  |  |  |  |  |   32|    288|	{                                                       \
  |  |  |  |  |  |   33|    288|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 288]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    288|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    288|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 288]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    288|                                                                                                   \
  |  |  |  |   72|    288|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    288|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    288|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    288|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 288]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|    288|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|    288|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    288|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  261|    288|		winpr_Data_Write_UINT16(b, v & 0xFFFF);
  262|    288|		winpr_Data_Write_UINT16(b + 2, (v >> 16) & 0xFFFF);
  263|    288|	}
ntlm_compute.c:winpr_Data_Get_UINT8:
   39|  2.69k|	{
   40|  2.69k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  2.69k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.69k|	do                                                                                             \
  |  |  |  |   61|  2.69k|	{                                                                                              \
  |  |  |  |   62|  2.69k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.69k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.69k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.69k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.69k|                                                                                                   \
  |  |  |  |   70|  2.69k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.69k|	do                                                      \
  |  |  |  |  |  |   32|  2.69k|	{                                                       \
  |  |  |  |  |  |   33|  2.69k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.69k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.69k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.69k|                                                                                                   \
  |  |  |  |   72|  2.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.69k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.69k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.69k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   41|  2.69k|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|  2.69k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  2.69k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
   42|  2.69k|		return *ptr;
   43|  2.69k|	}
ntlm_compute.c:winpr_Data_Get_UINT16:
   59|    964|	{
   60|    964|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    964|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    964|	do                                                                                             \
  |  |  |  |   61|    964|	{                                                                                              \
  |  |  |  |   62|    964|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    964|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    964|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    964|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    964|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    964|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    964|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    964|                                                                                                   \
  |  |  |  |   70|    964|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    964|	do                                                      \
  |  |  |  |  |  |   32|    964|	{                                                       \
  |  |  |  |  |  |   33|    964|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 964]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    964|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    964|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 964]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    964|                                                                                                   \
  |  |  |  |   72|    964|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    964|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    964|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    964|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 964]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|    964|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|    964|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    964|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
   62|    964|		const size_t typesize = sizeof(UINT16);
   63|    964|		UINT16 v = 0;
   64|  2.89k|		for (size_t x = 0; x < typesize; x++)
  ------------------
  |  Branch (64:22): [True: 1.92k, False: 964]
  ------------------
   65|  1.92k|		{
   66|  1.92k|			v <<= 8;
   67|  1.92k|			v |= ptr[typesize - x - 1];
   68|  1.92k|		}
   69|    964|		return v;
   70|    964|	}
ntlm_compute.c:winpr_Data_Write_UINT8:
  221|  4.76k|	{
  222|  4.76k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  4.76k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.76k|	do                                                                                             \
  |  |  |  |   61|  4.76k|	{                                                                                              \
  |  |  |  |   62|  4.76k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.76k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.76k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.76k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.76k|                                                                                                   \
  |  |  |  |   70|  4.76k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.76k|	do                                                      \
  |  |  |  |  |  |   32|  4.76k|	{                                                       \
  |  |  |  |  |  |   33|  4.76k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.76k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.76k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.76k|                                                                                                   \
  |  |  |  |   72|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.76k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.76k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.76k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  4.76k|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|  4.76k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  4.76k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  224|  4.76k|		*b = v;
  225|  4.76k|	}
ntlm_compute.c:winpr_Data_Write_UINT16:
  235|  1.58k|	{
  236|  1.58k|		WINPR_ASSERT(d);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|  1.58k|		BYTE* b = WINPR_ENDIAN_CAST(BYTE*, d);
  ------------------
  |  |   31|  1.58k|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  1.58k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  238|  1.58k|		b[0] = v & 0xFF;
  239|  1.58k|		b[1] = (v >> 8) & 0xFF;
  240|  1.58k|	}
ntlm_compute.c:winpr_Data_Get_UINT32:
  113|    394|	{
  114|    394|		WINPR_ASSERT(d);
  ------------------
  |  |   76|    394|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    394|	do                                                                                             \
  |  |  |  |   61|    394|	{                                                                                              \
  |  |  |  |   62|    394|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    394|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    394|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    394|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    394|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    394|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    394|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    394|                                                                                                   \
  |  |  |  |   70|    394|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    394|	do                                                      \
  |  |  |  |  |  |   32|    394|	{                                                       \
  |  |  |  |  |  |   33|    394|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 394]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    394|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    394|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 394]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    394|                                                                                                   \
  |  |  |  |   72|    394|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    394|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    394|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    394|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 394]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|    394|		const UINT8* ptr = WINPR_ENDIAN_CAST(const UINT8*, d);
  ------------------
  |  |   31|    394|#define WINPR_ENDIAN_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    394|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  116|    394|		const size_t typesize = sizeof(UINT32);
  117|    394|		UINT32 v = 0;
  118|  1.97k|		for (size_t x = 0; x < typesize; x++)
  ------------------
  |  Branch (118:22): [True: 1.57k, False: 394]
  ------------------
  119|  1.57k|		{
  120|  1.57k|			v <<= 8;
  121|  1.57k|			v |= ptr[typesize - x - 1];
  122|  1.57k|		}
  123|    394|		return v;
  124|    394|	}

stream.c:Stream_Capacity:
 1334|  3.22k|	{
 1335|  3.22k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  3.22k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.22k|	do                                                                                             \
  |  |  |  |   61|  3.22k|	{                                                                                              \
  |  |  |  |   62|  3.22k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.22k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.22k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.22k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.22k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.22k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.22k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.22k|                                                                                                   \
  |  |  |  |   70|  3.22k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.22k|	do                                                      \
  |  |  |  |  |  |   32|  3.22k|	{                                                       \
  |  |  |  |  |  |   33|  3.22k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.22k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.22k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.22k|                                                                                                   \
  |  |  |  |   72|  3.22k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.22k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.22k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.22k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1336|  3.22k|		return _s->capacity;
 1337|  3.22k|	}
ntlm_message.c:stream_read_u32_le:
  244|  7.37k|	{
  245|  7.37k|		const size_t typesize = sizeof(UINT32);
  246|  7.37k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  7.37k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  7.37k|	do                                                                                             \
  |  |  |  |   61|  7.37k|	{                                                                                              \
  |  |  |  |   62|  7.37k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  7.37k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  7.37k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  7.37k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  7.37k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  7.37k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  7.37k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  7.37k|                                                                                                   \
  |  |  |  |   70|  7.37k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  7.37k|	do                                                      \
  |  |  |  |  |  |   32|  7.37k|	{                                                       \
  |  |  |  |  |  |   33|  7.37k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 7.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  7.37k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  7.37k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  7.37k|                                                                                                   \
  |  |  |  |   72|  7.37k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  7.37k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  7.37k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  7.37k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 7.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|  7.37k|		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize);
  ------------------
  |  |   76|  7.37k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  7.37k|	do                                                                                             \
  |  |  |  |   61|  7.37k|	{                                                                                              \
  |  |  |  |   62|  7.37k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  7.37k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  7.37k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  7.37k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  7.37k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  7.37k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  7.37k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  7.37k|                                                                                                   \
  |  |  |  |   70|  7.37k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  7.37k|	do                                                      \
  |  |  |  |  |  |   32|  7.37k|	{                                                       \
  |  |  |  |  |  |   33|  7.37k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 7.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  7.37k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  7.37k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  7.37k|                                                                                                   \
  |  |  |  |   72|  7.37k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  7.37k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  7.37k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  7.37k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 7.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|       |
  249|  7.37k|		const UINT32 v = winpr_Data_Get_UINT32(_s->pointer);
  250|  7.37k|		if (seek)
  ------------------
  |  Branch (250:7): [True: 7.37k, False: 0]
  ------------------
  251|  7.37k|			Stream_Seek(_s, typesize);
  252|  7.37k|		return v;
  253|  7.37k|	}
ntlm_message.c:Stream_Seek:
  157|  24.0k|	{
  158|  24.0k|		WINPR_ASSERT(s);
  ------------------
  |  |   76|  24.0k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  24.0k|	do                                                                                             \
  |  |  |  |   61|  24.0k|	{                                                                                              \
  |  |  |  |   62|  24.0k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  24.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  24.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  24.0k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  24.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  24.0k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  24.0k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  24.0k|                                                                                                   \
  |  |  |  |   70|  24.0k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  24.0k|	do                                                      \
  |  |  |  |  |  |   32|  24.0k|	{                                                       \
  |  |  |  |  |  |   33|  24.0k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 24.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  24.0k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  24.0k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 24.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  24.0k|                                                                                                   \
  |  |  |  |   72|  24.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  24.0k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  24.0k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  24.0k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 24.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|  24.0k|		WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset);
  ------------------
  |  |   76|  24.0k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  24.0k|	do                                                                                             \
  |  |  |  |   61|  24.0k|	{                                                                                              \
  |  |  |  |   62|  24.0k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  24.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  24.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  24.0k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  24.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  24.0k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  24.0k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  24.0k|                                                                                                   \
  |  |  |  |   70|  24.0k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  24.0k|	do                                                      \
  |  |  |  |  |  |   32|  24.0k|	{                                                       \
  |  |  |  |  |  |   33|  24.0k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 24.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  24.0k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  24.0k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 24.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  24.0k|                                                                                                   \
  |  |  |  |   72|  24.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  24.0k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  24.0k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  24.0k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 24.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|  24.0k|		s->pointer += (_offset);
  161|  24.0k|	}
ntlm_message.c:stream_read_u16_le:
  196|  8.57k|	{
  197|  8.57k|		const size_t typesize = sizeof(UINT16);
  198|  8.57k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  8.57k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  8.57k|	do                                                                                             \
  |  |  |  |   61|  8.57k|	{                                                                                              \
  |  |  |  |   62|  8.57k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  8.57k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  8.57k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  8.57k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  8.57k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  8.57k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  8.57k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  8.57k|                                                                                                   \
  |  |  |  |   70|  8.57k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  8.57k|	do                                                      \
  |  |  |  |  |  |   32|  8.57k|	{                                                       \
  |  |  |  |  |  |   33|  8.57k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 8.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  8.57k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  8.57k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 8.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  8.57k|                                                                                                   \
  |  |  |  |   72|  8.57k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  8.57k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  8.57k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  8.57k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 8.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|  8.57k|		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize);
  ------------------
  |  |   76|  8.57k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  8.57k|	do                                                                                             \
  |  |  |  |   61|  8.57k|	{                                                                                              \
  |  |  |  |   62|  8.57k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  8.57k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  8.57k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  8.57k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  8.57k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  8.57k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  8.57k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  8.57k|                                                                                                   \
  |  |  |  |   70|  8.57k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  8.57k|	do                                                      \
  |  |  |  |  |  |   32|  8.57k|	{                                                       \
  |  |  |  |  |  |   33|  8.57k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 8.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  8.57k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  8.57k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 8.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  8.57k|                                                                                                   \
  |  |  |  |   72|  8.57k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  8.57k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  8.57k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  8.57k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 8.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|       |
  201|  8.57k|		const UINT16 v = winpr_Data_Get_UINT16(_s->pointer);
  202|  8.57k|		if (seek)
  ------------------
  |  Branch (202:7): [True: 8.57k, False: 0]
  ------------------
  203|  8.57k|			Stream_Seek(_s, typesize);
  204|  8.57k|		return v;
  205|  8.57k|	}
ntlm_message.c:Stream_Length:
 1324|  1.80k|	{
 1325|  1.80k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  1.80k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.80k|	do                                                                                             \
  |  |  |  |   61|  1.80k|	{                                                                                              \
  |  |  |  |   62|  1.80k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.80k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.80k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.80k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.80k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.80k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.80k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.80k|                                                                                                   \
  |  |  |  |   70|  1.80k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.80k|	do                                                      \
  |  |  |  |  |  |   32|  1.80k|	{                                                       \
  |  |  |  |  |  |   33|  1.80k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.80k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.80k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.80k|                                                                                                   \
  |  |  |  |   72|  1.80k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.80k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.80k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.80k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1326|  1.80k|		return _s->length;
 1327|  1.80k|	}
ntlm_message.c:Stream_GetPosition:
 1342|  3.98k|	{
 1343|  3.98k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  3.98k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.98k|	do                                                                                             \
  |  |  |  |   61|  3.98k|	{                                                                                              \
  |  |  |  |   62|  3.98k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.98k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.98k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.98k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.98k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.98k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.98k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.98k|                                                                                                   \
  |  |  |  |   70|  3.98k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.98k|	do                                                      \
  |  |  |  |  |  |   32|  3.98k|	{                                                       \
  |  |  |  |  |  |   33|  3.98k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.98k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.98k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.98k|                                                                                                   \
  |  |  |  |   72|  3.98k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.98k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.98k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.98k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1344|  3.98k|		WINPR_ASSERT(_s->buffer <= _s->pointer);
  ------------------
  |  |   76|  3.98k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.98k|	do                                                                                             \
  |  |  |  |   61|  3.98k|	{                                                                                              \
  |  |  |  |   62|  3.98k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.98k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.98k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.98k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.98k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.98k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.98k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.98k|                                                                                                   \
  |  |  |  |   70|  3.98k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.98k|	do                                                      \
  |  |  |  |  |  |   32|  3.98k|	{                                                       \
  |  |  |  |  |  |   33|  3.98k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.98k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.98k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.98k|                                                                                                   \
  |  |  |  |   72|  3.98k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.98k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.98k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.98k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1345|  3.98k|		return WINPR_STREAM_CAST(size_t, (_s->pointer - _s->buffer));
  ------------------
  |  |   80|  3.98k|#define WINPR_STREAM_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|  3.98k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1346|  3.98k|	}
ntlm_message.c:Stream_Write_UINT32_unchecked:
 1087|  6.65k|	{
 1088|  6.65k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  6.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.65k|	do                                                                                             \
  |  |  |  |   61|  6.65k|	{                                                                                              \
  |  |  |  |   62|  6.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.65k|                                                                                                   \
  |  |  |  |   70|  6.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.65k|	do                                                      \
  |  |  |  |  |  |   32|  6.65k|	{                                                       \
  |  |  |  |  |  |   33|  6.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.65k|                                                                                                   \
  |  |  |  |   72|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.65k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1089|  6.65k|		WINPR_ASSERT(_s->pointer);
  ------------------
  |  |   76|  6.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.65k|	do                                                                                             \
  |  |  |  |   61|  6.65k|	{                                                                                              \
  |  |  |  |   62|  6.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.65k|                                                                                                   \
  |  |  |  |   70|  6.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.65k|	do                                                      \
  |  |  |  |  |  |   32|  6.65k|	{                                                       \
  |  |  |  |  |  |   33|  6.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.65k|                                                                                                   \
  |  |  |  |   72|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.65k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1090|  6.65k|		WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 4);
  ------------------
  |  |   76|  6.65k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.65k|	do                                                                                             \
  |  |  |  |   61|  6.65k|	{                                                                                              \
  |  |  |  |   62|  6.65k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.65k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.65k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.65k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.65k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.65k|                                                                                                   \
  |  |  |  |   70|  6.65k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.65k|	do                                                      \
  |  |  |  |  |  |   32|  6.65k|	{                                                       \
  |  |  |  |  |  |   33|  6.65k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.65k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.65k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.65k|                                                                                                   \
  |  |  |  |   72|  6.65k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.65k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.65k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.65k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1091|       |
 1092|  6.65k|		winpr_Data_Write_UINT32(_s->pointer, _v);
 1093|  6.65k|		_s->pointer += 4;
 1094|  6.65k|	}
ntlm_message.c:Stream_Write_UINT16_unchecked:
  925|  6.92k|	{
  926|  6.92k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  6.92k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.92k|	do                                                                                             \
  |  |  |  |   61|  6.92k|	{                                                                                              \
  |  |  |  |   62|  6.92k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.92k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.92k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.92k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.92k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.92k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.92k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.92k|                                                                                                   \
  |  |  |  |   70|  6.92k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.92k|	do                                                      \
  |  |  |  |  |  |   32|  6.92k|	{                                                       \
  |  |  |  |  |  |   33|  6.92k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.92k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.92k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.92k|                                                                                                   \
  |  |  |  |   72|  6.92k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.92k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.92k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.92k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  6.92k|		WINPR_ASSERT(_s->pointer);
  ------------------
  |  |   76|  6.92k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.92k|	do                                                                                             \
  |  |  |  |   61|  6.92k|	{                                                                                              \
  |  |  |  |   62|  6.92k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.92k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.92k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.92k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.92k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.92k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.92k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.92k|                                                                                                   \
  |  |  |  |   70|  6.92k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.92k|	do                                                      \
  |  |  |  |  |  |   32|  6.92k|	{                                                       \
  |  |  |  |  |  |   33|  6.92k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.92k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.92k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.92k|                                                                                                   \
  |  |  |  |   72|  6.92k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.92k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.92k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.92k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  928|  6.92k|		WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 2);
  ------------------
  |  |   76|  6.92k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  6.92k|	do                                                                                             \
  |  |  |  |   61|  6.92k|	{                                                                                              \
  |  |  |  |   62|  6.92k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  6.92k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  6.92k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  6.92k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  6.92k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  6.92k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  6.92k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  6.92k|                                                                                                   \
  |  |  |  |   70|  6.92k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  6.92k|	do                                                      \
  |  |  |  |  |  |   32|  6.92k|	{                                                       \
  |  |  |  |  |  |   33|  6.92k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  6.92k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  6.92k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 6.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  6.92k|                                                                                                   \
  |  |  |  |   72|  6.92k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  6.92k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  6.92k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  6.92k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 6.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  929|       |
  930|  6.92k|		winpr_Data_Write_UINT16(_s->pointer, _v);
  931|  6.92k|		_s->pointer += 2;
  932|  6.92k|	}
ntlm_message.c:Stream_Read:
  732|  4.03k|	{
  733|  4.03k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  4.03k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.03k|	do                                                                                             \
  |  |  |  |   61|  4.03k|	{                                                                                              \
  |  |  |  |   62|  4.03k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.03k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.03k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.03k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.03k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.03k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.03k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.03k|                                                                                                   \
  |  |  |  |   70|  4.03k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.03k|	do                                                      \
  |  |  |  |  |  |   32|  4.03k|	{                                                       \
  |  |  |  |  |  |   33|  4.03k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.03k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.03k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.03k|                                                                                                   \
  |  |  |  |   72|  4.03k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.03k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.03k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.03k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|  4.03k|		WINPR_ASSERT(_b || (_n == 0));
  ------------------
  |  |   76|  4.03k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.03k|	do                                                                                             \
  |  |  |  |   61|  4.03k|	{                                                                                              \
  |  |  |  |   62|  4.03k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.03k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.03k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.03k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.03k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.03k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.03k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.03k|                                                                                                   \
  |  |  |  |   70|  4.03k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.03k|	do                                                      \
  |  |  |  |  |  |   32|  4.03k|	{                                                       \
  |  |  |  |  |  |   33|  4.03k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:9): [True: 4.03k, False: 0]
  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.03k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.03k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.03k|                                                                                                   \
  |  |  |  |   72|  4.03k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.03k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.03k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.03k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  4.03k|		WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n);
  ------------------
  |  |   76|  4.03k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.03k|	do                                                                                             \
  |  |  |  |   61|  4.03k|	{                                                                                              \
  |  |  |  |   62|  4.03k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.03k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.03k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.03k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.03k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.03k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.03k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.03k|                                                                                                   \
  |  |  |  |   70|  4.03k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.03k|	do                                                      \
  |  |  |  |  |  |   32|  4.03k|	{                                                       \
  |  |  |  |  |  |   33|  4.03k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.03k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.03k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.03k|                                                                                                   \
  |  |  |  |   72|  4.03k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.03k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.03k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.03k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  736|  4.03k|		memcpy(_b, (_s->pointer), (_n));
  737|  4.03k|		Stream_Seek(_s, _n);
  738|  4.03k|	}
ntlm_message.c:Stream_Buffer:
 1264|  1.11k|	{
 1265|  1.11k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  1.11k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.11k|	do                                                                                             \
  |  |  |  |   61|  1.11k|	{                                                                                              \
  |  |  |  |   62|  1.11k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.11k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.11k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.11k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.11k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.11k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.11k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.11k|                                                                                                   \
  |  |  |  |   70|  1.11k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.11k|	do                                                      \
  |  |  |  |  |  |   32|  1.11k|	{                                                       \
  |  |  |  |  |  |   33|  1.11k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.11k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.11k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.11k|                                                                                                   \
  |  |  |  |   72|  1.11k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.11k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.11k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.11k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1266|  1.11k|		return _s->buffer;
 1267|  1.11k|	}
ntlm_message.c:Stream_Write:
 1187|  4.09k|	{
 1188|  4.09k|		if (_n > 0)
  ------------------
  |  Branch (1188:7): [True: 4.09k, False: 0]
  ------------------
 1189|  4.09k|		{
 1190|  4.09k|			WINPR_ASSERT(_s);
  ------------------
  |  |   76|  4.09k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.09k|	do                                                                                             \
  |  |  |  |   61|  4.09k|	{                                                                                              \
  |  |  |  |   62|  4.09k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.09k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.09k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.09k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.09k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.09k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.09k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.09k|                                                                                                   \
  |  |  |  |   70|  4.09k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.09k|	do                                                      \
  |  |  |  |  |  |   32|  4.09k|	{                                                       \
  |  |  |  |  |  |   33|  4.09k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.09k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.09k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.09k|                                                                                                   \
  |  |  |  |   72|  4.09k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.09k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.09k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.09k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1191|  4.09k|			WINPR_ASSERT(_b);
  ------------------
  |  |   76|  4.09k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.09k|	do                                                                                             \
  |  |  |  |   61|  4.09k|	{                                                                                              \
  |  |  |  |   62|  4.09k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.09k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.09k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.09k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.09k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.09k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.09k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.09k|                                                                                                   \
  |  |  |  |   70|  4.09k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.09k|	do                                                      \
  |  |  |  |  |  |   32|  4.09k|	{                                                       \
  |  |  |  |  |  |   33|  4.09k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.09k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.09k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.09k|                                                                                                   \
  |  |  |  |   72|  4.09k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.09k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.09k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.09k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|  4.09k|			WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n);
  ------------------
  |  |   76|  4.09k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.09k|	do                                                                                             \
  |  |  |  |   61|  4.09k|	{                                                                                              \
  |  |  |  |   62|  4.09k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.09k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.09k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.09k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.09k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.09k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.09k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.09k|                                                                                                   \
  |  |  |  |   70|  4.09k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.09k|	do                                                      \
  |  |  |  |  |  |   32|  4.09k|	{                                                       \
  |  |  |  |  |  |   33|  4.09k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.09k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.09k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.09k|                                                                                                   \
  |  |  |  |   72|  4.09k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.09k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.09k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.09k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|  4.09k|			memcpy(_s->pointer, (_b), (_n));
 1194|  4.09k|			Stream_Seek(_s, _n);
 1195|  4.09k|		}
 1196|  4.09k|	}
ntlm_compute.c:stream_read_u8:
  177|  2.69k|	{
  178|  2.69k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  2.69k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.69k|	do                                                                                             \
  |  |  |  |   61|  2.69k|	{                                                                                              \
  |  |  |  |   62|  2.69k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.69k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.69k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.69k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.69k|                                                                                                   \
  |  |  |  |   70|  2.69k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.69k|	do                                                      \
  |  |  |  |  |  |   32|  2.69k|	{                                                       \
  |  |  |  |  |  |   33|  2.69k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.69k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.69k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.69k|                                                                                                   \
  |  |  |  |   72|  2.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.69k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.69k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.69k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  179|  2.69k|		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= sizeof(UINT8));
  ------------------
  |  |   76|  2.69k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.69k|	do                                                                                             \
  |  |  |  |   61|  2.69k|	{                                                                                              \
  |  |  |  |   62|  2.69k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.69k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.69k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.69k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.69k|                                                                                                   \
  |  |  |  |   70|  2.69k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.69k|	do                                                      \
  |  |  |  |  |  |   32|  2.69k|	{                                                       \
  |  |  |  |  |  |   33|  2.69k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.69k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.69k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.69k|                                                                                                   \
  |  |  |  |   72|  2.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.69k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.69k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.69k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  180|       |
  181|  2.69k|		const UINT8 v = winpr_Data_Get_UINT8(_s->pointer);
  182|  2.69k|		if (seek)
  ------------------
  |  Branch (182:7): [True: 2.69k, False: 0]
  ------------------
  183|  2.69k|			Stream_Seek(_s, sizeof(UINT8));
  184|  2.69k|		return v;
  185|  2.69k|	}
ntlm_compute.c:Stream_Seek:
  157|  7.19k|	{
  158|  7.19k|		WINPR_ASSERT(s);
  ------------------
  |  |   76|  7.19k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  7.19k|	do                                                                                             \
  |  |  |  |   61|  7.19k|	{                                                                                              \
  |  |  |  |   62|  7.19k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  7.19k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  7.19k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  7.19k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  7.19k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  7.19k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  7.19k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  7.19k|                                                                                                   \
  |  |  |  |   70|  7.19k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  7.19k|	do                                                      \
  |  |  |  |  |  |   32|  7.19k|	{                                                       \
  |  |  |  |  |  |   33|  7.19k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 7.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  7.19k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  7.19k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  7.19k|                                                                                                   \
  |  |  |  |   72|  7.19k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  7.19k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  7.19k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  7.19k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 7.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|  7.19k|		WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset);
  ------------------
  |  |   76|  7.19k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  7.19k|	do                                                                                             \
  |  |  |  |   61|  7.19k|	{                                                                                              \
  |  |  |  |   62|  7.19k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  7.19k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  7.19k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  7.19k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  7.19k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  7.19k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  7.19k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  7.19k|                                                                                                   \
  |  |  |  |   70|  7.19k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  7.19k|	do                                                      \
  |  |  |  |  |  |   32|  7.19k|	{                                                       \
  |  |  |  |  |  |   33|  7.19k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 7.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  7.19k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  7.19k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 7.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  7.19k|                                                                                                   \
  |  |  |  |   72|  7.19k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  7.19k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  7.19k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  7.19k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 7.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|  7.19k|		s->pointer += (_offset);
  161|  7.19k|	}
ntlm_compute.c:stream_read_u16_le:
  196|    964|	{
  197|    964|		const size_t typesize = sizeof(UINT16);
  198|    964|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|    964|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    964|	do                                                                                             \
  |  |  |  |   61|    964|	{                                                                                              \
  |  |  |  |   62|    964|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    964|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    964|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    964|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    964|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    964|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    964|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    964|                                                                                                   \
  |  |  |  |   70|    964|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    964|	do                                                      \
  |  |  |  |  |  |   32|    964|	{                                                       \
  |  |  |  |  |  |   33|    964|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 964]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    964|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    964|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 964]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    964|                                                                                                   \
  |  |  |  |   72|    964|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    964|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    964|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    964|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 964]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|    964|		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize);
  ------------------
  |  |   76|    964|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    964|	do                                                                                             \
  |  |  |  |   61|    964|	{                                                                                              \
  |  |  |  |   62|    964|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    964|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    964|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    964|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    964|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    964|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    964|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    964|                                                                                                   \
  |  |  |  |   70|    964|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    964|	do                                                      \
  |  |  |  |  |  |   32|    964|	{                                                       \
  |  |  |  |  |  |   33|    964|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 964]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    964|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    964|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 964]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    964|                                                                                                   \
  |  |  |  |   72|    964|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    964|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    964|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    964|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 964]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|       |
  201|    964|		const UINT16 v = winpr_Data_Get_UINT16(_s->pointer);
  202|    964|		if (seek)
  ------------------
  |  Branch (202:7): [True: 964, False: 0]
  ------------------
  203|    964|			Stream_Seek(_s, typesize);
  204|    964|		return v;
  205|    964|	}
ntlm_compute.c:Stream_Read:
  732|  1.55k|	{
  733|  1.55k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  1.55k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.55k|	do                                                                                             \
  |  |  |  |   61|  1.55k|	{                                                                                              \
  |  |  |  |   62|  1.55k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.55k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.55k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.55k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.55k|                                                                                                   \
  |  |  |  |   70|  1.55k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.55k|	do                                                      \
  |  |  |  |  |  |   32|  1.55k|	{                                                       \
  |  |  |  |  |  |   33|  1.55k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.55k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.55k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.55k|                                                                                                   \
  |  |  |  |   72|  1.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.55k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.55k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.55k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|  1.55k|		WINPR_ASSERT(_b || (_n == 0));
  ------------------
  |  |   76|  1.55k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.55k|	do                                                                                             \
  |  |  |  |   61|  1.55k|	{                                                                                              \
  |  |  |  |   62|  1.55k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.55k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.55k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.55k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.55k|                                                                                                   \
  |  |  |  |   70|  1.55k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.55k|	do                                                      \
  |  |  |  |  |  |   32|  1.55k|	{                                                       \
  |  |  |  |  |  |   33|  1.55k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:9): [True: 1.55k, False: 0]
  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.55k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.55k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.55k|                                                                                                   \
  |  |  |  |   72|  1.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.55k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.55k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.55k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  1.55k|		WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n);
  ------------------
  |  |   76|  1.55k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.55k|	do                                                                                             \
  |  |  |  |   61|  1.55k|	{                                                                                              \
  |  |  |  |   62|  1.55k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.55k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.55k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.55k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.55k|                                                                                                   \
  |  |  |  |   70|  1.55k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.55k|	do                                                      \
  |  |  |  |  |  |   32|  1.55k|	{                                                       \
  |  |  |  |  |  |   33|  1.55k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.55k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.55k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.55k|                                                                                                   \
  |  |  |  |   72|  1.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.55k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.55k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.55k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  736|  1.55k|		memcpy(_b, (_s->pointer), (_n));
  737|  1.55k|		Stream_Seek(_s, _n);
  738|  1.55k|	}
ntlm_compute.c:Stream_Write_UINT8_unchecked:
  873|  4.76k|	{
  874|  4.76k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  4.76k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.76k|	do                                                                                             \
  |  |  |  |   61|  4.76k|	{                                                                                              \
  |  |  |  |   62|  4.76k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.76k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.76k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.76k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.76k|                                                                                                   \
  |  |  |  |   70|  4.76k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.76k|	do                                                      \
  |  |  |  |  |  |   32|  4.76k|	{                                                       \
  |  |  |  |  |  |   33|  4.76k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.76k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.76k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.76k|                                                                                                   \
  |  |  |  |   72|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.76k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.76k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.76k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  875|  4.76k|		WINPR_ASSERT(_s->pointer);
  ------------------
  |  |   76|  4.76k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.76k|	do                                                                                             \
  |  |  |  |   61|  4.76k|	{                                                                                              \
  |  |  |  |   62|  4.76k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.76k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.76k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.76k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.76k|                                                                                                   \
  |  |  |  |   70|  4.76k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.76k|	do                                                      \
  |  |  |  |  |  |   32|  4.76k|	{                                                       \
  |  |  |  |  |  |   33|  4.76k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.76k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.76k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.76k|                                                                                                   \
  |  |  |  |   72|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.76k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.76k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.76k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  876|  4.76k|		WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 1);
  ------------------
  |  |   76|  4.76k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.76k|	do                                                                                             \
  |  |  |  |   61|  4.76k|	{                                                                                              \
  |  |  |  |   62|  4.76k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.76k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.76k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.76k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.76k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.76k|                                                                                                   \
  |  |  |  |   70|  4.76k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.76k|	do                                                      \
  |  |  |  |  |  |   32|  4.76k|	{                                                       \
  |  |  |  |  |  |   33|  4.76k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.76k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.76k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.76k|                                                                                                   \
  |  |  |  |   72|  4.76k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.76k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.76k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.76k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  877|       |
  878|  4.76k|		winpr_Data_Write_UINT8(_s->pointer, _v);
  879|  4.76k|		_s->pointer += 1;
  880|  4.76k|	}
ntlm_compute.c:Stream_Write_UINT16_unchecked:
  925|  1.58k|	{
  926|  1.58k|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.58k|		WINPR_ASSERT(_s->pointer);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  928|  1.58k|		WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= 2);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  929|       |
  930|  1.58k|		winpr_Data_Write_UINT16(_s->pointer, _v);
  931|  1.58k|		_s->pointer += 2;
  932|  1.58k|	}
ntlm_compute.c:Stream_Write:
 1187|  1.58k|	{
 1188|  1.58k|		if (_n > 0)
  ------------------
  |  Branch (1188:7): [True: 1.58k, False: 0]
  ------------------
 1189|  1.58k|		{
 1190|  1.58k|			WINPR_ASSERT(_s);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1191|  1.58k|			WINPR_ASSERT(_b);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|  1.58k|			WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= _n);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|  1.58k|			memcpy(_s->pointer, (_b), (_n));
 1194|  1.58k|			Stream_Seek(_s, _n);
 1195|  1.58k|		}
 1196|  1.58k|	}
ntlm_compute.c:stream_read_u32_le:
  244|    394|	{
  245|    394|		const size_t typesize = sizeof(UINT32);
  246|    394|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|    394|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    394|	do                                                                                             \
  |  |  |  |   61|    394|	{                                                                                              \
  |  |  |  |   62|    394|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    394|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    394|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    394|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    394|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    394|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    394|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    394|                                                                                                   \
  |  |  |  |   70|    394|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    394|	do                                                      \
  |  |  |  |  |  |   32|    394|	{                                                       \
  |  |  |  |  |  |   33|    394|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 394]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    394|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    394|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 394]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    394|                                                                                                   \
  |  |  |  |   72|    394|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    394|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    394|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    394|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 394]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|    394|		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= typesize);
  ------------------
  |  |   76|    394|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    394|	do                                                                                             \
  |  |  |  |   61|    394|	{                                                                                              \
  |  |  |  |   62|    394|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    394|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    394|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    394|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    394|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    394|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    394|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    394|                                                                                                   \
  |  |  |  |   70|    394|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    394|	do                                                      \
  |  |  |  |  |  |   32|    394|	{                                                       \
  |  |  |  |  |  |   33|    394|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 394]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    394|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    394|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 394]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    394|                                                                                                   \
  |  |  |  |   72|    394|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    394|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    394|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    394|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 394]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|       |
  249|    394|		const UINT32 v = winpr_Data_Get_UINT32(_s->pointer);
  250|    394|		if (seek)
  ------------------
  |  Branch (250:7): [True: 394, False: 0]
  ------------------
  251|    394|			Stream_Seek(_s, typesize);
  252|    394|		return v;
  253|    394|	}
ntlm_compute.c:Stream_Length:
 1324|    197|	{
 1325|    197|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|    197|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    197|	do                                                                                             \
  |  |  |  |   61|    197|	{                                                                                              \
  |  |  |  |   62|    197|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    197|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    197|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    197|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    197|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    197|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    197|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    197|                                                                                                   \
  |  |  |  |   70|    197|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    197|	do                                                      \
  |  |  |  |  |  |   32|    197|	{                                                       \
  |  |  |  |  |  |   33|    197|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    197|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    197|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    197|                                                                                                   \
  |  |  |  |   72|    197|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    197|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    197|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    197|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1326|    197|		return _s->length;
 1327|    197|	}
ntlm_compute.c:Stream_GetPosition:
 1342|    197|	{
 1343|    197|		WINPR_ASSERT(_s);
  ------------------
  |  |   76|    197|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    197|	do                                                                                             \
  |  |  |  |   61|    197|	{                                                                                              \
  |  |  |  |   62|    197|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    197|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    197|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    197|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    197|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    197|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    197|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    197|                                                                                                   \
  |  |  |  |   70|    197|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    197|	do                                                      \
  |  |  |  |  |  |   32|    197|	{                                                       \
  |  |  |  |  |  |   33|    197|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    197|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    197|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    197|                                                                                                   \
  |  |  |  |   72|    197|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    197|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    197|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    197|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1344|    197|		WINPR_ASSERT(_s->buffer <= _s->pointer);
  ------------------
  |  |   76|    197|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    197|	do                                                                                             \
  |  |  |  |   61|    197|	{                                                                                              \
  |  |  |  |   62|    197|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    197|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    197|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    197|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    197|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    197|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    197|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    197|                                                                                                   \
  |  |  |  |   70|    197|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    197|	do                                                      \
  |  |  |  |  |  |   32|    197|	{                                                       \
  |  |  |  |  |  |   33|    197|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    197|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    197|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    197|                                                                                                   \
  |  |  |  |   72|    197|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    197|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    197|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    197|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1345|    197|		return WINPR_STREAM_CAST(size_t, (_s->pointer - _s->buffer));
  ------------------
  |  |   80|    197|#define WINPR_STREAM_CAST(t, val) WINPR_CXX_COMPAT_CAST(t, val)
  |  |  ------------------
  |  |  |  |   33|    197|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1346|    197|	}

ntlm.c:WLog_Print_dbg_tag:
  313|  5.60k|	{
  314|  5.60k|		static wLog* log_cached_ptr = nullptr;
  315|  5.60k|		if (!log_cached_ptr)
  ------------------
  |  Branch (315:7): [True: 1, False: 5.60k]
  ------------------
  316|      1|			log_cached_ptr = WLog_Get(tag);
  317|       |
  318|  5.60k|		if (WLog_IsLevelActive(log_cached_ptr, log_level))
  ------------------
  |  Branch (318:7): [True: 5.60k, False: 0]
  ------------------
  319|  5.60k|		{
  320|  5.60k|			va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  5.60k|	{                      \
  |  |   85|  5.60k|	} /** @since version 3.24.0 */
  ------------------
  321|  5.60k|			va_start(ap, fmt);
  322|  5.60k|			WLog_PrintTextMessageVA(log_cached_ptr, log_level, line, file, fkt, fmt, ap);
  323|       |			va_end(ap);
  324|  5.60k|		}
  325|  5.60k|	}
ntlm_message.c:WLog_Print_dbg_tag:
  313|  3.66k|	{
  314|  3.66k|		static wLog* log_cached_ptr = nullptr;
  315|  3.66k|		if (!log_cached_ptr)
  ------------------
  |  Branch (315:7): [True: 1, False: 3.66k]
  ------------------
  316|      1|			log_cached_ptr = WLog_Get(tag);
  317|       |
  318|  3.66k|		if (WLog_IsLevelActive(log_cached_ptr, log_level))
  ------------------
  |  Branch (318:7): [True: 3.66k, False: 0]
  ------------------
  319|  3.66k|		{
  320|  3.66k|			va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.66k|	{                      \
  |  |   85|  3.66k|	} /** @since version 3.24.0 */
  ------------------
  321|  3.66k|			va_start(ap, fmt);
  322|  3.66k|			WLog_PrintTextMessageVA(log_cached_ptr, log_level, line, file, fkt, fmt, ap);
  323|       |			va_end(ap);
  324|  3.66k|		}
  325|  3.66k|	}

winpr_str_append:
  157|  68.3k|{
  158|  68.3k|	const size_t used = strnlen(buffer, size);
  159|  68.3k|	const size_t add = strnlen(what, size);
  160|  68.3k|	const size_t sep_len = separator ? strnlen(separator, size) : 0;
  ------------------
  |  Branch (160:25): [True: 0, False: 68.3k]
  ------------------
  161|  68.3k|	const size_t sep = (used > 0) ? sep_len : 0;
  ------------------
  |  Branch (161:21): [True: 68.3k, False: 0]
  ------------------
  162|       |
  163|  68.3k|	if (used + add + sep >= size)
  ------------------
  |  Branch (163:6): [True: 0, False: 68.3k]
  ------------------
  164|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  165|       |
  166|  68.3k|	if ((used > 0) && (sep_len > 0))
  ------------------
  |  Branch (166:6): [True: 68.3k, False: 0]
  |  Branch (166:20): [True: 0, False: 68.3k]
  ------------------
  167|      0|		strncat(buffer, separator, sep_len);
  168|       |
  169|  68.3k|	strncat(buffer, what, add);
  170|  68.3k|	return TRUE;
  ------------------
  |  |  117|  68.3k|#define TRUE true
  ------------------
  171|  68.3k|}
winpr_asprintf:
  175|  3.43k|{
  176|  3.43k|	va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.43k|	{                      \
  |  |   85|  3.43k|	} /** @since version 3.24.0 */
  ------------------
  177|       |
  178|  3.43k|	va_start(ap, templ);
  179|  3.43k|	int rc = winpr_vasprintf(s, slen, templ, ap);
  180|       |	va_end(ap);
  181|  3.43k|	return rc;
  182|  3.43k|}
winpr_vasprintf:
  186|  13.7k|{
  187|  13.7k|	va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  13.7k|	{                      \
  |  |   85|  13.7k|	} /** @since version 3.24.0 */
  ------------------
  188|       |
  189|  13.7k|	*s = nullptr;
  190|  13.7k|	*slen = 0;
  191|       |
  192|  13.7k|	va_copy(ap, oap);
  193|  13.7k|	const int length = vsnprintf(nullptr, 0, templ, ap);
  194|  13.7k|	va_end(ap);
  195|  13.7k|	if (length < 0)
  ------------------
  |  Branch (195:6): [True: 0, False: 13.7k]
  ------------------
  196|      0|		return length;
  197|       |
  198|  13.7k|	char* str = calloc((size_t)length + 1UL, sizeof(char));
  199|  13.7k|	if (!str)
  ------------------
  |  Branch (199:6): [True: 0, False: 13.7k]
  ------------------
  200|      0|		return -1;
  201|       |
  202|  13.7k|	va_copy(ap, oap);
  203|  13.7k|	const int plen = vsnprintf(str, (size_t)length + 1UL, templ, ap);
  204|  13.7k|	va_end(ap);
  205|       |
  206|  13.7k|	if (length != plen)
  ------------------
  |  Branch (206:6): [True: 0, False: 13.7k]
  ------------------
  207|      0|	{
  208|      0|		free(str);
  209|      0|		return -1;
  210|      0|	}
  211|  13.7k|	*s = str;
  212|  13.7k|	*slen = (size_t)length;
  213|  13.7k|	return length;
  214|  13.7k|}
_strdup:
  219|  6.87k|{
  220|  6.87k|	if (strSource == nullptr)
  ------------------
  |  Branch (220:6): [True: 0, False: 6.87k]
  ------------------
  221|      0|		return nullptr;
  222|       |
  223|  6.87k|	char* strDestination = strdup(strSource);
  224|       |
  225|  6.87k|	if (strDestination == nullptr)
  ------------------
  |  Branch (225:6): [True: 0, False: 6.87k]
  ------------------
  226|      0|		WLog_ERR(TAG, "strdup");
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  227|       |
  228|  6.87k|	return strDestination;
  229|  6.87k|}
CharUpperA:
  452|  2.83k|{
  453|  2.83k|	size_t length = 0;
  454|       |
  455|  2.83k|	if (!lpsz)
  ------------------
  |  Branch (455:6): [True: 0, False: 2.83k]
  ------------------
  456|      0|		return nullptr;
  457|       |
  458|  2.83k|	length = strlen(lpsz);
  459|       |
  460|  2.83k|	if (length < 1)
  ------------------
  |  Branch (460:6): [True: 0, False: 2.83k]
  ------------------
  461|      0|		return (LPSTR) nullptr;
  462|       |
  463|  2.83k|	if (length == 1)
  ------------------
  |  Branch (463:6): [True: 0, False: 2.83k]
  ------------------
  464|      0|	{
  465|      0|		char c = *lpsz;
  466|       |
  467|      0|		if ((c >= 'a') && (c <= 'z'))
  ------------------
  |  Branch (467:7): [True: 0, False: 0]
  |  Branch (467:21): [True: 0, False: 0]
  ------------------
  468|      0|			c = (char)(c - 'a' + 'A');
  469|       |
  470|      0|		*lpsz = c;
  471|      0|		return lpsz;
  472|      0|	}
  473|       |
  474|  36.8k|	for (size_t i = 0; i < length; i++)
  ------------------
  |  Branch (474:21): [True: 33.9k, False: 2.83k]
  ------------------
  475|  33.9k|	{
  476|  33.9k|		if ((lpsz[i] >= 'a') && (lpsz[i] <= 'z'))
  ------------------
  |  Branch (476:7): [True: 5.66k, False: 28.3k]
  |  Branch (476:27): [True: 5.66k, False: 0]
  ------------------
  477|  5.66k|			lpsz[i] = (char)(lpsz[i] - 'a' + 'A');
  478|  33.9k|	}
  479|       |
  480|  2.83k|	return lpsz;
  481|  2.83k|}
CharUpperBuffW:
  530|     67|{
  531|    603|	for (DWORD i = 0; i < cchLength; i++)
  ------------------
  |  Branch (531:20): [True: 536, False: 67]
  ------------------
  532|    536|	{
  533|    536|		WCHAR value = winpr_Data_Get_UINT16(&lpsz[i]);
  534|    536|		value = WINPR_TOUPPERW(value);
  ------------------
  |  |   17|    536|	(_wch + winpr_casemap_upper[winpr_casemap_upper[_wch >> 8] + (_wch & 0xFF)])
  ------------------
  535|    536|		winpr_Data_Write_UINT16(&lpsz[i], value);
  536|    536|	}
  537|       |
  538|     67|	return cchLength;
  539|     67|}
InitializeConstWCharFromUtf8:
  826|     15|{
  827|     15|	WINPR_ASSERT(str);
  ------------------
  |  |   76|     15|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     15|	do                                                                                             \
  |  |  |  |   61|     15|	{                                                                                              \
  |  |  |  |   62|     15|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     15|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     15|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     15|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     15|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     15|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     15|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     15|                                                                                                   \
  |  |  |  |   70|     15|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     15|	do                                                      \
  |  |  |  |  |  |   32|     15|	{                                                       \
  |  |  |  |  |  |   33|     15|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     15|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     15|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     15|                                                                                                   \
  |  |  |  |   72|     15|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     15|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     15|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     15|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  828|     15|	WINPR_ASSERT(buffer || (len == 0));
  ------------------
  |  |   76|     15|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     15|	do                                                                                             \
  |  |  |  |   61|     15|	{                                                                                              \
  |  |  |  |   62|     15|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     15|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     15|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     15|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     15|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     15|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     15|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     15|                                                                                                   \
  |  |  |  |   70|     15|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     15|	do                                                      \
  |  |  |  |  |  |   32|     15|	{                                                       \
  |  |  |  |  |  |   33|     15|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:9): [True: 15, False: 0]
  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     15|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     15|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     15|                                                                                                   \
  |  |  |  |   72|     15|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     15|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     15|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     15|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  829|     15|	(void)ConvertUtf8ToWChar(str, buffer, len);
  830|     15|	return buffer;
  831|     15|}

ConvertUtf8ToWChar:
  449|  17.1k|{
  450|  17.1k|	if (!str)
  ------------------
  |  Branch (450:6): [True: 0, False: 17.1k]
  ------------------
  451|      0|	{
  452|      0|		if (wstr && wlen)
  ------------------
  |  Branch (452:7): [True: 0, False: 0]
  |  Branch (452:15): [True: 0, False: 0]
  ------------------
  453|      0|			wstr[0] = 0;
  454|      0|		return 0;
  455|      0|	}
  456|       |
  457|  17.1k|	const size_t len = strlen(str);
  458|  17.1k|	return ConvertUtf8NToWChar(str, len + 1, wstr, wlen);
  459|  17.1k|}
ConvertUtf8NToWChar:
  462|  17.1k|{
  463|  17.1k|	size_t ilen = strnlen(str, len);
  464|  17.1k|	BOOL isNullTerminated = FALSE;
  ------------------
  |  |  113|  17.1k|#define FALSE false
  ------------------
  465|  17.1k|	if (len == 0)
  ------------------
  |  Branch (465:6): [True: 0, False: 17.1k]
  ------------------
  466|      0|		return 0;
  467|       |
  468|  17.1k|	WINPR_ASSERT(str);
  ------------------
  |  |   76|  17.1k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  17.1k|	do                                                                                             \
  |  |  |  |   61|  17.1k|	{                                                                                              \
  |  |  |  |   62|  17.1k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  17.1k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  17.1k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  17.1k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  17.1k|                                                                                                   \
  |  |  |  |   70|  17.1k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  17.1k|	do                                                      \
  |  |  |  |  |  |   32|  17.1k|	{                                                       \
  |  |  |  |  |  |   33|  17.1k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  17.1k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  17.1k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  17.1k|                                                                                                   \
  |  |  |  |   72|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  17.1k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  17.1k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  17.1k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 17.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  17.1k|	if ((len > INT32_MAX) || (wlen > INT32_MAX))
  ------------------
  |  Branch (470:6): [True: 0, False: 17.1k]
  |  Branch (470:27): [True: 0, False: 17.1k]
  ------------------
  471|      0|	{
  472|      0|		SetLastError(ERROR_INVALID_PARAMETER);
  ------------------
  |  |  252|      0|#define ERROR_INVALID_PARAMETER 0x00000057
  ------------------
  473|      0|		return -1;
  474|      0|	}
  475|  17.1k|	if (ilen < len)
  ------------------
  |  Branch (475:6): [True: 17.1k, False: 0]
  ------------------
  476|  17.1k|	{
  477|  17.1k|		isNullTerminated = TRUE;
  ------------------
  |  |  117|  17.1k|#define TRUE true
  ------------------
  478|  17.1k|		ilen++;
  479|  17.1k|	}
  480|       |
  481|  17.1k|	const int iwlen = (int)wlen;
  482|  17.1k|	WINPR_PRAGMA_DIAG_PUSH
  483|  17.1k|	WINPR_PRAGMA_DIAG_IGNORED_DEPRECATED_DECL
  484|  17.1k|	const int rc = MultiByteToWideChar(CP_UTF8, 0, str, (int)ilen, wstr, iwlen);
  ------------------
  |  |   62|  17.1k|#define CP_UTF8 65001
  ------------------
  485|  17.1k|	WINPR_PRAGMA_DIAG_POP
  486|  17.1k|	if ((rc <= 0) || ((wlen > 0) && (rc > iwlen)))
  ------------------
  |  Branch (486:6): [True: 0, False: 17.1k]
  |  Branch (486:20): [True: 8.56k, False: 8.55k]
  |  Branch (486:34): [True: 0, False: 8.56k]
  ------------------
  487|      0|		return -1;
  488|  17.1k|	if (!isNullTerminated)
  ------------------
  |  Branch (488:6): [True: 0, False: 17.1k]
  ------------------
  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|  17.1k|	else if (rc == iwlen)
  ------------------
  |  Branch (494:11): [True: 8.55k, False: 8.56k]
  ------------------
  495|  8.55k|	{
  496|  8.55k|		if (wstr && (wstr[rc - 1] != '\0'))
  ------------------
  |  Branch (496:7): [True: 8.55k, False: 0]
  |  Branch (496:15): [True: 0, False: 8.55k]
  ------------------
  497|      0|			return rc;
  498|  8.55k|	}
  499|  17.1k|	return rc - 1;
  500|  17.1k|}
ConvertUtf8ToWCharAlloc:
  598|  8.55k|{
  599|  8.55k|	WCHAR* tmp = nullptr;
  600|  8.55k|	const SSIZE_T rc = ConvertUtf8ToWChar(str, nullptr, 0);
  601|  8.55k|	if (pSize)
  ------------------
  |  Branch (601:6): [True: 6.83k, False: 1.71k]
  ------------------
  602|  6.83k|		*pSize = 0;
  603|  8.55k|	if (rc < 0)
  ------------------
  |  Branch (603:6): [True: 0, False: 8.55k]
  ------------------
  604|      0|		return nullptr;
  605|  8.55k|	tmp = calloc((size_t)rc + 1ull, sizeof(WCHAR));
  606|  8.55k|	if (!tmp)
  ------------------
  |  Branch (606:6): [True: 0, False: 8.55k]
  ------------------
  607|      0|		return nullptr;
  608|  8.55k|	const SSIZE_T rc2 = ConvertUtf8ToWChar(str, tmp, (size_t)rc + 1ull);
  609|  8.55k|	if (rc2 < 0)
  ------------------
  |  Branch (609:6): [True: 0, False: 8.55k]
  ------------------
  610|      0|	{
  611|      0|		free(tmp);
  612|      0|		return nullptr;
  613|      0|	}
  614|  8.55k|	WINPR_ASSERT(rc == rc2);
  ------------------
  |  |   76|  8.55k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  8.55k|	do                                                                                             \
  |  |  |  |   61|  8.55k|	{                                                                                              \
  |  |  |  |   62|  8.55k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  8.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  8.55k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  8.55k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  8.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  8.55k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  8.55k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  8.55k|                                                                                                   \
  |  |  |  |   70|  8.55k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  8.55k|	do                                                      \
  |  |  |  |  |  |   32|  8.55k|	{                                                       \
  |  |  |  |  |  |   33|  8.55k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 8.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  8.55k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  8.55k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 8.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  8.55k|                                                                                                   \
  |  |  |  |   72|  8.55k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  8.55k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  8.55k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  8.55k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 8.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  615|  8.55k|	if (pSize)
  ------------------
  |  Branch (615:6): [True: 6.83k, False: 1.71k]
  ------------------
  616|  6.83k|		*pSize = (size_t)rc2;
  617|  8.55k|	return tmp;
  618|  8.55k|}
unicode.c:MultiByteToWideChar:
  155|  17.1k|{
  156|  17.1k|	return int_MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, lpWideCharStr,
  157|  17.1k|	                               cchWideChar);
  158|  17.1k|}

int_MultiByteToWideChar:
  656|  17.1k|{
  657|  17.1k|	size_t cbCharLen = (size_t)cbMultiByte;
  658|       |
  659|  17.1k|	WINPR_UNUSED(dwFlags);
  ------------------
  |  |  715|  17.1k|#define WINPR_UNUSED(x) (void)(x)
  ------------------
  660|       |
  661|       |	/* If cbMultiByte is 0, the function fails */
  662|  17.1k|	if ((cbMultiByte == 0) || (cbMultiByte < -1))
  ------------------
  |  Branch (662:6): [True: 0, False: 17.1k]
  |  Branch (662:28): [True: 0, False: 17.1k]
  ------------------
  663|      0|		return 0;
  664|       |
  665|  17.1k|	if (cchWideChar < 0)
  ------------------
  |  Branch (665:6): [True: 0, False: 17.1k]
  ------------------
  666|      0|		return -1;
  667|       |
  668|  17.1k|	if (cbMultiByte < 0)
  ------------------
  |  Branch (668:6): [True: 0, False: 17.1k]
  ------------------
  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|  17.1k|	else
  676|  17.1k|		cbCharLen = cbMultiByte;
  677|       |
  678|  17.1k|	WINPR_ASSERT(lpMultiByteStr);
  ------------------
  |  |   76|  17.1k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  17.1k|	do                                                                                             \
  |  |  |  |   61|  17.1k|	{                                                                                              \
  |  |  |  |   62|  17.1k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  17.1k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  17.1k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  17.1k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  17.1k|                                                                                                   \
  |  |  |  |   70|  17.1k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  17.1k|	do                                                      \
  |  |  |  |  |  |   32|  17.1k|	{                                                       \
  |  |  |  |  |  |   33|  17.1k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  17.1k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  17.1k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  17.1k|                                                                                                   \
  |  |  |  |   72|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  17.1k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  17.1k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  17.1k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 17.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  679|  17.1k|	switch (CodePage)
  680|  17.1k|	{
  681|      0|		case CP_ACP:
  ------------------
  |  |   56|      0|#define CP_ACP 0
  ------------------
  |  Branch (681:3): [True: 0, False: 17.1k]
  ------------------
  682|  17.1k|		case CP_UTF8:
  ------------------
  |  |   62|  17.1k|#define CP_UTF8 65001
  ------------------
  |  Branch (682:3): [True: 17.1k, False: 0]
  ------------------
  683|  17.1k|			break;
  684|       |
  685|      0|		default:
  ------------------
  |  Branch (685:3): [True: 0, False: 17.1k]
  ------------------
  686|      0|			WLog_ERR(TAG, "Unsupported encoding %u", CodePage);
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  687|      0|			return 0;
  688|  17.1k|	}
  689|       |
  690|  17.1k|	return winpr_ConvertUTF8toUTF16((const uint8_t*)lpMultiByteStr,
  691|  17.1k|	                                WINPR_ASSERTING_INT_CAST(int, cbCharLen),
  ------------------
  |  |  112|  17.1k|	__extension__({                                                                             \
  |  |  113|  17.1k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  17.1k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  17.1k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  17.1k|	do                                                                                             \
  |  |  |  |  |  |   61|  17.1k|	{                                                                                              \
  |  |  |  |  |  |   62|  17.1k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  17.1k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  17.1k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  17.1k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  17.1k|                                                                                                   \
  |  |  |  |  |  |   70|  17.1k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  17.1k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  17.1k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  17.1k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  17.1k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  17.1k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  17.1k|                                                                                                   \
  |  |  |  |  |  |   72|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  17.1k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  17.1k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  17.1k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  17.1k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  17.1k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  17.1k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  17.1k|	do                                                                                             \
  |  |  |  |  |  |   61|  17.1k|	{                                                                                              \
  |  |  |  |  |  |   62|  17.1k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  17.1k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  17.1k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  17.1k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  17.1k|                                                                                                   \
  |  |  |  |  |  |   70|  17.1k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  17.1k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  17.1k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  51.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 17.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 17.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  17.1k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  17.1k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  17.1k|                                                                                                   \
  |  |  |  |  |  |   72|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  17.1k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  17.1k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  17.1k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  17.1k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  17.1k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  17.1k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  17.1k|	})
  ------------------
  692|  17.1k|	                                (uint16_t*)lpWideCharStr, cchWideChar);
  693|  17.1k|}
unicode_builtin.c:winpr_ConvertUTF8toUTF16:
  569|  17.1k|{
  570|  17.1k|	size_t length = 0;
  571|  17.1k|	uint16_t* dstBeg = nullptr;
  572|  17.1k|	uint16_t* dstEnd = nullptr;
  573|  17.1k|	const uint8_t* srcBeg = nullptr;
  574|  17.1k|	const uint8_t* srcEnd = nullptr;
  575|  17.1k|	ConversionResult result = sourceIllegal;
  576|       |
  577|  17.1k|	if (cchSrc == -1)
  ------------------
  |  Branch (577:6): [True: 0, False: 17.1k]
  ------------------
  578|      0|		cchSrc = (int)strnlen((const char*)src, INT32_MAX - 1) + 1;
  579|       |
  580|  17.1k|	srcBeg = src;
  581|  17.1k|	srcEnd = &src[cchSrc];
  582|       |
  583|  17.1k|	if (cchDst == 0)
  ------------------
  |  Branch (583:6): [True: 8.55k, False: 8.56k]
  ------------------
  584|  8.55k|	{
  585|  8.55k|		result =
  586|  8.55k|		    winpr_ConvertUTF8toUTF16_Internal(&srcBeg, srcEnd, &dstBeg, dstEnd, strictConversion);
  587|       |
  588|  8.55k|		length = dstBeg - (uint16_t*)nullptr;
  589|  8.55k|	}
  590|  8.56k|	else
  591|  8.56k|	{
  592|  8.56k|		dstBeg = dst;
  593|  8.56k|		dstEnd = &dst[cchDst];
  594|       |
  595|  8.56k|		result =
  596|  8.56k|		    winpr_ConvertUTF8toUTF16_Internal(&srcBeg, srcEnd, &dstBeg, dstEnd, strictConversion);
  597|       |
  598|  8.56k|		length = dstBeg - dst;
  599|  8.56k|	}
  600|       |
  601|  17.1k|	if (result == targetExhausted)
  ------------------
  |  Branch (601:6): [True: 0, False: 17.1k]
  ------------------
  602|      0|	{
  603|      0|		SetLastError(ERROR_INSUFFICIENT_BUFFER);
  ------------------
  |  |  275|      0|#define ERROR_INSUFFICIENT_BUFFER 0x0000007A
  ------------------
  604|      0|		return 0;
  605|      0|	}
  606|       |
  607|  17.1k|	return (result == conversionOK) ? WINPR_ASSERTING_INT_CAST(int, length) : 0;
  ------------------
  |  |  112|  17.1k|	__extension__({                                                                             \
  |  |  113|  17.1k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  17.1k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  17.1k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  17.1k|	do                                                                                             \
  |  |  |  |  |  |   61|  17.1k|	{                                                                                              \
  |  |  |  |  |  |   62|  17.1k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  17.1k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  17.1k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  17.1k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  17.1k|                                                                                                   \
  |  |  |  |  |  |   70|  17.1k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  17.1k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  17.1k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  17.1k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  17.1k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  17.1k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  17.1k|                                                                                                   \
  |  |  |  |  |  |   72|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  17.1k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  17.1k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  17.1k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  17.1k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  17.1k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  17.1k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  17.1k|	do                                                                                             \
  |  |  |  |  |  |   61|  17.1k|	{                                                                                              \
  |  |  |  |  |  |   62|  17.1k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  17.1k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  17.1k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  17.1k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  17.1k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  17.1k|                                                                                                   \
  |  |  |  |  |  |   70|  17.1k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  17.1k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  17.1k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  51.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 17.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 17.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  17.1k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  17.1k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  17.1k|                                                                                                   \
  |  |  |  |  |  |   72|  17.1k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  17.1k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  17.1k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  17.1k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 17.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  17.1k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  17.1k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  17.1k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  17.1k|	})
  ------------------
  |  Branch (607:9): [True: 17.1k, False: 0]
  ------------------
  608|  17.1k|}
unicode_builtin.c:winpr_ConvertUTF8toUTF16_Internal:
  414|  17.1k|{
  415|  17.1k|	bool computeLength = (!targetEnd) ? true : false;
  ------------------
  |  Branch (415:23): [True: 8.55k, False: 8.56k]
  ------------------
  416|  17.1k|	ConversionResult result = conversionOK;
  417|  17.1k|	const uint8_t* source = *sourceStart;
  418|  17.1k|	uint16_t* target = *targetStart;
  419|       |
  420|   184k|	while (source < sourceEnd)
  ------------------
  |  Branch (420:9): [True: 167k, False: 17.1k]
  ------------------
  421|   167k|	{
  422|   167k|		uint32_t ch = 0;
  423|   167k|		unsigned short extraBytesToRead =
  424|   167k|		    WINPR_ASSERTING_INT_CAST(unsigned short, trailingBytesForUTF8[*source]);
  ------------------
  |  |  112|   167k|	__extension__({                                                                             \
  |  |  113|   167k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   167k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   167k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   167k|	do                                                                                             \
  |  |  |  |  |  |   61|   167k|	{                                                                                              \
  |  |  |  |  |  |   62|   167k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   167k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   167k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   167k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   167k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   167k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   167k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   167k|                                                                                                   \
  |  |  |  |  |  |   70|   167k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   167k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   167k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   167k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 167k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   167k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   167k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 167k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   167k|                                                                                                   \
  |  |  |  |  |  |   72|   167k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   167k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   167k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   167k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 167k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   167k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   167k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   167k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   167k|	do                                                                                             \
  |  |  |  |  |  |   61|   167k|	{                                                                                              \
  |  |  |  |  |  |   62|   167k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   167k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   167k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   167k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   167k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   167k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   167k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   167k|                                                                                                   \
  |  |  |  |  |  |   70|   167k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   167k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   167k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   835k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 167k]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 167k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 167k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   167k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   167k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 167k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   167k|                                                                                                   \
  |  |  |  |  |  |   72|   167k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   167k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   167k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   167k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 167k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   167k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   167k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   167k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   167k|	})
  ------------------
  425|       |
  426|   167k|		if ((source + extraBytesToRead) >= sourceEnd)
  ------------------
  |  Branch (426:7): [True: 0, False: 167k]
  ------------------
  427|      0|		{
  428|      0|			result = sourceExhausted;
  429|      0|			break;
  430|      0|		}
  431|       |
  432|       |		/* Do this check whether lenient or strict */
  433|   167k|		if (!isLegalUTF8(source, extraBytesToRead + 1))
  ------------------
  |  Branch (433:7): [True: 0, False: 167k]
  ------------------
  434|      0|		{
  435|      0|			result = sourceIllegal;
  436|      0|			break;
  437|      0|		}
  438|       |
  439|       |		/*
  440|       |		 * The cases all fall through. See "Note A" below.
  441|       |		 */
  442|   167k|		switch (extraBytesToRead)
  443|   167k|		{
  444|      0|			case 5:
  ------------------
  |  Branch (444:4): [True: 0, False: 167k]
  ------------------
  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: 167k]
  ------------------
  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|      0|			case 3:
  ------------------
  |  Branch (456:4): [True: 0, False: 167k]
  ------------------
  457|      0|				ch += *source++;
  458|      0|				ch <<= 6;
  459|       |				/* fallthrough */
  460|      0|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  461|       |
  462|      0|			case 2:
  ------------------
  |  Branch (462:4): [True: 0, False: 167k]
  ------------------
  463|      0|				ch += *source++;
  464|      0|				ch <<= 6;
  465|       |				/* fallthrough */
  466|      0|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  467|       |
  468|      0|			case 1:
  ------------------
  |  Branch (468:4): [True: 0, False: 167k]
  ------------------
  469|      0|				ch += *source++;
  470|      0|				ch <<= 6;
  471|       |				/* fallthrough */
  472|      0|				WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  473|       |
  474|   167k|			case 0:
  ------------------
  |  Branch (474:4): [True: 167k, False: 0]
  ------------------
  475|   167k|				ch += *source++;
  476|   167k|				break;
  477|      0|			default:
  ------------------
  |  Branch (477:4): [True: 0, False: 167k]
  ------------------
  478|      0|				return sourceIllegal;
  479|   167k|		}
  480|       |
  481|   167k|		ch -= offsetsFromUTF8[extraBytesToRead];
  482|       |
  483|   167k|		if ((target >= targetEnd) && (!computeLength))
  ------------------
  |  Branch (483:7): [True: 83.4k, False: 83.6k]
  |  Branch (483:32): [True: 0, False: 83.4k]
  ------------------
  484|      0|		{
  485|      0|			source -= (extraBytesToRead + 1); /* Back up source pointer! */
  486|      0|			result = targetExhausted;
  487|      0|			break;
  488|      0|		}
  489|       |
  490|   167k|		if (ch <= UNI_MAX_BMP)
  ------------------
  |  |   61|   167k|#define UNI_MAX_BMP (uint32_t)0x0000FFFF
  ------------------
  |  Branch (490:7): [True: 167k, False: 0]
  ------------------
  491|   167k|		{
  492|       |			/* Target is a character <= 0xFFFF */
  493|       |			/* UTF-16 surrogate values are illegal in UTF-32 */
  494|   167k|			if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END)
  ------------------
  |  |   85|   334k|#define UNI_SUR_HIGH_START (uint32_t)0xD800
  ------------------
              			if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END)
  ------------------
  |  |   88|      0|#define UNI_SUR_LOW_END (uint32_t)0xDFFF
  ------------------
  |  Branch (494:8): [True: 0, False: 167k]
  |  Branch (494:36): [True: 0, False: 0]
  ------------------
  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|   167k|			else
  511|   167k|			{
  512|   167k|				if (!computeLength)
  ------------------
  |  Branch (512:9): [True: 83.6k, False: 83.4k]
  ------------------
  513|  83.6k|					*target++ = setWcharFrom((WCHAR)ch); /* normal case */
  514|  83.4k|				else
  515|  83.4k|					target++;
  516|   167k|			}
  517|   167k|		}
  518|      0|		else if (ch > UNI_MAX_UTF16)
  ------------------
  |  |   62|      0|#define UNI_MAX_UTF16 (uint32_t)0x0010FFFF
  ------------------
  |  Branch (518:12): [True: 0, False: 0]
  ------------------
  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|      0|		else
  535|      0|		{
  536|       |			/* target is a character in range 0xFFFF - 0x10FFFF. */
  537|      0|			if ((target + 1 >= targetEnd) && (!computeLength))
  ------------------
  |  Branch (537:8): [True: 0, False: 0]
  |  Branch (537:37): [True: 0, False: 0]
  ------------------
  538|      0|			{
  539|      0|				source -= (extraBytesToRead + 1); /* Back up source pointer! */
  540|      0|				result = targetExhausted;
  541|      0|				break;
  542|      0|			}
  543|       |
  544|      0|			ch -= halfBase;
  545|       |
  546|      0|			if (!computeLength)
  ------------------
  |  Branch (546:8): [True: 0, False: 0]
  ------------------
  547|      0|			{
  548|      0|				*target++ = setWcharFrom((WCHAR)((ch >> halfShift) + UNI_SUR_HIGH_START));
  ------------------
  |  |   85|      0|#define UNI_SUR_HIGH_START (uint32_t)0xD800
  ------------------
  549|      0|				*target++ = setWcharFrom((WCHAR)((ch & halfMask) + UNI_SUR_LOW_START));
  ------------------
  |  |   87|      0|#define UNI_SUR_LOW_START (uint32_t)0xDC00
  ------------------
  550|      0|			}
  551|      0|			else
  552|      0|			{
  553|      0|				target++;
  554|      0|				target++;
  555|      0|			}
  556|      0|		}
  557|   167k|	}
  558|       |
  559|  17.1k|	*sourceStart = source;
  560|  17.1k|	*targetStart = target;
  561|  17.1k|	return result;
  562|  17.1k|}
unicode_builtin.c:isLegalUTF8:
  335|   167k|{
  336|   167k|	uint8_t a = 0;
  337|   167k|	const uint8_t* srcptr = source + length;
  338|       |
  339|   167k|	switch (length)
  340|   167k|	{
  341|      0|		default:
  ------------------
  |  Branch (341:3): [True: 0, False: 167k]
  ------------------
  342|      0|			return false;
  343|       |
  344|       |			/* Everything else falls through when "true"... */
  345|      0|		case 4:
  ------------------
  |  Branch (345:3): [True: 0, False: 167k]
  ------------------
  346|      0|			if ((a = (*--srcptr)) < 0x80 || a > 0xBF)
  ------------------
  |  Branch (346:8): [True: 0, False: 0]
  |  Branch (346:36): [True: 0, False: 0]
  ------------------
  347|      0|				return false;
  348|       |			/* fallthrough */
  349|      0|			WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  350|       |
  351|      0|		case 3:
  ------------------
  |  Branch (351:3): [True: 0, False: 167k]
  ------------------
  352|      0|			if ((a = (*--srcptr)) < 0x80 || a > 0xBF)
  ------------------
  |  Branch (352:8): [True: 0, False: 0]
  |  Branch (352:36): [True: 0, False: 0]
  ------------------
  353|      0|				return false;
  354|       |			/* fallthrough */
  355|      0|			WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  356|       |
  357|      0|		case 2:
  ------------------
  |  Branch (357:3): [True: 0, False: 167k]
  ------------------
  358|      0|			if ((a = (*--srcptr)) > 0xBF)
  ------------------
  |  Branch (358:8): [True: 0, False: 0]
  ------------------
  359|      0|				return false;
  360|       |
  361|      0|			switch (*source)
  362|      0|			{
  363|       |					/* no fall-through in this inner switch */
  364|      0|				case 0xE0:
  ------------------
  |  Branch (364:5): [True: 0, False: 0]
  ------------------
  365|      0|					if (a < 0xA0)
  ------------------
  |  Branch (365:10): [True: 0, False: 0]
  ------------------
  366|      0|						return false;
  367|       |
  368|      0|					break;
  369|       |
  370|      0|				case 0xED:
  ------------------
  |  Branch (370:5): [True: 0, False: 0]
  ------------------
  371|      0|					if (a > 0x9F)
  ------------------
  |  Branch (371:10): [True: 0, False: 0]
  ------------------
  372|      0|						return false;
  373|       |
  374|      0|					break;
  375|       |
  376|      0|				case 0xF0:
  ------------------
  |  Branch (376:5): [True: 0, False: 0]
  ------------------
  377|      0|					if (a < 0x90)
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|						return false;
  379|       |
  380|      0|					break;
  381|       |
  382|      0|				case 0xF4:
  ------------------
  |  Branch (382:5): [True: 0, False: 0]
  ------------------
  383|      0|					if (a > 0x8F)
  ------------------
  |  Branch (383:10): [True: 0, False: 0]
  ------------------
  384|      0|						return false;
  385|       |
  386|      0|					break;
  387|       |
  388|      0|				default:
  ------------------
  |  Branch (388:5): [True: 0, False: 0]
  ------------------
  389|      0|					if (a < 0x80)
  ------------------
  |  Branch (389:10): [True: 0, False: 0]
  ------------------
  390|      0|						return false;
  391|      0|					break;
  392|      0|			}
  393|       |			/* fallthrough */
  394|      0|			WINPR_FALLTHROUGH
  ------------------
  |  |   68|      0|	(void)0;              \
  |  |   69|      0|	[[fallthrough]];
  ------------------
  395|       |
  396|   167k|		case 1:
  ------------------
  |  Branch (396:3): [True: 167k, False: 0]
  ------------------
  397|   167k|			if (*source >= 0x80 && *source < 0xC2)
  ------------------
  |  Branch (397:8): [True: 0, False: 167k]
  |  Branch (397:27): [True: 0, False: 0]
  ------------------
  398|      0|				return false;
  399|   167k|	}
  400|       |
  401|   167k|	if (*source > 0xF4)
  ------------------
  |  Branch (401:6): [True: 0, False: 167k]
  ------------------
  402|      0|		return false;
  403|       |
  404|   167k|	return true;
  405|   167k|}
unicode_builtin.c:setWcharFrom:
  129|  83.6k|{
  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|  83.6k|	return w;
  144|  83.6k|#endif
  145|  83.6k|}

winpr_RC4_New:
  139|    205|{
  140|    205|	return winpr_RC4_New_Internal(key, keylen, FALSE);
  ------------------
  |  |  113|    205|#define FALSE false
  ------------------
  141|    205|}
winpr_RC4_Update:
  144|     71|{
  145|     71|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|     71|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     71|	do                                                                                             \
  |  |  |  |   61|     71|	{                                                                                              \
  |  |  |  |   62|     71|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     71|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     71|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     71|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     71|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     71|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     71|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     71|                                                                                                   \
  |  |  |  |   70|     71|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     71|	do                                                      \
  |  |  |  |  |  |   32|     71|	{                                                       \
  |  |  |  |  |  |   33|     71|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     71|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     71|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     71|                                                                                                   \
  |  |  |  |   72|     71|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     71|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     71|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     71|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 71]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  146|       |
  147|       |#if defined(WITH_INTERNAL_RC4)
  148|       |	return winpr_int_rc4_update(ctx->ictx, length, input, output);
  149|       |#elif defined(WITH_OPENSSL)
  150|     71|	WINPR_ASSERT(ctx->ctx);
  ------------------
  |  |   76|     71|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     71|	do                                                                                             \
  |  |  |  |   61|     71|	{                                                                                              \
  |  |  |  |   62|     71|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     71|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     71|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     71|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     71|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     71|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     71|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     71|                                                                                                   \
  |  |  |  |   70|     71|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     71|	do                                                      \
  |  |  |  |  |  |   32|     71|	{                                                       \
  |  |  |  |  |  |   33|     71|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     71|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     71|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     71|                                                                                                   \
  |  |  |  |   72|     71|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     71|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     71|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     71|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 71]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  151|     71|	int outputLength = 0;
  152|     71|	if (length > INT_MAX)
  ------------------
  |  Branch (152:6): [True: 0, False: 71]
  ------------------
  153|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  154|       |
  155|     71|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|     71|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     71|	do                                                                                             \
  |  |  |  |   61|     71|	{                                                                                              \
  |  |  |  |   62|     71|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     71|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     71|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     71|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     71|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     71|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     71|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     71|                                                                                                   \
  |  |  |  |   70|     71|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     71|	do                                                      \
  |  |  |  |  |  |   32|     71|	{                                                       \
  |  |  |  |  |  |   33|     71|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     71|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     71|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     71|                                                                                                   \
  |  |  |  |   72|     71|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     71|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     71|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     71|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 71]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|     71|	return EVP_CipherUpdate(ctx->ctx, output, &outputLength, input, (int)length) == 1;
  157|      0|#endif
  158|      0|	return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  159|     71|}
winpr_RC4_Free:
  162|  3.50k|{
  163|  3.50k|	if (!ctx)
  ------------------
  |  Branch (163:6): [True: 3.29k, False: 205]
  ------------------
  164|  3.29k|		return;
  165|       |
  166|       |#if defined(WITH_INTERNAL_RC4)
  167|       |	winpr_int_rc4_free(ctx->ictx);
  168|       |#elif defined(WITH_OPENSSL)
  169|    205|	EVP_CIPHER_CTX_free(ctx->ctx);
  170|    205|#endif
  171|    205|	free(ctx);
  172|    205|}
cipher.c:winpr_RC4_New_Internal:
   79|    205|{
   80|    205|	if (!key || (keylen == 0))
  ------------------
  |  Branch (80:6): [True: 0, False: 205]
  |  Branch (80:14): [True: 0, False: 205]
  ------------------
   81|      0|		return nullptr;
   82|       |
   83|    205|	WINPR_RC4_CTX* ctx = (WINPR_RC4_CTX*)calloc(1, sizeof(WINPR_RC4_CTX));
   84|    205|	if (!ctx)
  ------------------
  |  Branch (84:6): [True: 0, False: 205]
  ------------------
   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|    205|	const EVP_CIPHER* evp = nullptr;
   94|       |
   95|    205|	if (keylen > INT_MAX)
  ------------------
  |  Branch (95:6): [True: 0, False: 205]
  ------------------
   96|      0|		goto fail;
   97|       |
   98|    205|	ctx->ctx = EVP_CIPHER_CTX_new();
   99|    205|	if (!ctx->ctx)
  ------------------
  |  Branch (99:6): [True: 0, False: 205]
  ------------------
  100|      0|		goto fail;
  101|       |
  102|    205|	evp = EVP_rc4();
  103|       |
  104|    205|	if (!evp)
  ------------------
  |  Branch (104:6): [True: 0, False: 205]
  ------------------
  105|      0|		goto fail;
  106|       |
  107|    205|	EVP_CIPHER_CTX_reset(ctx->ctx);
  108|    205|	if (EVP_EncryptInit_ex(ctx->ctx, evp, nullptr, nullptr, nullptr) != 1)
  ------------------
  |  Branch (108:6): [True: 0, False: 205]
  ------------------
  109|      0|		goto fail;
  110|       |
  111|       |	/* EVP_CIPH_FLAG_NON_FIPS_ALLOW does not exist before openssl 1.0.1 */
  112|    205|#if !(OPENSSL_VERSION_NUMBER < 0x10001000L)
  113|       |
  114|    205|	if (override_fips == TRUE)
  ------------------
  |  |  117|    205|#define TRUE true
  ------------------
  |  Branch (114:6): [True: 0, False: 205]
  ------------------
  115|      0|		EVP_CIPHER_CTX_set_flags(ctx->ctx, EVP_CIPH_FLAG_NON_FIPS_ALLOW);
  116|       |
  117|    205|#endif
  118|    205|	EVP_CIPHER_CTX_set_key_length(ctx->ctx, (int)keylen);
  119|    205|	if (EVP_EncryptInit_ex(ctx->ctx, nullptr, nullptr, key, nullptr) != 1)
  ------------------
  |  Branch (119:6): [True: 0, False: 205]
  ------------------
  120|      0|		goto fail;
  121|    205|#endif
  122|    205|	return ctx;
  123|       |
  124|      0|fail:
  125|      0|	WINPR_PRAGMA_DIAG_PUSH
  126|      0|	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
  127|       |
  128|      0|	winpr_RC4_Free(ctx);
  129|      0|	WINPR_PRAGMA_DIAG_POP
  130|      0|	return nullptr;
  131|    205|}

winpr_openssl_get_evp_md:
   69|  1.47k|{
   70|  1.47k|	const char* name = winpr_md_type_to_string(md);
   71|  1.47k|	if (!name)
  ------------------
  |  Branch (71:6): [True: 0, False: 1.47k]
  ------------------
   72|      0|		return nullptr;
   73|  1.47k|	return EVP_get_digestbyname(name);
   74|  1.47k|}
winpr_md_type_to_string:
  142|  1.47k|{
  143|  1.47k|	const struct hash_map* cur = hashes;
  144|  4.36k|	while (cur->name)
  ------------------
  |  Branch (144:9): [True: 4.36k, False: 0]
  ------------------
  145|  4.36k|	{
  146|  4.36k|		if (cur->md == md)
  ------------------
  |  Branch (146:7): [True: 1.47k, False: 2.88k]
  ------------------
  147|  1.47k|			return cur->name;
  148|  2.88k|		cur++;
  149|  2.88k|	}
  150|      0|	return nullptr;
  151|  1.47k|}
winpr_HMAC_New:
  173|  1.14k|{
  174|  1.14k|	WINPR_HMAC_CTX* ctx = (WINPR_HMAC_CTX*)calloc(1, sizeof(WINPR_HMAC_CTX));
  175|  1.14k|	if (!ctx)
  ------------------
  |  Branch (175:6): [True: 0, False: 1.14k]
  ------------------
  176|      0|		return nullptr;
  177|  1.14k|#if defined(WITH_OPENSSL)
  178|       |#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
  179|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  180|       |
  181|       |	if (!(ctx->hmac = (HMAC_CTX*)calloc(1, sizeof(HMAC_CTX))))
  182|       |		goto fail;
  183|       |
  184|       |	HMAC_CTX_init(ctx->hmac);
  185|       |#elif OPENSSL_VERSION_NUMBER < 0x30000000L
  186|  1.14k|	if (!(ctx->hmac = HMAC_CTX_new()))
  ------------------
  |  Branch (186:6): [True: 0, False: 1.14k]
  ------------------
  187|      0|		goto fail;
  188|       |#else
  189|       |	EVP_MAC* emac = EVP_MAC_fetch(nullptr, "HMAC", nullptr);
  190|       |	if (!emac)
  191|       |		goto fail;
  192|       |	ctx->xhmac = EVP_MAC_CTX_new(emac);
  193|       |	EVP_MAC_free(emac);
  194|       |	if (!ctx->xhmac)
  195|       |		goto fail;
  196|       |#endif
  197|       |#elif defined(WITH_MBEDTLS)
  198|       |	mbedtls_md_init(&ctx->hmac);
  199|       |#endif
  200|  1.14k|	return ctx;
  201|       |
  202|      0|fail:
  203|      0|	WINPR_PRAGMA_DIAG_PUSH
  204|      0|	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
  205|      0|	winpr_HMAC_Free(ctx);
  206|      0|	WINPR_PRAGMA_DIAG_POP
  207|      0|	return nullptr;
  208|  1.14k|}
winpr_HMAC_Init:
  211|  1.14k|{
  212|  1.14k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.14k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.14k|	do                                                                                             \
  |  |  |  |   61|  1.14k|	{                                                                                              \
  |  |  |  |   62|  1.14k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.14k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.14k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.14k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.14k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.14k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.14k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.14k|                                                                                                   \
  |  |  |  |   70|  1.14k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.14k|	do                                                      \
  |  |  |  |  |  |   32|  1.14k|	{                                                       \
  |  |  |  |  |  |   33|  1.14k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.14k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.14k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.14k|                                                                                                   \
  |  |  |  |   72|  1.14k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.14k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.14k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.14k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  213|       |
  214|  1.14k|	ctx->md = md;
  215|  1.14k|	switch (ctx->md)
  216|  1.14k|	{
  217|       |#if defined(WITH_INTERNAL_MD5)
  218|       |		case WINPR_MD_MD5:
  219|       |			hmac_md5_init(&ctx->hmac_md5, key, keylen);
  220|       |			return TRUE;
  221|       |#endif
  222|  1.14k|		default:
  ------------------
  |  Branch (222:3): [True: 1.14k, False: 0]
  ------------------
  223|  1.14k|			break;
  224|  1.14k|	}
  225|       |
  226|  1.14k|#if defined(WITH_OPENSSL)
  227|       |#if OPENSSL_VERSION_NUMBER >= 0x30000000L
  228|       |	char* hash = WINPR_CAST_CONST_PTR_AWAY(winpr_md_type_to_string(md), char*);
  229|       |
  230|       |	if (!ctx->xhmac)
  231|       |		return FALSE;
  232|       |
  233|       |	const char* param_name = OSSL_MAC_PARAM_DIGEST;
  234|       |	const OSSL_PARAM param[] = { OSSL_PARAM_construct_utf8_string(param_name, hash, 0),
  235|       |		                         OSSL_PARAM_construct_end() };
  236|       |
  237|       |	return EVP_MAC_init(ctx->xhmac, key, keylen, param) == 1;
  238|       |#else
  239|  1.14k|	HMAC_CTX* hmac = ctx->hmac;
  240|  1.14k|	const EVP_MD* evp = winpr_openssl_get_evp_md(md);
  241|       |
  242|  1.14k|	if (!evp || !hmac)
  ------------------
  |  Branch (242:6): [True: 0, False: 1.14k]
  |  Branch (242:14): [True: 0, False: 1.14k]
  ------------------
  243|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  244|       |
  245|  1.14k|	if (keylen > INT_MAX)
  ------------------
  |  Branch (245:6): [True: 0, False: 1.14k]
  ------------------
  246|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  247|       |#if (OPENSSL_VERSION_NUMBER < 0x10000000L) || \
  248|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  249|       |	HMAC_Init_ex(hmac, key, (int)keylen, evp, nullptr); /* no return value on OpenSSL 0.9.x */
  250|       |	return TRUE;
  251|       |#else
  252|       |
  253|  1.14k|	if (HMAC_Init_ex(hmac, key, (int)keylen, evp, nullptr) == 1)
  ------------------
  |  Branch (253:6): [True: 1.14k, False: 0]
  ------------------
  254|  1.14k|		return TRUE;
  ------------------
  |  |  117|  1.14k|#define TRUE true
  ------------------
  255|       |
  256|      0|#endif
  257|      0|#endif
  258|       |#elif defined(WITH_MBEDTLS)
  259|       |	mbedtls_md_context_t* hmac = &ctx->hmac;
  260|       |	mbedtls_md_type_t md_type = winpr_mbedtls_get_md_type(md);
  261|       |	const mbedtls_md_info_t* md_info = mbedtls_md_info_from_type(md_type);
  262|       |
  263|       |	if (!md_info || !hmac)
  264|       |		return FALSE;
  265|       |
  266|       |	if (mbedtls_md_info_from_ctx(hmac) != md_info)
  267|       |	{
  268|       |		mbedtls_md_free(hmac); /* can be called at any time after mbedtls_md_init */
  269|       |
  270|       |		if (mbedtls_md_setup(hmac, md_info, 1) != 0)
  271|       |			return FALSE;
  272|       |	}
  273|       |
  274|       |	if (mbedtls_md_hmac_starts(hmac, key, keylen) == 0)
  275|       |		return TRUE;
  276|       |
  277|       |#endif
  278|      0|	return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  279|  1.14k|}
winpr_HMAC_Update:
  282|  1.69k|{
  283|  1.69k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.69k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.69k|	do                                                                                             \
  |  |  |  |   61|  1.69k|	{                                                                                              \
  |  |  |  |   62|  1.69k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.69k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.69k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.69k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.69k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.69k|                                                                                                   \
  |  |  |  |   70|  1.69k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.69k|	do                                                      \
  |  |  |  |  |  |   32|  1.69k|	{                                                       \
  |  |  |  |  |  |   33|  1.69k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.69k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.69k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.69k|                                                                                                   \
  |  |  |  |   72|  1.69k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.69k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.69k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.69k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|       |
  285|  1.69k|	switch (ctx->md)
  286|  1.69k|	{
  287|       |#if defined(WITH_INTERNAL_MD5)
  288|       |		case WINPR_MD_MD5:
  289|       |			hmac_md5_update(&ctx->hmac_md5, input, ilen);
  290|       |			return TRUE;
  291|       |#endif
  292|  1.69k|		default:
  ------------------
  |  Branch (292:3): [True: 1.69k, False: 0]
  ------------------
  293|  1.69k|			break;
  294|  1.69k|	}
  295|       |
  296|  1.69k|#if defined(WITH_OPENSSL)
  297|       |#if OPENSSL_VERSION_NUMBER >= 0x30000000L
  298|       |	return EVP_MAC_update(ctx->xhmac, input, ilen) == 1;
  299|       |#else
  300|  1.69k|	HMAC_CTX* hmac = ctx->hmac;
  301|       |#if (OPENSSL_VERSION_NUMBER < 0x10000000L) || \
  302|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  303|       |	HMAC_Update(hmac, input, ilen); /* no return value on OpenSSL 0.9.x */
  304|       |	return TRUE;
  305|       |#else
  306|       |
  307|  1.69k|	if (HMAC_Update(hmac, input, ilen) == 1)
  ------------------
  |  Branch (307:6): [True: 1.69k, False: 0]
  ------------------
  308|  1.69k|		return TRUE;
  ------------------
  |  |  117|  1.69k|#define TRUE true
  ------------------
  309|      0|#endif
  310|      0|#endif
  311|       |#elif defined(WITH_MBEDTLS)
  312|       |	mbedtls_md_context_t* mdctx = &ctx->hmac;
  313|       |
  314|       |	if (mbedtls_md_hmac_update(mdctx, input, ilen) == 0)
  315|       |		return TRUE;
  316|       |
  317|       |#endif
  318|      0|	return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  319|  1.69k|}
winpr_HMAC_Final:
  322|  1.13k|{
  323|  1.13k|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|  1.13k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.13k|	do                                                                                             \
  |  |  |  |   61|  1.13k|	{                                                                                              \
  |  |  |  |   62|  1.13k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.13k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.13k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.13k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.13k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.13k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.13k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.13k|                                                                                                   \
  |  |  |  |   70|  1.13k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.13k|	do                                                      \
  |  |  |  |  |  |   32|  1.13k|	{                                                       \
  |  |  |  |  |  |   33|  1.13k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.13k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.13k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.13k|                                                                                                   \
  |  |  |  |   72|  1.13k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.13k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.13k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.13k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  324|       |
  325|  1.13k|	switch (ctx->md)
  326|  1.13k|	{
  327|       |#if defined(WITH_INTERNAL_MD5)
  328|       |		case WINPR_MD_MD5:
  329|       |			if (olen < WINPR_MD5_DIGEST_LENGTH)
  330|       |				return FALSE;
  331|       |			hmac_md5_finalize(&ctx->hmac_md5, output);
  332|       |			return TRUE;
  333|       |#endif
  334|  1.13k|		default:
  ------------------
  |  Branch (334:3): [True: 1.13k, False: 0]
  ------------------
  335|  1.13k|			break;
  336|  1.13k|	}
  337|       |
  338|  1.13k|#if defined(WITH_OPENSSL)
  339|       |#if OPENSSL_VERSION_NUMBER >= 0x30000000L
  340|       |	const int rc = EVP_MAC_final(ctx->xhmac, output, nullptr, olen);
  341|       |	return (rc == 1);
  342|       |#else
  343|  1.13k|	HMAC_CTX* hmac = ctx->hmac;
  344|       |#if (OPENSSL_VERSION_NUMBER < 0x10000000L) || \
  345|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  346|       |	HMAC_Final(hmac, output, nullptr); /* no return value on OpenSSL 0.9.x */
  347|       |	return TRUE;
  348|       |#else
  349|       |
  350|  1.13k|	if (HMAC_Final(hmac, output, nullptr) == 1)
  ------------------
  |  Branch (350:6): [True: 1.13k, False: 0]
  ------------------
  351|  1.13k|		return TRUE;
  ------------------
  |  |  117|  1.13k|#define TRUE true
  ------------------
  352|       |
  353|      0|#endif
  354|      0|#endif
  355|       |#elif defined(WITH_MBEDTLS)
  356|       |	mbedtls_md_context_t* mdctx = &ctx->hmac;
  357|       |
  358|       |	if (mbedtls_md_hmac_finish(mdctx, output) == 0)
  359|       |		return TRUE;
  360|       |
  361|       |#endif
  362|      0|	return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  363|  1.13k|}
winpr_HMAC_Free:
  366|  1.14k|{
  367|  1.14k|	if (!ctx)
  ------------------
  |  Branch (367:6): [True: 0, False: 1.14k]
  ------------------
  368|      0|		return;
  369|       |
  370|  1.14k|#if defined(WITH_OPENSSL)
  371|       |#if OPENSSL_VERSION_NUMBER >= 0x30000000L
  372|       |	EVP_MAC_CTX_free(ctx->xhmac);
  373|       |#else
  374|  1.14k|	HMAC_CTX* hmac = ctx->hmac;
  375|       |
  376|  1.14k|	if (hmac)
  ------------------
  |  Branch (376:6): [True: 1.14k, False: 0]
  ------------------
  377|  1.14k|	{
  378|       |#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
  379|       |    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
  380|       |		HMAC_CTX_cleanup(hmac);
  381|       |		free(hmac);
  382|       |#else
  383|  1.14k|		HMAC_CTX_free(hmac);
  384|  1.14k|#endif
  385|  1.14k|	}
  386|  1.14k|#endif
  387|       |#elif defined(WITH_MBEDTLS)
  388|       |	mbedtls_md_context_t* hmac = &ctx->hmac;
  389|       |
  390|       |	if (hmac)
  391|       |		mbedtls_md_free(hmac);
  392|       |
  393|       |#endif
  394|       |
  395|  1.14k|	free(ctx);
  396|  1.14k|}
winpr_HMAC:
  400|    997|{
  401|    997|	BOOL result = FALSE;
  ------------------
  |  |  113|    997|#define FALSE false
  ------------------
  402|    997|	WINPR_HMAC_CTX* ctx = winpr_HMAC_New();
  403|       |
  404|    997|	if (!ctx)
  ------------------
  |  Branch (404:6): [True: 0, False: 997]
  ------------------
  405|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  406|       |
  407|    997|	if (!winpr_HMAC_Init(ctx, md, key, keylen))
  ------------------
  |  Branch (407:6): [True: 0, False: 997]
  ------------------
  408|      0|		goto out;
  409|       |
  410|    997|	if (!winpr_HMAC_Update(ctx, input, ilen))
  ------------------
  |  Branch (410:6): [True: 0, False: 997]
  ------------------
  411|      0|		goto out;
  412|       |
  413|    997|	if (!winpr_HMAC_Final(ctx, output, olen))
  ------------------
  |  Branch (413:6): [True: 0, False: 997]
  ------------------
  414|      0|		goto out;
  415|       |
  416|    997|	result = TRUE;
  ------------------
  |  |  117|    997|#define TRUE true
  ------------------
  417|    997|out:
  418|    997|	winpr_HMAC_Free(ctx);
  419|    997|	return result;
  420|    997|}
winpr_Digest_New:
  445|    335|{
  446|    335|	WINPR_DIGEST_CTX* ctx = calloc(1, sizeof(WINPR_DIGEST_CTX));
  447|    335|	if (!ctx)
  ------------------
  |  Branch (447:6): [True: 0, False: 335]
  ------------------
  448|      0|		return nullptr;
  449|       |
  450|    335|#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|    335|	ctx->mdctx = EVP_MD_CTX_new();
  456|    335|#endif
  457|    335|	if (!ctx->mdctx)
  ------------------
  |  Branch (457:6): [True: 0, False: 335]
  ------------------
  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|    335|	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|    335|}
winpr_Digest_Init:
  560|    335|{
  561|    335|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    335|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    335|	do                                                                                             \
  |  |  |  |   61|    335|	{                                                                                              \
  |  |  |  |   62|    335|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    335|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    335|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    335|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    335|                                                                                                   \
  |  |  |  |   70|    335|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    335|	do                                                      \
  |  |  |  |  |  |   32|    335|	{                                                       \
  |  |  |  |  |  |   33|    335|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    335|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    335|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    335|                                                                                                   \
  |  |  |  |   72|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    335|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    335|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    335|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  562|       |
  563|    335|	ctx->md = md;
  564|    335|	switch (md)
  565|    335|	{
  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|    335|		default:
  ------------------
  |  Branch (576:3): [True: 335, False: 0]
  ------------------
  577|    335|			break;
  578|    335|	}
  579|       |
  580|    335|#if defined(WITH_OPENSSL)
  581|    335|	const EVP_MD* evp = winpr_openssl_get_evp_md(md);
  582|    335|	return winpr_Digest_Init_Internal(ctx, evp);
  583|       |#else
  584|       |	return winpr_Digest_Init_Internal(ctx, md);
  585|       |#endif
  586|    335|}
winpr_Digest_Update:
  589|    335|{
  590|    335|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    335|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    335|	do                                                                                             \
  |  |  |  |   61|    335|	{                                                                                              \
  |  |  |  |   62|    335|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    335|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    335|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    335|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    335|                                                                                                   \
  |  |  |  |   70|    335|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    335|	do                                                      \
  |  |  |  |  |  |   32|    335|	{                                                       \
  |  |  |  |  |  |   33|    335|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    335|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    335|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    335|                                                                                                   \
  |  |  |  |   72|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    335|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    335|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    335|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  591|       |
  592|    335|	switch (ctx->md)
  593|    335|	{
  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|    335|		default:
  ------------------
  |  Branch (604:3): [True: 335, False: 0]
  ------------------
  605|    335|			break;
  606|    335|	}
  607|       |
  608|    335|#if defined(WITH_OPENSSL)
  609|    335|	EVP_MD_CTX* mdctx = ctx->mdctx;
  610|       |
  611|    335|	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;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  621|    335|}
winpr_Digest_Final:
  624|    335|{
  625|    335|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    335|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    335|	do                                                                                             \
  |  |  |  |   61|    335|	{                                                                                              \
  |  |  |  |   62|    335|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    335|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    335|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    335|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    335|                                                                                                   \
  |  |  |  |   70|    335|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    335|	do                                                      \
  |  |  |  |  |  |   32|    335|	{                                                       \
  |  |  |  |  |  |   33|    335|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    335|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    335|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    335|                                                                                                   \
  |  |  |  |   72|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    335|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    335|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    335|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  626|       |
  627|    335|	switch (ctx->md)
  628|    335|	{
  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|    335|		default:
  ------------------
  |  Branch (644:3): [True: 335, False: 0]
  ------------------
  645|    335|			break;
  646|    335|	}
  647|       |
  648|    335|#if defined(WITH_OPENSSL)
  649|    335|	EVP_MD_CTX* mdctx = ctx->mdctx;
  650|       |
  651|    335|	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;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  661|    335|}
winpr_Digest_Free:
  706|    335|{
  707|    335|	if (!ctx)
  ------------------
  |  Branch (707:6): [True: 0, False: 335]
  ------------------
  708|      0|		return;
  709|    335|#if defined(WITH_OPENSSL)
  710|    335|	if (ctx->mdctx)
  ------------------
  |  Branch (710:6): [True: 335, False: 0]
  ------------------
  711|    335|	{
  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|    335|		EVP_MD_CTX_free(ctx->mdctx);
  717|    335|#endif
  718|    335|	}
  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|    335|	free(ctx);
  729|    335|}
winpr_Digest:
  756|    335|{
  757|    335|	BOOL result = FALSE;
  ------------------
  |  |  113|    335|#define FALSE false
  ------------------
  758|    335|	WINPR_DIGEST_CTX* ctx = winpr_Digest_New();
  759|       |
  760|    335|	if (!ctx)
  ------------------
  |  Branch (760:6): [True: 0, False: 335]
  ------------------
  761|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  762|       |
  763|    335|	if (!winpr_Digest_Init(ctx, md))
  ------------------
  |  Branch (763:6): [True: 0, False: 335]
  ------------------
  764|      0|		goto out;
  765|       |
  766|    335|	if (!winpr_Digest_Update(ctx, input, ilen))
  ------------------
  |  Branch (766:6): [True: 0, False: 335]
  ------------------
  767|      0|		goto out;
  768|       |
  769|    335|	if (!winpr_Digest_Final(ctx, output, olen))
  ------------------
  |  Branch (769:6): [True: 0, False: 335]
  ------------------
  770|      0|		goto out;
  771|       |
  772|    335|	result = TRUE;
  ------------------
  |  |  117|    335|#define TRUE true
  ------------------
  773|    335|out:
  774|    335|	winpr_Digest_Free(ctx);
  775|    335|	return result;
  776|    335|}
hash.c:winpr_Digest_Init_Internal:
  480|    335|{
  481|    335|	WINPR_ASSERT(ctx);
  ------------------
  |  |   76|    335|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    335|	do                                                                                             \
  |  |  |  |   61|    335|	{                                                                                              \
  |  |  |  |   62|    335|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    335|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    335|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    335|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    335|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    335|                                                                                                   \
  |  |  |  |   70|    335|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    335|	do                                                      \
  |  |  |  |  |  |   32|    335|	{                                                       \
  |  |  |  |  |  |   33|    335|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    335|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    335|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    335|                                                                                                   \
  |  |  |  |   72|    335|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    335|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    335|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    335|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  482|    335|	EVP_MD_CTX* mdctx = ctx->mdctx;
  483|       |
  484|    335|	if (!mdctx || !evp)
  ------------------
  |  Branch (484:6): [True: 0, False: 335]
  |  Branch (484:16): [True: 0, False: 335]
  ------------------
  485|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  486|       |
  487|    335|	if (EVP_DigestInit_ex(mdctx, evp, nullptr) != 1)
  ------------------
  |  Branch (487:6): [True: 0, False: 335]
  ------------------
  488|      0|	{
  489|      0|		WLog_ERR(TAG, "Failed to initialize digest %s", winpr_md_type_to_string(ctx->md));
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  490|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  491|      0|	}
  492|       |
  493|    335|	return TRUE;
  ------------------
  |  |  117|    335|#define TRUE true
  ------------------
  494|    335|}

winpr_RAND:
   40|  1.11k|{
   41|  1.11k|#if defined(WITH_OPENSSL)
   42|  1.11k|	if (len > INT_MAX)
  ------------------
  |  Branch (42:6): [True: 0, False: 1.11k]
  ------------------
   43|      0|		return -1;
   44|  1.11k|	if (RAND_bytes(output, (int)len) != 1)
  ------------------
  |  Branch (44:6): [True: 0, False: 1.11k]
  ------------------
   45|      0|		return -1;
   46|       |#elif defined(WITH_MBEDTLS)
   47|       |#if defined(MBEDTLS_HAVEGE_C)
   48|       |	mbedtls_havege_state hs;
   49|       |	mbedtls_havege_init(&hs);
   50|       |
   51|       |	if (mbedtls_havege_random(&hs, output, len) != 0)
   52|       |		return -1;
   53|       |
   54|       |	mbedtls_havege_free(&hs);
   55|       |#else
   56|       |	int status;
   57|       |	mbedtls_entropy_context entropy;
   58|       |	mbedtls_hmac_drbg_context hmac_drbg;
   59|       |	const mbedtls_md_info_t* md_info;
   60|       |
   61|       |	mbedtls_entropy_init(&entropy);
   62|       |	mbedtls_hmac_drbg_init(&hmac_drbg);
   63|       |
   64|       |	md_info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
   65|       |	if ((status = mbedtls_hmac_drbg_seed(&hmac_drbg, md_info, mbedtls_entropy_func, &entropy,
   66|       |	                                     nullptr, 0)) != 0)
   67|       |		return -1;
   68|       |
   69|       |	status = mbedtls_hmac_drbg_random(&hmac_drbg, output, len);
   70|       |	mbedtls_hmac_drbg_free(&hmac_drbg);
   71|       |	mbedtls_entropy_free(&entropy);
   72|       |
   73|       |	if (status != 0)
   74|       |		return -1;
   75|       |#endif
   76|       |#endif
   77|  1.11k|	return 0;
   78|  1.11k|}

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|}

GetLastError:
   44|  7.66k|{
   45|  7.66k|	PTEB pt = NtCurrentTeb();
   46|  7.66k|	if (pt)
  ------------------
  |  Branch (46:6): [True: 7.66k, False: 0]
  ------------------
   47|  7.66k|	{
   48|  7.66k|		return pt->LastErrorValue;
   49|  7.66k|	}
   50|      0|	return ERROR_OUTOFMEMORY;
  ------------------
  |  |  199|      0|#define ERROR_OUTOFMEMORY 0x0000000E
  ------------------
   51|  7.66k|}
SetLastError:
   54|  7.66k|{
   55|  7.66k|	PTEB pt = NtCurrentTeb();
   56|  7.66k|	if (pt)
  ------------------
  |  Branch (56:6): [True: 7.66k, False: 0]
  ------------------
   57|  7.66k|	{
   58|  7.66k|		pt->LastErrorValue = dwErrCode;
   59|  7.66k|	}
   60|  7.66k|}

winpr_fopen:
 1521|  3.43k|{
 1522|  3.43k|#ifndef _WIN32
 1523|  3.43k|	return fopen(path, mode);
 1524|       |#else
 1525|       |	LPWSTR lpPathW = nullptr;
 1526|       |	LPWSTR lpModeW = nullptr;
 1527|       |	FILE* result = nullptr;
 1528|       |
 1529|       |	if (!path || !mode)
 1530|       |		return nullptr;
 1531|       |
 1532|       |	lpPathW = ConvertUtf8ToWCharAlloc(path, nullptr);
 1533|       |	if (!lpPathW)
 1534|       |		goto cleanup;
 1535|       |
 1536|       |	lpModeW = ConvertUtf8ToWCharAlloc(mode, nullptr);
 1537|       |	if (!lpModeW)
 1538|       |		goto cleanup;
 1539|       |
 1540|       |	result = _wfopen(lpPathW, lpModeW);
 1541|       |
 1542|       |cleanup:
 1543|       |	free(lpPathW);
 1544|       |	free(lpModeW);
 1545|       |	return result;
 1546|       |#endif
 1547|  3.43k|}

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

NtCurrentTeb:
   50|  15.3k|{
   51|  15.3k|	PTEB teb = nullptr;
   52|       |
   53|  15.3k|	if (pthread_once(&sTebOnceControl, sTebInitOnce) == 0)
  ------------------
  |  Branch (53:6): [True: 15.3k, False: 0]
  ------------------
   54|  15.3k|	{
   55|  15.3k|		if ((teb = pthread_getspecific(sTebKey)) == nullptr)
  ------------------
  |  Branch (55:7): [True: 1, False: 15.3k]
  ------------------
   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|  15.3k|	}
   62|  15.3k|	return teb;
   63|  15.3k|}
nt.c:sTebInitOnce:
   45|      1|{
   46|      1|	pthread_key_create(&sTebKey, sTebDestruct);
   47|      1|}

NativePathCchAppendA:
   79|  10.2k|{
   80|  10.2k|	BOOL pathBackslash = FALSE;
  ------------------
  |  |  113|  10.2k|#define FALSE false
  ------------------
   81|  10.2k|	BOOL moreBackslash = FALSE;
  ------------------
  |  |  113|  10.2k|#define FALSE false
  ------------------
   82|       |
   83|  10.2k|	if (!pszPath)
  ------------------
  |  Branch (83:6): [True: 0, False: 10.2k]
  ------------------
   84|      0|		return E_INVALIDARG;
  ------------------
  |  |   54|      0|#define E_INVALIDARG -2147024809l  // 0x80070057L
  ------------------
   85|       |
   86|  10.2k|	if (!pszMore)
  ------------------
  |  Branch (86:6): [True: 0, False: 10.2k]
  ------------------
   87|      0|		return E_INVALIDARG;
  ------------------
  |  |   54|      0|#define E_INVALIDARG -2147024809l  // 0x80070057L
  ------------------
   88|       |
   89|  10.2k|	if ((cchPath == 0) || (cchPath > PATHCCH_MAX_CCH))
  ------------------
  |  |   52|  10.2k|#define PATHCCH_MAX_CCH 0x8000
  ------------------
  |  Branch (89:6): [True: 0, False: 10.2k]
  |  Branch (89:24): [True: 0, False: 10.2k]
  ------------------
   90|      0|		return E_INVALIDARG;
  ------------------
  |  |   54|      0|#define E_INVALIDARG -2147024809l  // 0x80070057L
  ------------------
   91|       |
   92|  10.2k|	const size_t pszPathLength = strnlen(pszPath, cchPath);
   93|  10.2k|	if (pszPathLength > 0)
  ------------------
  |  Branch (93:6): [True: 10.2k, False: 0]
  ------------------
   94|  10.2k|		pathBackslash = (pszPath[pszPathLength - 1] == CUR_PATH_SEPARATOR_CHR) ? TRUE : FALSE;
  ------------------
  |  |  333|  10.2k|#define CUR_PATH_SEPARATOR_CHR PATH_SEPARATOR_CHR
  |  |  ------------------
  |  |  |  |   67|  10.2k|#define PATH_SEPARATOR_CHR PATH_SLASH_CHR
  |  |  ------------------
  ------------------
              		pathBackslash = (pszPath[pszPathLength - 1] == CUR_PATH_SEPARATOR_CHR) ? TRUE : FALSE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
              		pathBackslash = (pszPath[pszPathLength - 1] == CUR_PATH_SEPARATOR_CHR) ? TRUE : FALSE;
  ------------------
  |  |  113|  10.2k|#define FALSE false
  ------------------
  |  Branch (94:19): [True: 0, False: 10.2k]
  ------------------
   95|       |
   96|  10.2k|	const size_t pszMoreLength = strnlen(pszMore, cchPath);
   97|  10.2k|	if (pszMoreLength > 0)
  ------------------
  |  Branch (97:6): [True: 10.2k, False: 0]
  ------------------
   98|  10.2k|		moreBackslash = (pszMore[0] == CUR_PATH_SEPARATOR_CHR) ? TRUE : FALSE;
  ------------------
  |  |  333|  10.2k|#define CUR_PATH_SEPARATOR_CHR PATH_SEPARATOR_CHR
  |  |  ------------------
  |  |  |  |   67|  10.2k|#define PATH_SEPARATOR_CHR PATH_SLASH_CHR
  |  |  ------------------
  ------------------
              		moreBackslash = (pszMore[0] == CUR_PATH_SEPARATOR_CHR) ? TRUE : FALSE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
              		moreBackslash = (pszMore[0] == CUR_PATH_SEPARATOR_CHR) ? TRUE : FALSE;
  ------------------
  |  |  113|  10.2k|#define FALSE false
  ------------------
  |  Branch (98:19): [True: 0, False: 10.2k]
  ------------------
   99|       |
  100|  10.2k|	if (pathBackslash && moreBackslash)
  ------------------
  |  Branch (100:6): [True: 0, False: 10.2k]
  |  Branch (100:23): [True: 0, False: 0]
  ------------------
  101|      0|	{
  102|      0|		if ((pszPathLength + pszMoreLength - 1) < cchPath)
  ------------------
  |  Branch (102:7): [True: 0, False: 0]
  ------------------
  103|      0|		{
  104|      0|			sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "%s", &pszMore[1]);
  ------------------
  |  |  209|      0|#define sprintf_s snprintf
  ------------------
  105|      0|			return S_OK;
  ------------------
  |  |  180|      0|#define S_OK (0L)
  ------------------
  106|      0|		}
  107|      0|	}
  108|  10.2k|	else if ((pathBackslash && !moreBackslash) || (!pathBackslash && moreBackslash))
  ------------------
  |  Branch (108:12): [True: 0, False: 10.2k]
  |  Branch (108:29): [True: 0, False: 0]
  |  Branch (108:49): [True: 10.2k, False: 0]
  |  Branch (108:67): [True: 0, False: 10.2k]
  ------------------
  109|      0|	{
  110|      0|		if ((pszPathLength + pszMoreLength) < cchPath)
  ------------------
  |  Branch (110:7): [True: 0, False: 0]
  ------------------
  111|      0|		{
  112|      0|			sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "%s", pszMore);
  ------------------
  |  |  209|      0|#define sprintf_s snprintf
  ------------------
  113|      0|			return S_OK;
  ------------------
  |  |  180|      0|#define S_OK (0L)
  ------------------
  114|      0|		}
  115|      0|	}
  116|  10.2k|	else if (!pathBackslash && !moreBackslash)
  ------------------
  |  Branch (116:11): [True: 10.2k, False: 0]
  |  Branch (116:29): [True: 10.2k, False: 0]
  ------------------
  117|  10.2k|	{
  118|  10.2k|		if ((pszPathLength + pszMoreLength + 1) < cchPath)
  ------------------
  |  Branch (118:7): [True: 10.2k, False: 0]
  ------------------
  119|  10.2k|		{
  120|  10.2k|			sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "%s%s",
  ------------------
  |  |  209|  10.2k|#define sprintf_s snprintf
  ------------------
  121|  10.2k|			          CUR_PATH_SEPARATOR_STR, pszMore);
  ------------------
  |  |  334|  10.2k|#define CUR_PATH_SEPARATOR_STR PATH_SEPARATOR_STR
  |  |  ------------------
  |  |  |  |   68|  10.2k|#define PATH_SEPARATOR_STR PATH_SLASH_STR
  |  |  ------------------
  ------------------
  122|  10.2k|			return S_OK;
  ------------------
  |  |  180|  10.2k|#define S_OK (0L)
  ------------------
  123|  10.2k|		}
  124|  10.2k|	}
  125|       |
  126|      0|	return HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE);
  ------------------
  |  |  344|      0|#define ERROR_FILENAME_EXCED_RANGE 0x000000CE
  ------------------
  127|  10.2k|}

PathCchConvertStyleA:
  808|  20.5k|{
  809|  20.5k|	if (dwFlags == PATH_STYLE_WINDOWS)
  ------------------
  |  |  352|  20.5k|#define PATH_STYLE_WINDOWS 0x00000001
  ------------------
  |  Branch (809:6): [True: 0, False: 20.5k]
  ------------------
  810|      0|	{
  811|      0|		for (size_t index = 0; index < cchPath; index++)
  ------------------
  |  Branch (811:26): [True: 0, False: 0]
  ------------------
  812|      0|		{
  813|      0|			if (pszPath[index] == PATH_SLASH_CHR)
  ------------------
  |  Branch (813:8): [True: 0, False: 0]
  ------------------
  814|      0|				pszPath[index] = PATH_BACKSLASH_CHR;
  815|      0|		}
  816|      0|	}
  817|  20.5k|	else if (dwFlags == PATH_STYLE_UNIX)
  ------------------
  |  |  353|  20.5k|#define PATH_STYLE_UNIX 0x00000002
  ------------------
  |  Branch (817:11): [True: 0, False: 20.5k]
  ------------------
  818|      0|	{
  819|      0|		for (size_t index = 0; index < cchPath; index++)
  ------------------
  |  Branch (819:26): [True: 0, False: 0]
  ------------------
  820|      0|		{
  821|      0|			if (pszPath[index] == PATH_BACKSLASH_CHR)
  ------------------
  |  Branch (821:8): [True: 0, False: 0]
  ------------------
  822|      0|				pszPath[index] = PATH_SLASH_CHR;
  823|      0|		}
  824|      0|	}
  825|  20.5k|	else if (dwFlags == PATH_STYLE_NATIVE)
  ------------------
  |  |  354|  20.5k|#define PATH_STYLE_NATIVE 0x00000003
  ------------------
  |  Branch (825:11): [True: 20.5k, False: 0]
  ------------------
  826|  20.5k|	{
  827|  20.5k|		if (PATH_SEPARATOR_CHR == PATH_BACKSLASH_CHR)
  ------------------
  |  |   67|  20.5k|#define PATH_SEPARATOR_CHR PATH_SLASH_CHR
  ------------------
  |  Branch (827:7): [Folded, False: 20.5k]
  ------------------
  828|      0|		{
  829|       |			/* Unix-style to Windows-style */
  830|       |
  831|      0|			for (size_t index = 0; index < cchPath; index++)
  ------------------
  |  Branch (831:27): [True: 0, False: 0]
  ------------------
  832|      0|			{
  833|      0|				if (pszPath[index] == PATH_SLASH_CHR)
  ------------------
  |  Branch (833:9): [True: 0, False: 0]
  ------------------
  834|      0|					pszPath[index] = PATH_BACKSLASH_CHR;
  835|      0|			}
  836|      0|		}
  837|  20.5k|		else if (PATH_SEPARATOR_CHR == PATH_SLASH_CHR)
  ------------------
  |  |   67|  20.5k|#define PATH_SEPARATOR_CHR PATH_SLASH_CHR
  ------------------
  |  Branch (837:12): [True: 20.5k, Folded]
  ------------------
  838|  20.5k|		{
  839|       |			/* Windows-style to Unix-style */
  840|       |
  841|   322k|			for (size_t index = 0; index < cchPath; index++)
  ------------------
  |  Branch (841:27): [True: 302k, False: 20.5k]
  ------------------
  842|   302k|			{
  843|   302k|				if (pszPath[index] == PATH_BACKSLASH_CHR)
  ------------------
  |  Branch (843:9): [True: 0, False: 302k]
  ------------------
  844|      0|					pszPath[index] = PATH_SLASH_CHR;
  845|   302k|			}
  846|  20.5k|		}
  847|      0|		else
  848|      0|		{
  849|       |			/* Unexpected error */
  850|      0|			return E_FAIL;
  ------------------
  |  |   59|      0|#define E_FAIL -2147467259l        // 0x80004005L
  ------------------
  851|      0|		}
  852|  20.5k|	}
  853|      0|	else
  854|      0|	{
  855|       |		/* Gangnam style? */
  856|      0|		return E_FAIL;
  ------------------
  |  |   59|      0|#define E_FAIL -2147467259l        // 0x80004005L
  ------------------
  857|      0|	}
  858|       |
  859|  20.5k|	return S_OK;
  ------------------
  |  |  180|  20.5k|#define S_OK (0L)
  ------------------
  860|  20.5k|}
winpr_GetConfigFilePathVA:
 1219|  3.43k|{
 1220|  3.43k|	eKnownPathTypes id = system ? KNOWN_PATH_SYSTEM_CONFIG_HOME : KNOWN_PATH_XDG_CONFIG_HOME;
  ------------------
  |  Branch (1220:23): [True: 3.43k, False: 0]
  ------------------
 1221|  3.43k|	const char* vendor = winpr_getApplicationDetailsVendor();
 1222|  3.43k|	const char* product = winpr_getApplicationDetailsProduct();
 1223|  3.43k|	const SSIZE_T version = winpr_getApplicationDetailsVersion();
 1224|       |
 1225|  3.43k|	if (!vendor || !product)
  ------------------
  |  Branch (1225:6): [True: 0, False: 3.43k]
  |  Branch (1225:17): [True: 0, False: 3.43k]
  ------------------
 1226|      0|		return nullptr;
 1227|       |
 1228|  3.43k|	char* config = GetKnownSubPathV(id, "%s", vendor);
 1229|  3.43k|	if (!config)
  ------------------
  |  Branch (1229:6): [True: 0, False: 3.43k]
  ------------------
 1230|      0|		return nullptr;
 1231|       |
 1232|  3.43k|	char* base = nullptr;
 1233|  3.43k|	if (version < 0)
  ------------------
  |  Branch (1233:6): [True: 3.43k, False: 0]
  ------------------
 1234|  3.43k|		base = GetCombinedPathV(config, "%s", product);
 1235|      0|	else
 1236|      0|		base = GetCombinedPathV(config, "%s%" PRIdz, product, version);
  ------------------
  |  |  474|      0|#define PRIdz "zd"
  ------------------
 1237|  3.43k|	free(config);
 1238|       |
 1239|  3.43k|	if (!base)
  ------------------
  |  Branch (1239:6): [True: 0, False: 3.43k]
  ------------------
 1240|      0|		return nullptr;
 1241|  3.43k|	char* path = GetCombinedPathVA(base, filename, ap);
 1242|  3.43k|	free(base);
 1243|       |
 1244|  3.43k|	return path;
 1245|  3.43k|}
winpr_GetConfigFilePath:
 1248|  3.43k|{
 1249|  3.43k|	if (!filename)
  ------------------
  |  Branch (1249:6): [True: 0, False: 3.43k]
  ------------------
 1250|      0|		return winpr_GetConfigFilePathV(system, "%s", "");
 1251|  3.43k|	return winpr_GetConfigFilePathV(system, "%s", filename);
 1252|  3.43k|}
winpr_GetConfigFilePathV:
 1255|  3.43k|{
 1256|  3.43k|	va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.43k|	{                      \
  |  |   85|  3.43k|	} /** @since version 3.24.0 */
  ------------------
 1257|  3.43k|	va_start(ap, filename);
 1258|  3.43k|	char* str = winpr_GetConfigFilePathVA(system, filename, ap);
 1259|       |	va_end(ap);
 1260|  3.43k|	return str;
 1261|  3.43k|}

GetKnownPath:
  352|  3.43k|{
  353|  3.43k|	char* path = nullptr;
  354|       |
  355|  3.43k|	switch (id)
  356|  3.43k|	{
  357|      0|		case KNOWN_PATH_HOME:
  ------------------
  |  Branch (357:3): [True: 0, False: 3.43k]
  ------------------
  358|      0|			path = GetPath_HOME();
  359|      0|			break;
  360|       |
  361|      0|		case KNOWN_PATH_TEMP:
  ------------------
  |  Branch (361:3): [True: 0, False: 3.43k]
  ------------------
  362|      0|			path = GetPath_TEMP();
  363|      0|			break;
  364|       |
  365|      0|		case KNOWN_PATH_XDG_DATA_HOME:
  ------------------
  |  Branch (365:3): [True: 0, False: 3.43k]
  ------------------
  366|      0|			path = GetPath_XDG_DATA_HOME();
  367|      0|			break;
  368|       |
  369|      0|		case KNOWN_PATH_XDG_CONFIG_HOME:
  ------------------
  |  Branch (369:3): [True: 0, False: 3.43k]
  ------------------
  370|      0|			path = GetPath_XDG_CONFIG_HOME();
  371|      0|			break;
  372|       |
  373|      0|		case KNOWN_PATH_XDG_CACHE_HOME:
  ------------------
  |  Branch (373:3): [True: 0, False: 3.43k]
  ------------------
  374|      0|			path = GetPath_XDG_CACHE_HOME();
  375|      0|			break;
  376|       |
  377|      0|		case KNOWN_PATH_XDG_RUNTIME_DIR:
  ------------------
  |  Branch (377:3): [True: 0, False: 3.43k]
  ------------------
  378|      0|			path = GetPath_XDG_RUNTIME_DIR();
  379|      0|			break;
  380|       |
  381|  3.43k|		case KNOWN_PATH_SYSTEM_CONFIG_HOME:
  ------------------
  |  Branch (381:3): [True: 3.43k, False: 0]
  ------------------
  382|  3.43k|			path = GetPath_SYSTEM_CONFIG_HOME();
  383|  3.43k|			break;
  384|       |
  385|      0|		default:
  ------------------
  |  Branch (385:3): [True: 0, False: 3.43k]
  ------------------
  386|      0|			path = nullptr;
  387|      0|			break;
  388|  3.43k|	}
  389|       |
  390|  3.43k|	if (!path)
  ------------------
  |  Branch (390:6): [True: 0, False: 3.43k]
  ------------------
  391|      0|		WLog_WARN(TAG, "Path %s is nullptr",
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  |  |  |  Branch (336:67): [True: 0, False: 0]
  |  |  |  Branch (336:67): [Folded, False: 0]
  |  |  |  Branch (336:67): [Folded, False: 0]
  |  |  |  Branch (336:67): [True: 0, False: 0]
  |  |  |  Branch (336:67): [True: 0, False: 0]
  |  |  |  Branch (336:67): [True: 0, False: 0]
  |  |  |  Branch (336:67): [True: 0, False: 0]
  |  |  |  Branch (336:67): [Folded, False: 0]
  |  |  |  Branch (336:67): [Folded, False: 0]
  |  |  ------------------
  ------------------
  392|  3.43k|		          GetKnownPathIdString(WINPR_ASSERTING_INT_CAST(int, id)));
  393|  3.43k|	return path;
  394|  3.43k|}
GetKnownSubPathV:
  404|  3.43k|{
  405|  3.43k|	va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.43k|	{                      \
  |  |   85|  3.43k|	} /** @since version 3.24.0 */
  ------------------
  406|       |
  407|  3.43k|	va_start(ap, path);
  408|  3.43k|	char* str = GetKnownSubPathVA(id, path, ap);
  409|       |	va_end(ap);
  410|  3.43k|	return str;
  411|  3.43k|}
GetKnownSubPathVA:
  414|  3.43k|{
  415|  3.43k|	char* knownPath = GetKnownPath(id);
  416|  3.43k|	if (!knownPath)
  ------------------
  |  Branch (416:6): [True: 0, False: 3.43k]
  ------------------
  417|      0|		return nullptr;
  418|       |
  419|  3.43k|	char* subPath = GetCombinedPathVA(knownPath, path, ap);
  420|  3.43k|	free(knownPath);
  421|  3.43k|	return subPath;
  422|  3.43k|}
GetCombinedPathV:
  486|  3.43k|{
  487|  3.43k|	va_list ap = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.43k|	{                      \
  |  |   85|  3.43k|	} /** @since version 3.24.0 */
  ------------------
  488|       |
  489|  3.43k|	va_start(ap, subPathFmt);
  490|  3.43k|	char* str = GetCombinedPathVA(basePath, subPathFmt, ap);
  491|       |	va_end(ap);
  492|  3.43k|	return str;
  493|  3.43k|}
GetCombinedPathVA:
  496|  10.2k|{
  497|  10.2k|	HRESULT status = 0;
  498|  10.2k|	char* subPathCpy = nullptr;
  499|  10.2k|	size_t basePathLength = 0;
  500|  10.2k|	size_t subPathLength = 0;
  501|       |
  502|  10.2k|	if (basePath)
  ------------------
  |  Branch (502:6): [True: 10.2k, False: 0]
  ------------------
  503|  10.2k|		basePathLength = strlen(basePath);
  504|       |
  505|  10.2k|	bool haveSubPath = subPathFmt && (*subPathFmt != '\0');
  ------------------
  |  Branch (505:21): [True: 10.2k, False: 0]
  |  Branch (505:35): [True: 10.2k, False: 0]
  ------------------
  506|  10.2k|	if (haveSubPath)
  ------------------
  |  Branch (506:6): [True: 10.2k, False: 0]
  ------------------
  507|  10.2k|	{
  508|  10.2k|		const int rc = winpr_vasprintf(&subPathCpy, &subPathLength, subPathFmt, ap);
  509|  10.2k|		if (rc < 0)
  ------------------
  |  Branch (509:7): [True: 0, False: 10.2k]
  ------------------
  510|      0|			return nullptr;
  511|  10.2k|		if (rc == 0)
  ------------------
  |  Branch (511:7): [True: 0, False: 10.2k]
  ------------------
  512|      0|		{
  513|      0|			free(subPathCpy);
  514|      0|			subPathCpy = nullptr;
  515|      0|			subPathLength = 0;
  516|      0|			haveSubPath = false;
  517|      0|		}
  518|  10.2k|	}
  519|       |
  520|  10.2k|	const size_t length = basePathLength + subPathLength + 1;
  521|  10.2k|	char* path = (char*)calloc(1, length + 1);
  522|       |
  523|  10.2k|	if (!path)
  ------------------
  |  Branch (523:6): [True: 0, False: 10.2k]
  ------------------
  524|      0|		goto fail;
  525|       |
  526|  10.2k|	if (basePath)
  ------------------
  |  Branch (526:6): [True: 10.2k, False: 0]
  ------------------
  527|  10.2k|		CopyMemory(path, basePath, basePathLength);
  ------------------
  |  |  123|  10.2k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  528|       |
  529|  10.2k|	if (FAILED(PathCchConvertStyleA(path, basePathLength, PATH_STYLE_NATIVE)))
  ------------------
  |  |  165|  10.2k|#define FAILED(hr) (((hr)) < 0)
  |  |  ------------------
  |  |  |  Branch (165:20): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
  530|      0|		goto fail;
  531|       |
  532|  10.2k|	if (!haveSubPath)
  ------------------
  |  Branch (532:6): [True: 0, False: 10.2k]
  ------------------
  533|      0|		return path;
  534|       |
  535|  10.2k|	if (!subPathCpy)
  ------------------
  |  Branch (535:6): [True: 0, False: 10.2k]
  ------------------
  536|      0|		goto fail;
  537|       |
  538|  10.2k|	if (FAILED(PathCchConvertStyleA(subPathCpy, subPathLength, PATH_STYLE_NATIVE)))
  ------------------
  |  |  165|  10.2k|#define FAILED(hr) (((hr)) < 0)
  |  |  ------------------
  |  |  |  Branch (165:20): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
  539|      0|		goto fail;
  540|       |
  541|  10.2k|	status = NativePathCchAppendA(path, length + 1, subPathCpy);
  542|  10.2k|	if (FAILED(status))
  ------------------
  |  |  165|  10.2k|#define FAILED(hr) (((hr)) < 0)
  |  |  ------------------
  |  |  |  Branch (165:20): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
  543|      0|		goto fail;
  544|       |
  545|  10.2k|	free(subPathCpy);
  546|  10.2k|	return path;
  547|       |
  548|      0|fail:
  549|      0|	free(path);
  550|      0|	free(subPathCpy);
  551|      0|	return nullptr;
  552|  10.2k|}
shell.c:GetPath_SYSTEM_CONFIG_HOME:
  233|  3.43k|{
  234|  3.43k|	char* path = nullptr;
  235|       |#if defined(WIN32) && !defined(_UWP)
  236|       |
  237|       |	path = win_get_known_folder(&FOLDERID_ProgramData, FALSE);
  238|       |
  239|       |#elif defined(__IOS__)
  240|       |	path = ios_get_data();
  241|       |#else
  242|  3.43k|	path = _strdup(WINPR_INSTALL_SYSCONFDIR);
  ------------------
  |  |    9|  3.43k|#define WINPR_INSTALL_SYSCONFDIR "/usr/local/etc"
  ------------------
  243|  3.43k|#endif
  244|  3.43k|	return path;
  245|  3.43k|}

RegOpenKeyExA:
  304|  3.43k|{
  305|  3.43k|	Reg* reg = RegGetInstance();
  306|       |
  307|  3.43k|	if (!reg)
  ------------------
  |  Branch (307:6): [True: 3.43k, False: 0]
  ------------------
  308|  3.43k|		return -1;
  309|       |
  310|      0|	if (hKey != HKEY_LOCAL_MACHINE)
  ------------------
  |  |  120|      0|#define HKEY_LOCAL_MACHINE ((HKEY)(LONG_PTR)(LONG)0x80000002)
  ------------------
  |  Branch (310:6): [True: 0, False: 0]
  ------------------
  311|      0|	{
  312|      0|		WLog_WARN(TAG, "Registry emulation only supports HKEY_LOCAL_MACHINE");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
  313|      0|		return ERROR_FILE_NOT_FOUND;
  ------------------
  |  |  187|      0|#define ERROR_FILE_NOT_FOUND 0x00000002
  ------------------
  314|      0|	}
  315|       |
  316|      0|	WINPR_ASSERT(reg->root_key);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|      0|	RegKey* pKey = reg->root_key->subkeys;
  318|       |
  319|      0|	while (pKey != nullptr)
  ------------------
  |  Branch (319:9): [True: 0, False: 0]
  ------------------
  320|      0|	{
  321|      0|		WINPR_ASSERT(lpSubKey);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  322|       |
  323|      0|		if (pKey->subname && (_stricmp(pKey->subname, lpSubKey) == 0))
  ------------------
  |  Branch (323:7): [True: 0, False: 0]
  |  Branch (323:24): [True: 0, False: 0]
  ------------------
  324|      0|		{
  325|      0|			*phkResult = (HKEY)pKey;
  326|      0|			return ERROR_SUCCESS;
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  327|      0|		}
  328|       |
  329|      0|		pKey = pKey->next;
  330|      0|	}
  331|       |
  332|      0|	*phkResult = nullptr;
  333|       |
  334|      0|	return ERROR_FILE_NOT_FOUND;
  ------------------
  |  |  187|      0|#define ERROR_FILE_NOT_FOUND 0x00000002
  ------------------
  335|      0|}
registry.c:RegGetInstance:
   66|  3.43k|{
   67|  3.43k|	if (!instance)
  ------------------
  |  Branch (67:6): [True: 3.43k, False: 0]
  ------------------
   68|  3.43k|		instance = reg_open(1);
   69|       |
   70|  3.43k|	return instance;
   71|  3.43k|}

reg_open:
  489|  3.43k|{
  490|  3.43k|	Reg* reg = (Reg*)calloc(1, sizeof(Reg));
  491|       |
  492|  3.43k|	if (!reg)
  ------------------
  |  Branch (492:6): [True: 0, False: 3.43k]
  ------------------
  493|      0|		return nullptr;
  494|       |
  495|  3.43k|	reg->read_only = read_only;
  496|  3.43k|	reg->filename = winpr_GetConfigFilePath(TRUE, "HKLM.reg");
  ------------------
  |  |  117|  3.43k|#define TRUE true
  ------------------
  497|  3.43k|	if (!reg->filename)
  ------------------
  |  Branch (497:6): [True: 0, False: 3.43k]
  ------------------
  498|      0|		goto fail;
  499|       |
  500|  3.43k|	if (reg->read_only)
  ------------------
  |  Branch (500:6): [True: 3.43k, False: 0]
  ------------------
  501|  3.43k|		reg->fp = winpr_fopen(reg->filename, "r");
  502|      0|	else
  503|      0|	{
  504|      0|		reg->fp = winpr_fopen(reg->filename, "r+");
  505|       |
  506|      0|		if (!reg->fp)
  ------------------
  |  Branch (506:7): [True: 0, False: 0]
  ------------------
  507|      0|			reg->fp = winpr_fopen(reg->filename, "w+");
  508|      0|	}
  509|       |
  510|  3.43k|	if (!reg->fp)
  ------------------
  |  Branch (510:6): [True: 3.43k, False: 0]
  ------------------
  511|  3.43k|		goto fail;
  512|       |
  513|      0|	reg->root_key = (RegKey*)calloc(1, sizeof(RegKey));
  514|       |
  515|      0|	if (!reg->root_key)
  ------------------
  |  Branch (515:6): [True: 0, False: 0]
  ------------------
  516|      0|		goto fail;
  517|       |
  518|      0|	reg->root_key->values = nullptr;
  519|      0|	reg->root_key->subkeys = nullptr;
  520|      0|	reg->root_key->name = "HKEY_LOCAL_MACHINE";
  521|      0|	reg_load(reg);
  522|      0|	return reg;
  523|       |
  524|  3.43k|fail:
  525|  3.43k|	reg_close(reg);
  526|  3.43k|	return nullptr;
  527|      0|}
reg_close:
  530|  3.43k|{
  531|  3.43k|	if (reg)
  ------------------
  |  Branch (531:6): [True: 3.43k, False: 0]
  ------------------
  532|  3.43k|	{
  533|  3.43k|		reg_unload(reg);
  534|  3.43k|		if (reg->fp)
  ------------------
  |  Branch (534:7): [True: 0, False: 3.43k]
  ------------------
  535|      0|			(void)fclose(reg->fp);
  536|  3.43k|		free(reg->filename);
  537|  3.43k|		free(reg);
  538|  3.43k|	}
  539|  3.43k|}
registry_reg.c:reg_unload:
  471|  3.43k|{
  472|  3.43k|	WINPR_ASSERT(reg);
  ------------------
  |  |   76|  3.43k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.43k|	do                                                                                             \
  |  |  |  |   61|  3.43k|	{                                                                                              \
  |  |  |  |   62|  3.43k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.43k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.43k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.43k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.43k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.43k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.43k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.43k|                                                                                                   \
  |  |  |  |   70|  3.43k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.43k|	do                                                      \
  |  |  |  |  |  |   32|  3.43k|	{                                                       \
  |  |  |  |  |  |   33|  3.43k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.43k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.43k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.43k|                                                                                                   \
  |  |  |  |   72|  3.43k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.43k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.43k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.43k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  473|  3.43k|	if (reg->root_key)
  ------------------
  |  Branch (473:6): [True: 0, False: 3.43k]
  ------------------
  474|      0|	{
  475|      0|		RegKey* pKey = reg->root_key->subkeys;
  476|       |
  477|      0|		while (pKey != nullptr)
  ------------------
  |  Branch (477:10): [True: 0, False: 0]
  ------------------
  478|      0|		{
  479|      0|			RegKey* pKeyNext = pKey->next;
  480|      0|			reg_unload_key(reg, pKey);
  481|      0|			pKey = pKeyNext;
  482|      0|		}
  483|       |
  484|      0|		free(reg->root_key);
  485|      0|	}
  486|  3.43k|}

CREDSSP_init:
  332|      1|{
  333|      1|	InitializeConstWCharFromUtf8(CREDSSP_SecPkgInfoA.Name, CREDSSP_SecPkgInfoW_NameBuffer,
  334|      1|	                             ARRAYSIZE(CREDSSP_SecPkgInfoW_NameBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|      1|	InitializeConstWCharFromUtf8(CREDSSP_SecPkgInfoA.Comment, CREDSSP_SecPkgInfoW_CommentBuffer,
  336|      1|	                             ARRAYSIZE(CREDSSP_SecPkgInfoW_CommentBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  337|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  338|      1|}

KERBEROS_init:
 2494|      1|{
 2495|      1|	InitializeConstWCharFromUtf8(KERBEROS_SecPkgInfoA.Name, KERBEROS_SecPkgInfoW_NameBuffer,
 2496|      1|	                             ARRAYSIZE(KERBEROS_SecPkgInfoW_NameBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2497|      1|	InitializeConstWCharFromUtf8(KERBEROS_SecPkgInfoA.Comment, KERBEROS_SecPkgInfoW_CommentBuffer,
 2498|      1|	                             ARRAYSIZE(KERBEROS_SecPkgInfoW_CommentBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2499|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
 2500|      1|}

ntlm_negotiate_flags_string:
 1521|  3.02k|{
 1522|  3.02k|	if (!buffer || (size == 0))
  ------------------
  |  Branch (1522:6): [True: 0, False: 3.02k]
  |  Branch (1522:17): [True: 0, False: 3.02k]
  ------------------
 1523|      0|		return buffer;
 1524|       |
 1525|  3.02k|	(void)_snprintf(buffer, size, "[0x%08" PRIx32 "] ", flags);
  ------------------
  |  |  210|  3.02k|#define _snprintf snprintf
  ------------------
 1526|       |
 1527|  96.8k|	for (int x = 0; x < 31; x++)
  ------------------
  |  Branch (1527:18): [True: 93.7k, False: 3.02k]
  ------------------
 1528|  93.7k|	{
 1529|  93.7k|		const UINT32 mask = 1u << x;
 1530|  93.7k|		size_t len = strnlen(buffer, size);
 1531|  93.7k|		if (flags & mask)
  ------------------
  |  Branch (1531:7): [True: 35.6k, False: 58.1k]
  ------------------
 1532|  35.6k|		{
 1533|  35.6k|			const char* str = ntlm_get_negotiate_string(mask);
 1534|  35.6k|			const size_t flen = strlen(str);
 1535|       |
 1536|  35.6k|			if ((len > 0) && (buffer[len - 1] != ' '))
  ------------------
  |  Branch (1536:8): [True: 35.6k, False: 0]
  |  Branch (1536:21): [True: 32.7k, False: 2.94k]
  ------------------
 1537|  32.7k|			{
 1538|  32.7k|				if (size - len < 1)
  ------------------
  |  Branch (1538:9): [True: 0, False: 32.7k]
  ------------------
 1539|      0|					break;
 1540|  32.7k|				winpr_str_append("|", buffer, size, nullptr);
 1541|  32.7k|				len++;
 1542|  32.7k|			}
 1543|       |
 1544|  35.6k|			if (size - len < flen)
  ------------------
  |  Branch (1544:8): [True: 0, False: 35.6k]
  ------------------
 1545|      0|				break;
 1546|  35.6k|			winpr_str_append(str, buffer, size, nullptr);
 1547|  35.6k|		}
 1548|  93.7k|	}
 1549|       |
 1550|  3.02k|	return buffer;
 1551|  3.02k|}
ntlm_message_type_string:
 1554|    182|{
 1555|    182|	switch (messageType)
 1556|    182|	{
 1557|     21|		case MESSAGE_TYPE_NEGOTIATE:
  ------------------
  |  |   31|     21|#define MESSAGE_TYPE_NEGOTIATE 1
  ------------------
  |  Branch (1557:3): [True: 21, False: 161]
  ------------------
 1558|     21|			return "MESSAGE_TYPE_NEGOTIATE";
 1559|     31|		case MESSAGE_TYPE_CHALLENGE:
  ------------------
  |  |   32|     31|#define MESSAGE_TYPE_CHALLENGE 2
  ------------------
  |  Branch (1559:3): [True: 31, False: 151]
  ------------------
 1560|     31|			return "MESSAGE_TYPE_CHALLENGE";
 1561|     43|		case MESSAGE_TYPE_AUTHENTICATE:
  ------------------
  |  |   33|     43|#define MESSAGE_TYPE_AUTHENTICATE 3
  ------------------
  |  Branch (1561:3): [True: 43, False: 139]
  ------------------
 1562|     43|			return "MESSAGE_TYPE_AUTHENTICATE";
 1563|     87|		default:
  ------------------
  |  Branch (1563:3): [True: 87, False: 95]
  ------------------
 1564|     87|			return "MESSAGE_TYPE_UNKNOWN";
 1565|    182|	}
 1566|    182|}
ntlm_state_string:
 1569|  11.2k|{
 1570|  11.2k|	switch (state)
 1571|  11.2k|	{
 1572|  5.14k|		case NTLM_STATE_INITIAL:
  ------------------
  |  Branch (1572:3): [True: 5.14k, False: 6.06k]
  ------------------
 1573|  5.14k|			return "NTLM_STATE_INITIAL";
 1574|  3.24k|		case NTLM_STATE_NEGOTIATE:
  ------------------
  |  Branch (1574:3): [True: 3.24k, False: 7.96k]
  ------------------
 1575|  3.24k|			return "NTLM_STATE_NEGOTIATE";
 1576|  2.12k|		case NTLM_STATE_CHALLENGE:
  ------------------
  |  Branch (1576:3): [True: 2.12k, False: 9.08k]
  ------------------
 1577|  2.12k|			return "NTLM_STATE_CHALLENGE";
 1578|    645|		case NTLM_STATE_AUTHENTICATE:
  ------------------
  |  Branch (1578:3): [True: 645, False: 10.5k]
  ------------------
 1579|    645|			return "NTLM_STATE_AUTHENTICATE";
 1580|     49|		case NTLM_STATE_FINAL:
  ------------------
  |  Branch (1580:3): [True: 49, False: 11.1k]
  ------------------
 1581|     49|			return "NTLM_STATE_FINAL";
 1582|      0|		default:
  ------------------
  |  Branch (1582:3): [True: 0, False: 11.2k]
  ------------------
 1583|      0|			return "NTLM_STATE_UNKNOWN";
 1584|  11.2k|	}
 1585|  11.2k|}
ntlm_change_state:
 1587|  5.60k|{
 1588|  5.60k|	WINPR_ASSERT(ntlm);
  ------------------
  |  |   76|  5.60k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  5.60k|	do                                                                                             \
  |  |  |  |   61|  5.60k|	{                                                                                              \
  |  |  |  |   62|  5.60k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  5.60k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  5.60k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  5.60k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  5.60k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  5.60k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  5.60k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  5.60k|                                                                                                   \
  |  |  |  |   70|  5.60k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  5.60k|	do                                                      \
  |  |  |  |  |  |   32|  5.60k|	{                                                       \
  |  |  |  |  |  |   33|  5.60k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 5.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  5.60k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  5.60k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 5.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  5.60k|                                                                                                   \
  |  |  |  |   72|  5.60k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  5.60k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  5.60k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  5.60k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 5.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1589|  5.60k|	WLog_DBG(TAG, "change state from %s to %s", ntlm_state_string(ntlm->state),
  ------------------
  |  |  332|  5.60k|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   43|  5.60k|#define WLOG_DEBUG 1
  |  |  ------------------
  ------------------
 1590|  5.60k|	         ntlm_state_string(state));
 1591|  5.60k|	ntlm->state = state;
 1592|  5.60k|}
ntlm_get_state:
 1595|  4.83k|{
 1596|  4.83k|	WINPR_ASSERT(ntlm);
  ------------------
  |  |   76|  4.83k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.83k|	do                                                                                             \
  |  |  |  |   61|  4.83k|	{                                                                                              \
  |  |  |  |   62|  4.83k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.83k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.83k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.83k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.83k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.83k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.83k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.83k|                                                                                                   \
  |  |  |  |   70|  4.83k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.83k|	do                                                      \
  |  |  |  |  |  |   32|  4.83k|	{                                                       \
  |  |  |  |  |  |   33|  4.83k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.83k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.83k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.83k|                                                                                                   \
  |  |  |  |   72|  4.83k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.83k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.83k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.83k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1597|  4.83k|	return ntlm->state;
 1598|  4.83k|}
NTLM_init:
 1628|      1|{
 1629|      1|	InitializeConstWCharFromUtf8(NTLM_SecPkgInfoA.Name, NTLM_SecPkgInfoW_NameBuffer,
 1630|      1|	                             ARRAYSIZE(NTLM_SecPkgInfoW_NameBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1631|      1|	InitializeConstWCharFromUtf8(NTLM_SecPkgInfoA.Comment, NTLM_SecPkgInfoW_CommentBuffer,
 1632|      1|	                             ARRAYSIZE(NTLM_SecPkgInfoW_CommentBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1633|       |
 1634|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
 1635|      1|}
ntlm.c:ntlm_AcquireCredentialsHandleA:
  439|  1.71k|{
  440|  1.71k|	SECURITY_STATUS status = SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|  1.71k|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|  1.71k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  441|  1.71k|	SEC_WCHAR* principal = nullptr;
  442|  1.71k|	SEC_WCHAR* package = nullptr;
  443|       |
  444|  1.71k|	if (pszPrincipal)
  ------------------
  |  Branch (444:6): [True: 0, False: 1.71k]
  ------------------
  445|      0|	{
  446|      0|		principal = ConvertUtf8ToWCharAlloc(pszPrincipal, nullptr);
  447|      0|		if (!principal)
  ------------------
  |  Branch (447:7): [True: 0, False: 0]
  ------------------
  448|      0|			goto fail;
  449|      0|	}
  450|  1.71k|	if (pszPackage)
  ------------------
  |  Branch (450:6): [True: 1.71k, False: 0]
  ------------------
  451|  1.71k|	{
  452|  1.71k|		package = ConvertUtf8ToWCharAlloc(pszPackage, nullptr);
  453|  1.71k|		if (!package)
  ------------------
  |  Branch (453:7): [True: 0, False: 1.71k]
  ------------------
  454|      0|			goto fail;
  455|  1.71k|	}
  456|       |
  457|  1.71k|	status =
  458|  1.71k|	    ntlm_AcquireCredentialsHandleW(principal, package, fCredentialUse, pvLogonID, pAuthData,
  459|  1.71k|	                                   pGetKeyFn, pvGetKeyArgument, phCredential, ptsExpiry);
  460|       |
  461|  1.71k|fail:
  462|  1.71k|	free(principal);
  463|  1.71k|	free(package);
  464|       |
  465|  1.71k|	return status;
  466|  1.71k|}
ntlm.c:ntlm_FreeCredentialsHandle:
  469|  1.71k|{
  470|  1.71k|	if (!phCredential)
  ------------------
  |  Branch (470:6): [True: 0, False: 1.71k]
  ------------------
  471|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  472|       |
  473|  1.71k|	SSPI_CREDENTIALS* credentials =
  474|  1.71k|	    (SSPI_CREDENTIALS*)sspi_SecureHandleGetLowerPointer(phCredential);
  475|  1.71k|	sspi_SecureHandleInvalidate(phCredential);
  476|  1.71k|	if (!credentials)
  ------------------
  |  Branch (476:6): [True: 0, False: 1.71k]
  ------------------
  477|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  478|       |
  479|  1.71k|	sspi_CredentialsFree(credentials);
  480|  1.71k|	return SEC_E_OK;
  ------------------
  |  |  133|  1.71k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.71k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  481|  1.71k|}
ntlm.c:ntlm_InitializeSecurityContextA:
  763|  1.52k|{
  764|  1.52k|	SECURITY_STATUS status = 0;
  765|  1.52k|	SEC_WCHAR* pszTargetNameW = nullptr;
  766|       |
  767|  1.52k|	if (pszTargetName)
  ------------------
  |  Branch (767:6): [True: 0, False: 1.52k]
  ------------------
  768|      0|	{
  769|      0|		pszTargetNameW = ConvertUtf8ToWCharAlloc(pszTargetName, nullptr);
  770|      0|		if (!pszTargetNameW)
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  772|      0|	}
  773|       |
  774|  1.52k|	status = ntlm_InitializeSecurityContextW(phCredential, phContext, pszTargetNameW, fContextReq,
  775|  1.52k|	                                         Reserved1, TargetDataRep, pInput, Reserved2,
  776|  1.52k|	                                         phNewContext, pOutput, pfContextAttr, ptsExpiry);
  777|  1.52k|	free(pszTargetNameW);
  778|  1.52k|	return status;
  779|  1.52k|}
ntlm.c:ntlm_AcceptSecurityContext:
  509|  1.19k|{
  510|  1.19k|	SECURITY_STATUS status = 0;
  511|  1.19k|	SSPI_CREDENTIALS* credentials = nullptr;
  512|  1.19k|	PSecBuffer input_buffer = nullptr;
  513|  1.19k|	PSecBuffer output_buffer = nullptr;
  514|       |
  515|       |	/* behave like windows SSPIs that don't want empty context */
  516|  1.19k|	if (phContext && !phContext->dwLower && !phContext->dwUpper)
  ------------------
  |  Branch (516:6): [True: 481, False: 715]
  |  Branch (516:19): [True: 0, False: 481]
  |  Branch (516:42): [True: 0, False: 0]
  ------------------
  517|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  518|       |
  519|  1.19k|	NTLM_CONTEXT* context = (NTLM_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
  520|       |
  521|  1.19k|	if (!context)
  ------------------
  |  Branch (521:6): [True: 715, False: 481]
  ------------------
  522|    715|	{
  523|    715|		context = ntlm_ContextNew();
  524|       |
  525|    715|		if (!context)
  ------------------
  |  Branch (525:7): [True: 0, False: 715]
  ------------------
  526|      0|			return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  527|       |
  528|    715|		context->server = TRUE;
  ------------------
  |  |  117|    715|#define TRUE true
  ------------------
  529|       |
  530|    715|		if (fContextReq & ASC_REQ_CONFIDENTIALITY)
  ------------------
  |  |  618|    715|#define ASC_REQ_CONFIDENTIALITY 0x00000010
  ------------------
  |  Branch (530:7): [True: 715, False: 0]
  ------------------
  531|    715|			context->confidentiality = TRUE;
  ------------------
  |  |  117|    715|#define TRUE true
  ------------------
  532|       |
  533|    715|		credentials = (SSPI_CREDENTIALS*)sspi_SecureHandleGetLowerPointer(phCredential);
  534|    715|		context->credentials = credentials;
  535|    715|		context->SamFile = credentials->ntlmSettings.samFile;
  536|    715|		context->HashCallback = credentials->ntlmSettings.hashCallback;
  537|    715|		context->HashCallbackArg = credentials->ntlmSettings.hashCallbackArg;
  538|       |
  539|    715|		ntlm_SetContextTargetName(context, nullptr);
  540|    715|		sspi_SecureHandleSetLowerPointer(phNewContext, context);
  541|    715|		sspi_SecureHandleSetUpperPointer(phNewContext, (void*)NTLM_PACKAGE_NAME);
  542|    715|	}
  543|       |
  544|  1.19k|	switch (ntlm_get_state(context))
  545|  1.19k|	{
  546|    715|		case NTLM_STATE_INITIAL:
  ------------------
  |  Branch (546:3): [True: 715, False: 481]
  ------------------
  547|    715|		{
  548|    715|			ntlm_change_state(context, NTLM_STATE_NEGOTIATE);
  549|       |
  550|    715|			if (!pInput)
  ------------------
  |  Branch (550:8): [True: 0, False: 715]
  ------------------
  551|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  552|       |
  553|    715|			if (pInput->cBuffers < 1)
  ------------------
  |  Branch (553:8): [True: 0, False: 715]
  ------------------
  554|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  555|       |
  556|    715|			input_buffer = sspi_FindSecBuffer(pInput, SECBUFFER_TOKEN);
  ------------------
  |  |  916|    715|#define SECBUFFER_TOKEN 2
  ------------------
  557|       |
  558|    715|			if (!input_buffer)
  ------------------
  |  Branch (558:8): [True: 0, False: 715]
  ------------------
  559|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  560|       |
  561|    715|			if (input_buffer->cbBuffer < 1)
  ------------------
  |  Branch (561:8): [True: 0, False: 715]
  ------------------
  562|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  563|       |
  564|    715|			status = ntlm_read_NegotiateMessage(context, input_buffer);
  565|    715|			if (status != SEC_I_CONTINUE_NEEDED)
  ------------------
  |  |  208|    715|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|    715|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (565:8): [True: 186, False: 529]
  ------------------
  566|    186|				return status;
  567|       |
  568|    529|			if (ntlm_get_state(context) == NTLM_STATE_CHALLENGE)
  ------------------
  |  Branch (568:8): [True: 529, False: 0]
  ------------------
  569|    529|			{
  570|    529|				if (!pOutput)
  ------------------
  |  Branch (570:9): [True: 0, False: 529]
  ------------------
  571|      0|					return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  572|       |
  573|    529|				if (pOutput->cBuffers < 1)
  ------------------
  |  Branch (573:9): [True: 0, False: 529]
  ------------------
  574|      0|					return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  575|       |
  576|    529|				output_buffer = sspi_FindSecBuffer(pOutput, SECBUFFER_TOKEN);
  ------------------
  |  |  916|    529|#define SECBUFFER_TOKEN 2
  ------------------
  577|       |
  578|    529|				if (!output_buffer->BufferType)
  ------------------
  |  Branch (578:9): [True: 0, False: 529]
  ------------------
  579|      0|					return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  580|       |
  581|    529|				if (output_buffer->cbBuffer < 1)
  ------------------
  |  Branch (581:9): [True: 0, False: 529]
  ------------------
  582|      0|					return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  583|       |
  584|    529|				return ntlm_write_ChallengeMessage(context, output_buffer);
  585|    529|			}
  586|       |
  587|      0|			return SEC_E_OUT_OF_SEQUENCE;
  ------------------
  |  |  150|      0|#define SEC_E_OUT_OF_SEQUENCE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090310)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  588|    529|		}
  589|       |
  590|    481|		case NTLM_STATE_AUTHENTICATE:
  ------------------
  |  Branch (590:3): [True: 481, False: 715]
  ------------------
  591|    481|		{
  592|    481|			if (!pInput)
  ------------------
  |  Branch (592:8): [True: 0, False: 481]
  ------------------
  593|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  594|       |
  595|    481|			if (pInput->cBuffers < 1)
  ------------------
  |  Branch (595:8): [True: 0, False: 481]
  ------------------
  596|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  597|       |
  598|    481|			input_buffer = sspi_FindSecBuffer(pInput, SECBUFFER_TOKEN);
  ------------------
  |  |  916|    481|#define SECBUFFER_TOKEN 2
  ------------------
  599|       |
  600|    481|			if (!input_buffer)
  ------------------
  |  Branch (600:8): [True: 0, False: 481]
  ------------------
  601|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  602|       |
  603|    481|			if (input_buffer->cbBuffer < 1)
  ------------------
  |  Branch (603:8): [True: 0, False: 481]
  ------------------
  604|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  605|       |
  606|    481|			status = ntlm_read_AuthenticateMessage(context, input_buffer);
  607|       |
  608|    481|			if (pOutput)
  ------------------
  |  Branch (608:8): [True: 481, False: 0]
  ------------------
  609|    481|			{
  610|    962|				for (ULONG i = 0; i < pOutput->cBuffers; i++)
  ------------------
  |  Branch (610:23): [True: 481, False: 481]
  ------------------
  611|    481|				{
  612|    481|					pOutput->pBuffers[i].cbBuffer = 0;
  613|    481|					pOutput->pBuffers[i].BufferType = SECBUFFER_TOKEN;
  ------------------
  |  |  916|    481|#define SECBUFFER_TOKEN 2
  ------------------
  614|    481|				}
  615|    481|			}
  616|       |
  617|    481|			return status;
  618|    481|		}
  619|       |
  620|      0|		default:
  ------------------
  |  Branch (620:3): [True: 0, False: 1.19k]
  ------------------
  621|      0|			return SEC_E_OUT_OF_SEQUENCE;
  ------------------
  |  |  150|      0|#define SEC_E_OUT_OF_SEQUENCE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090310)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  622|  1.19k|	}
  623|  1.19k|}
ntlm.c:ntlm_ContextNew:
  239|  1.71k|{
  240|  1.71k|	HKEY hKey = nullptr;
  241|  1.71k|	DWORD dwType = 0;
  242|  1.71k|	DWORD dwSize = 0;
  243|  1.71k|	DWORD dwValue = 0;
  244|  1.71k|	NTLM_CONTEXT* context = (NTLM_CONTEXT*)calloc(1, sizeof(NTLM_CONTEXT));
  245|       |
  246|  1.71k|	if (!context)
  ------------------
  |  Branch (246:6): [True: 0, False: 1.71k]
  ------------------
  247|      0|		return nullptr;
  248|       |
  249|  1.71k|	context->NTLMv2 = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  250|  1.71k|	context->UseMIC = FALSE;
  ------------------
  |  |  113|  1.71k|#define FALSE false
  ------------------
  251|  1.71k|	context->SendVersionInfo = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  252|  1.71k|	context->SendSingleHostData = FALSE;
  ------------------
  |  |  113|  1.71k|#define FALSE false
  ------------------
  253|  1.71k|	context->SendWorkstationName = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  254|  1.71k|	context->NegotiateKeyExchange = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  255|  1.71k|	context->UseSamFileDatabase = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  256|       |
  257|  1.71k|	{
  258|  1.71k|		char* key = winpr_getApplicatonDetailsRegKey(WINPR_KEY);
  ------------------
  |  |   44|  1.71k|#define WINPR_KEY "Software\\%s\\WinPR\\NTLM"
  ------------------
  259|  1.71k|		if (key)
  ------------------
  |  Branch (259:7): [True: 1.71k, False: 0]
  ------------------
  260|  1.71k|		{
  261|  1.71k|			const LONG status =
  262|  1.71k|			    RegOpenKeyExA(HKEY_LOCAL_MACHINE, key, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
  ------------------
  |  |  120|  1.71k|#define HKEY_LOCAL_MACHINE ((HKEY)(LONG_PTR)(LONG)0x80000002)
  ------------------
              			    RegOpenKeyExA(HKEY_LOCAL_MACHINE, key, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
  ------------------
  |  |   81|  1.71k|	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  | 1509|  1.71k|#define STANDARD_RIGHTS_READ 0x00020000
  |  |  ------------------
  |  |               	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  |   65|  1.71k|#define KEY_QUERY_VALUE 0x00000001
  |  |  ------------------
  |  |               	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  |   68|  1.71k|#define KEY_ENUMERATE_SUB_KEYS 0x00000008
  |  |  ------------------
  |  |               	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  |   69|  1.71k|#define KEY_NOTIFY 0x00000010
  |  |  ------------------
  |  |   82|  1.71k|	 (~SYNCHRONIZE))
  |  |  ------------------
  |  |  |  | 1507|  1.71k|#define SYNCHRONIZE 0x00100000
  |  |  ------------------
  ------------------
              			    RegOpenKeyExA(HKEY_LOCAL_MACHINE, key, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
  ------------------
  |  |   71|  1.71k|#define KEY_WOW64_64KEY 0x00000100
  ------------------
  263|  1.71k|			free(key);
  264|       |
  265|  1.71k|			if (status == ERROR_SUCCESS)
  ------------------
  |  |  185|  1.71k|#define ERROR_SUCCESS 0x00000000
  ------------------
  |  Branch (265:8): [True: 0, False: 1.71k]
  ------------------
  266|      0|			{
  267|      0|				if (RegQueryValueEx(hKey, _T("NTLMv2"), nullptr, &dwType, (BYTE*)&dwValue,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              				if (RegQueryValueEx(hKey, _T("NTLMv2"), nullptr, &dwType, (BYTE*)&dwValue,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (267:9): [True: 0, False: 0]
  ------------------
  268|      0|				                    &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  269|      0|					context->NTLMv2 = dwValue ? 1 : 0;
  ------------------
  |  Branch (269:24): [True: 0, False: 0]
  ------------------
  270|       |
  271|      0|				if (RegQueryValueEx(hKey, _T("UseMIC"), nullptr, &dwType, (BYTE*)&dwValue,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              				if (RegQueryValueEx(hKey, _T("UseMIC"), nullptr, &dwType, (BYTE*)&dwValue,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (271:9): [True: 0, False: 0]
  ------------------
  272|      0|				                    &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  273|      0|					context->UseMIC = dwValue ? 1 : 0;
  ------------------
  |  Branch (273:24): [True: 0, False: 0]
  ------------------
  274|       |
  275|      0|				if (RegQueryValueEx(hKey, _T("SendVersionInfo"), nullptr, &dwType, (BYTE*)&dwValue,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              				if (RegQueryValueEx(hKey, _T("SendVersionInfo"), nullptr, &dwType, (BYTE*)&dwValue,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (275:9): [True: 0, False: 0]
  ------------------
  276|      0|				                    &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  277|      0|					context->SendVersionInfo = dwValue ? 1 : 0;
  ------------------
  |  Branch (277:33): [True: 0, False: 0]
  ------------------
  278|       |
  279|      0|				if (RegQueryValueEx(hKey, _T("SendSingleHostData"), nullptr, &dwType,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              				if (RegQueryValueEx(hKey, _T("SendSingleHostData"), nullptr, &dwType,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (279:9): [True: 0, False: 0]
  ------------------
  280|      0|				                    (BYTE*)&dwValue, &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  281|      0|					context->SendSingleHostData = dwValue ? 1 : 0;
  ------------------
  |  Branch (281:36): [True: 0, False: 0]
  ------------------
  282|       |
  283|      0|				if (RegQueryValueEx(hKey, _T("SendWorkstationName"), nullptr, &dwType,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              				if (RegQueryValueEx(hKey, _T("SendWorkstationName"), nullptr, &dwType,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (283:9): [True: 0, False: 0]
  ------------------
  284|      0|				                    (BYTE*)&dwValue, &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  285|      0|					context->SendWorkstationName = dwValue ? 1 : 0;
  ------------------
  |  Branch (285:37): [True: 0, False: 0]
  ------------------
  286|       |
  287|      0|				if (RegQueryValueEx(hKey, _T("WorkstationName"), nullptr, &dwType, nullptr,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              				if (RegQueryValueEx(hKey, _T("WorkstationName"), nullptr, &dwType, nullptr,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (287:9): [True: 0, False: 0]
  ------------------
  288|      0|				                    &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  289|      0|				{
  290|      0|					char* workstation = (char*)malloc(dwSize + 1);
  291|       |
  292|      0|					if (!workstation)
  ------------------
  |  Branch (292:10): [True: 0, False: 0]
  ------------------
  293|      0|					{
  294|      0|						free(context);
  295|      0|						return nullptr;
  296|      0|					}
  297|       |
  298|      0|					const LONG rc = RegQueryValueExA(hKey, "WorkstationName", nullptr, &dwType,
  299|      0|					                                 (BYTE*)workstation, &dwSize);
  300|      0|					if (rc != ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  |  Branch (300:10): [True: 0, False: 0]
  ------------------
  301|      0|						WLog_WARN(TAG, "Key ''WorkstationName' not found");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
  302|      0|					workstation[dwSize] = '\0';
  303|       |
  304|      0|					if (ntlm_SetContextWorkstation(context, workstation) < 0)
  ------------------
  |  Branch (304:10): [True: 0, False: 0]
  ------------------
  305|      0|					{
  306|      0|						free(workstation);
  307|      0|						free(context);
  308|      0|						return nullptr;
  309|      0|					}
  310|       |
  311|      0|					free(workstation);
  312|      0|				}
  313|       |
  314|      0|				RegCloseKey(hKey);
  315|      0|			}
  316|  1.71k|		}
  317|  1.71k|	}
  318|       |
  319|       |	/*
  320|       |	 * Extended Protection is enabled by default in Windows 7,
  321|       |	 * but enabling it in WinPR breaks TS Gateway at this point
  322|       |	 */
  323|  1.71k|	context->SuppressExtendedProtection = FALSE;
  ------------------
  |  |  113|  1.71k|#define FALSE false
  ------------------
  324|  1.71k|	const LONG status =
  325|  1.71k|	    RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\LSA"), 0,
  ------------------
  |  |  384|  1.71k|#define RegOpenKeyEx RegOpenKeyExA
  ------------------
              	    RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\LSA"), 0,
  ------------------
  |  |  120|  1.71k|#define HKEY_LOCAL_MACHINE ((HKEY)(LONG_PTR)(LONG)0x80000002)
  ------------------
              	    RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\LSA"), 0,
  ------------------
  |  |  275|  1.71k|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  326|  1.71k|	                 KEY_READ | KEY_WOW64_64KEY, &hKey);
  ------------------
  |  |   81|  1.71k|	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  | 1509|  1.71k|#define STANDARD_RIGHTS_READ 0x00020000
  |  |  ------------------
  |  |               	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  |   65|  1.71k|#define KEY_QUERY_VALUE 0x00000001
  |  |  ------------------
  |  |               	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  |   68|  1.71k|#define KEY_ENUMERATE_SUB_KEYS 0x00000008
  |  |  ------------------
  |  |               	((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & \
  |  |  ------------------
  |  |  |  |   69|  1.71k|#define KEY_NOTIFY 0x00000010
  |  |  ------------------
  |  |   82|  1.71k|	 (~SYNCHRONIZE))
  |  |  ------------------
  |  |  |  | 1507|  1.71k|#define SYNCHRONIZE 0x00100000
  |  |  ------------------
  ------------------
              	                 KEY_READ | KEY_WOW64_64KEY, &hKey);
  ------------------
  |  |   71|  1.71k|#define KEY_WOW64_64KEY 0x00000100
  ------------------
  327|       |
  328|  1.71k|	if (status == ERROR_SUCCESS)
  ------------------
  |  |  185|  1.71k|#define ERROR_SUCCESS 0x00000000
  ------------------
  |  Branch (328:6): [True: 0, False: 1.71k]
  ------------------
  329|      0|	{
  330|      0|		if (RegQueryValueEx(hKey, _T("SuppressExtendedProtection"), nullptr, &dwType,
  ------------------
  |  |  422|      0|#define RegQueryValueEx RegQueryValueExA
  ------------------
              		if (RegQueryValueEx(hKey, _T("SuppressExtendedProtection"), nullptr, &dwType,
  ------------------
  |  |  275|      0|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  ------------------
  |  Branch (330:7): [True: 0, False: 0]
  ------------------
  331|      0|		                    (BYTE*)&dwValue, &dwSize) == ERROR_SUCCESS)
  ------------------
  |  |  185|      0|#define ERROR_SUCCESS 0x00000000
  ------------------
  332|      0|			context->SuppressExtendedProtection = dwValue ? 1 : 0;
  ------------------
  |  Branch (332:42): [True: 0, False: 0]
  ------------------
  333|       |
  334|      0|		RegCloseKey(hKey);
  335|      0|	}
  336|       |
  337|  1.71k|	context->NegotiateFlags = 0;
  338|  1.71k|	context->LmCompatibilityLevel = 3;
  339|  1.71k|	ntlm_change_state(context, NTLM_STATE_INITIAL);
  340|  1.71k|	FillMemory(context->MachineID, sizeof(context->MachineID), 0xAA);
  ------------------
  |  |  125|  1.71k|#define FillMemory(Destination, Length, Fill) memset((Destination), (Fill), (Length))
  ------------------
  341|       |
  342|  1.71k|	if (context->NTLMv2)
  ------------------
  |  Branch (342:6): [True: 1.71k, False: 0]
  ------------------
  343|  1.71k|		context->UseMIC = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  344|       |
  345|  1.71k|	return context;
  346|  1.71k|}
ntlm.c:ntlm_SetContextWorkstation:
  132|  1.00k|{
  133|  1.00k|	char* ws = Workstation;
  134|  1.00k|	CHAR* computerName = nullptr;
  135|       |
  136|  1.00k|	WINPR_ASSERT(context);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|       |
  138|  1.00k|	if (!Workstation)
  ------------------
  |  Branch (138:6): [True: 1.00k, False: 0]
  ------------------
  139|  1.00k|	{
  140|  1.00k|		computerName = get_name(ComputerNameNetBIOS);
  141|  1.00k|		if (!computerName)
  ------------------
  |  Branch (141:7): [True: 0, False: 1.00k]
  ------------------
  142|      0|			return -1;
  143|  1.00k|		ws = computerName;
  144|  1.00k|	}
  145|       |
  146|  1.00k|	size_t len = 0;
  147|  1.00k|	context->Workstation.Buffer = ConvertUtf8ToWCharAlloc(ws, &len);
  148|       |
  149|  1.00k|	free(computerName);
  150|       |
  151|  1.00k|	if (!context->Workstation.Buffer || (len > UINT16_MAX / sizeof(WCHAR)))
  ------------------
  |  Branch (151:6): [True: 0, False: 1.00k]
  |  Branch (151:38): [True: 0, False: 1.00k]
  ------------------
  152|      0|		return -1;
  153|       |
  154|  1.00k|	context->Workstation.Length = (USHORT)(len * sizeof(WCHAR));
  155|  1.00k|	return 1;
  156|  1.00k|}
ntlm.c:get_name:
  108|  1.00k|{
  109|  1.00k|	DWORD nSize = 0;
  110|       |
  111|  1.00k|	if (GetComputerNameExA(type, nullptr, &nSize))
  ------------------
  |  Branch (111:6): [True: 0, False: 1.00k]
  ------------------
  112|      0|		return nullptr;
  113|       |
  114|  1.00k|	if (GetLastError() != ERROR_MORE_DATA)
  ------------------
  |  |  367|  1.00k|#define ERROR_MORE_DATA 0x000000EA
  ------------------
  |  Branch (114:6): [True: 0, False: 1.00k]
  ------------------
  115|      0|		return nullptr;
  116|       |
  117|  1.00k|	char* computerName = calloc(1, nSize);
  118|       |
  119|  1.00k|	if (!computerName)
  ------------------
  |  Branch (119:6): [True: 0, False: 1.00k]
  ------------------
  120|      0|		return nullptr;
  121|       |
  122|  1.00k|	if (!GetComputerNameExA(type, computerName, &nSize))
  ------------------
  |  Branch (122:6): [True: 0, False: 1.00k]
  ------------------
  123|      0|	{
  124|      0|		free(computerName);
  125|      0|		return nullptr;
  126|      0|	}
  127|       |
  128|  1.00k|	return computerName;
  129|  1.00k|}
ntlm.c:ntlm_SetContextTargetName:
  181|    715|{
  182|    715|	char* name = TargetName;
  183|    715|	DWORD nSize = 0;
  184|    715|	CHAR* computerName = nullptr;
  185|       |
  186|    715|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    715|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    715|	do                                                                                             \
  |  |  |  |   61|    715|	{                                                                                              \
  |  |  |  |   62|    715|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    715|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    715|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    715|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    715|                                                                                                   \
  |  |  |  |   70|    715|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    715|	do                                                      \
  |  |  |  |  |  |   32|    715|	{                                                       \
  |  |  |  |  |  |   33|    715|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    715|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    715|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    715|                                                                                                   \
  |  |  |  |   72|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    715|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    715|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    715|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 715]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|       |
  188|    715|	if (!name)
  ------------------
  |  Branch (188:6): [True: 715, False: 0]
  ------------------
  189|    715|	{
  190|    715|		if (GetComputerNameExA(ComputerNameNetBIOS, nullptr, &nSize) ||
  ------------------
  |  Branch (190:7): [True: 0, False: 715]
  ------------------
  191|    715|		    GetLastError() != ERROR_MORE_DATA)
  ------------------
  |  |  367|    715|#define ERROR_MORE_DATA 0x000000EA
  ------------------
  |  Branch (191:7): [True: 0, False: 715]
  ------------------
  192|      0|			return -1;
  193|       |
  194|    715|		computerName = calloc(nSize, sizeof(CHAR));
  195|       |
  196|    715|		if (!computerName)
  ------------------
  |  Branch (196:7): [True: 0, False: 715]
  ------------------
  197|      0|			return -1;
  198|       |
  199|    715|		if (!GetComputerNameExA(ComputerNameNetBIOS, computerName, &nSize))
  ------------------
  |  Branch (199:7): [True: 0, False: 715]
  ------------------
  200|      0|		{
  201|      0|			free(computerName);
  202|      0|			return -1;
  203|      0|		}
  204|       |
  205|    715|		if (nSize > MAX_COMPUTERNAME_LENGTH)
  ------------------
  |  |  323|    715|#define MAX_COMPUTERNAME_LENGTH 31
  ------------------
  |  Branch (205:7): [True: 0, False: 715]
  ------------------
  206|      0|			computerName[MAX_COMPUTERNAME_LENGTH] = '\0';
  ------------------
  |  |  323|      0|#define MAX_COMPUTERNAME_LENGTH 31
  ------------------
  207|       |
  208|    715|		name = computerName;
  209|       |
  210|    715|		if (!name)
  ------------------
  |  Branch (210:7): [True: 0, False: 715]
  ------------------
  211|      0|			return -1;
  212|       |
  213|    715|		CharUpperA(name);
  214|    715|	}
  215|       |
  216|    715|	size_t len = 0;
  217|    715|	context->TargetName.pvBuffer = ConvertUtf8ToWCharAlloc(name, &len);
  218|       |
  219|    715|	if (!context->TargetName.pvBuffer || (len > UINT16_MAX / sizeof(WCHAR)))
  ------------------
  |  Branch (219:6): [True: 0, False: 715]
  |  Branch (219:39): [True: 0, False: 715]
  ------------------
  220|      0|	{
  221|      0|		free(context->TargetName.pvBuffer);
  222|      0|		context->TargetName.pvBuffer = nullptr;
  223|       |
  224|      0|		if (!TargetName)
  ------------------
  |  Branch (224:7): [True: 0, False: 0]
  ------------------
  225|      0|			free(name);
  226|       |
  227|      0|		return -1;
  228|      0|	}
  229|       |
  230|    715|	context->TargetName.cbBuffer = (USHORT)(len * sizeof(WCHAR));
  231|       |
  232|    715|	if (!TargetName)
  ------------------
  |  Branch (232:6): [True: 715, False: 0]
  ------------------
  233|    715|		free(name);
  234|       |
  235|    715|	return 1;
  236|    715|}
ntlm.c:ntlm_DeleteSecurityContext:
  784|  1.71k|{
  785|  1.71k|	NTLM_CONTEXT* context = (NTLM_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
  786|  1.71k|	sspi_SecureHandleInvalidate(phContext);
  787|  1.71k|	ntlm_ContextFree(context);
  788|  1.71k|	return SEC_E_OK;
  ------------------
  |  |  133|  1.71k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.71k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  789|  1.71k|}
ntlm.c:ntlm_ContextFree:
  349|  1.71k|{
  350|  1.71k|	if (!context)
  ------------------
  |  Branch (350:6): [True: 0, False: 1.71k]
  ------------------
  351|      0|		return;
  352|       |
  353|  1.71k|	winpr_RC4_Free(context->SendRc4Seal);
  354|  1.71k|	winpr_RC4_Free(context->RecvRc4Seal);
  355|  1.71k|	sspi_SecBufferFree(&context->NegotiateMessage);
  356|  1.71k|	sspi_SecBufferFree(&context->ChallengeMessage);
  357|  1.71k|	sspi_SecBufferFree(&context->AuthenticateMessage);
  358|  1.71k|	sspi_SecBufferFree(&context->ChallengeTargetInfo);
  359|  1.71k|	sspi_SecBufferFree(&context->TargetName);
  360|  1.71k|	sspi_SecBufferFree(&context->NtChallengeResponse);
  361|  1.71k|	sspi_SecBufferFree(&context->LmChallengeResponse);
  362|  1.71k|	free(context->ServicePrincipalName.Buffer);
  363|  1.71k|	free(context->Workstation.Buffer);
  364|       |
  365|       |	/* Zero sensitive key material before freeing the context */
  366|  1.71k|	memset(context->NtlmHash, 0, sizeof(context->NtlmHash));
  367|  1.71k|	memset(context->NtlmV2Hash, 0, sizeof(context->NtlmV2Hash));
  368|  1.71k|	memset(context->SessionBaseKey, 0, sizeof(context->SessionBaseKey));
  369|  1.71k|	memset(context->KeyExchangeKey, 0, sizeof(context->KeyExchangeKey));
  370|  1.71k|	memset(context->RandomSessionKey, 0, sizeof(context->RandomSessionKey));
  371|  1.71k|	memset(context->ExportedSessionKey, 0, sizeof(context->ExportedSessionKey));
  372|  1.71k|	memset(context->EncryptedRandomSessionKey, 0, sizeof(context->EncryptedRandomSessionKey));
  373|  1.71k|	memset(context->NtProofString, 0, sizeof(context->NtProofString));
  374|  1.71k|	free(context);
  375|  1.71k|}
ntlm.c:ntlm_SetContextAttributesA:
 1074|    529|{
 1075|    529|	return ntlm_SetContextAttributesW(phContext, ulAttribute, pBuffer, cbBuffer);
 1076|    529|}
ntlm.c:ntlm_AcquireCredentialsHandleW:
  382|  1.71k|{
  383|  1.71k|	SEC_WINPR_NTLM_SETTINGS* settings = nullptr;
  384|       |
  385|  1.71k|	if ((fCredentialUse != SECPKG_CRED_OUTBOUND) && (fCredentialUse != SECPKG_CRED_INBOUND) &&
  ------------------
  |  |  260|  1.71k|#define SECPKG_CRED_OUTBOUND 0x00000002
  ------------------
              	if ((fCredentialUse != SECPKG_CRED_OUTBOUND) && (fCredentialUse != SECPKG_CRED_INBOUND) &&
  ------------------
  |  |  259|    715|#define SECPKG_CRED_INBOUND 0x00000001
  ------------------
  |  Branch (385:6): [True: 715, False: 1.00k]
  |  Branch (385:50): [True: 0, False: 715]
  ------------------
  386|      0|	    (fCredentialUse != SECPKG_CRED_BOTH))
  ------------------
  |  |  261|      0|#define SECPKG_CRED_BOTH 0x00000003
  ------------------
  |  Branch (386:6): [True: 0, False: 0]
  ------------------
  387|      0|	{
  388|      0|		return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  389|      0|	}
  390|       |
  391|  1.71k|	SSPI_CREDENTIALS* credentials = sspi_CredentialsNew();
  392|       |
  393|  1.71k|	if (!credentials)
  ------------------
  |  Branch (393:6): [True: 0, False: 1.71k]
  ------------------
  394|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  395|       |
  396|  1.71k|	credentials->fCredentialUse = fCredentialUse;
  397|  1.71k|	credentials->pGetKeyFn = pGetKeyFn;
  398|  1.71k|	credentials->pvGetKeyArgument = pvGetKeyArgument;
  399|       |
  400|  1.71k|	if (pAuthData)
  ------------------
  |  Branch (400:6): [True: 1.00k, False: 715]
  ------------------
  401|  1.00k|	{
  402|  1.00k|		UINT32 identityFlags = sspi_GetAuthIdentityFlags(pAuthData);
  403|       |
  404|  1.00k|		if (sspi_CopyAuthIdentity(&(credentials->identity),
  ------------------
  |  Branch (404:7): [True: 0, False: 1.00k]
  ------------------
  405|  1.00k|		                          (const SEC_WINNT_AUTH_IDENTITY_INFO*)pAuthData) < 0)
  406|      0|		{
  407|      0|			sspi_CredentialsFree(credentials);
  408|      0|			return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  409|      0|		}
  410|       |
  411|  1.00k|		if (identityFlags & SEC_WINNT_AUTH_IDENTITY_EXTENDED)
  ------------------
  |  |  667|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_EXTENDED 0x100
  ------------------
  |  Branch (411:7): [True: 0, False: 1.00k]
  ------------------
  412|      0|			settings = (((SEC_WINNT_AUTH_IDENTITY_WINPR*)pAuthData)->ntlmSettings);
  413|  1.00k|	}
  414|       |
  415|  1.71k|	if (settings)
  ------------------
  |  Branch (415:6): [True: 0, False: 1.71k]
  ------------------
  416|      0|	{
  417|      0|		if (settings->samFile)
  ------------------
  |  Branch (417:7): [True: 0, False: 0]
  ------------------
  418|      0|		{
  419|      0|			credentials->ntlmSettings.samFile = _strdup(settings->samFile);
  420|      0|			if (!credentials->ntlmSettings.samFile)
  ------------------
  |  Branch (420:8): [True: 0, False: 0]
  ------------------
  421|      0|			{
  422|      0|				sspi_CredentialsFree(credentials);
  423|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  424|      0|			}
  425|      0|		}
  426|      0|		credentials->ntlmSettings.hashCallback = settings->hashCallback;
  427|      0|		credentials->ntlmSettings.hashCallbackArg = settings->hashCallbackArg;
  428|      0|	}
  429|       |
  430|  1.71k|	sspi_SecureHandleSetLowerPointer(phCredential, (void*)credentials);
  431|  1.71k|	sspi_SecureHandleSetUpperPointer(phCredential, (void*)NTLM_PACKAGE_NAME);
  432|  1.71k|	return SEC_E_OK;
  ------------------
  |  |  133|  1.71k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.71k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  433|  1.71k|}
ntlm.c:ntlm_InitializeSecurityContextW:
  636|  1.52k|{
  637|  1.52k|	SECURITY_STATUS status = 0;
  638|  1.52k|	SSPI_CREDENTIALS* credentials = nullptr;
  639|  1.52k|	PSecBuffer input_buffer = nullptr;
  640|  1.52k|	PSecBuffer output_buffer = nullptr;
  641|       |
  642|       |	/* behave like windows SSPIs that don't want empty context */
  643|  1.52k|	if (phContext && !phContext->dwLower && !phContext->dwUpper)
  ------------------
  |  Branch (643:6): [True: 520, False: 1.00k]
  |  Branch (643:19): [True: 0, False: 520]
  |  Branch (643:42): [True: 0, False: 0]
  ------------------
  644|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  645|       |
  646|  1.52k|	NTLM_CONTEXT* context = (NTLM_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
  647|       |
  648|  1.52k|	if (pInput)
  ------------------
  |  Branch (648:6): [True: 520, False: 1.00k]
  ------------------
  649|    520|	{
  650|    520|		input_buffer = sspi_FindSecBuffer(pInput, SECBUFFER_TOKEN);
  ------------------
  |  |  916|    520|#define SECBUFFER_TOKEN 2
  ------------------
  651|    520|	}
  652|       |
  653|  1.52k|	if (!context)
  ------------------
  |  Branch (653:6): [True: 1.00k, False: 520]
  ------------------
  654|  1.00k|	{
  655|  1.00k|		context = ntlm_ContextNew();
  656|       |
  657|  1.00k|		if (!context)
  ------------------
  |  Branch (657:7): [True: 0, False: 1.00k]
  ------------------
  658|      0|			return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  659|       |
  660|  1.00k|		if (fContextReq & ISC_REQ_CONFIDENTIALITY)
  ------------------
  |  |  565|  1.00k|#define ISC_REQ_CONFIDENTIALITY 0x00000010
  ------------------
  |  Branch (660:7): [True: 1.00k, False: 0]
  ------------------
  661|  1.00k|			context->confidentiality = TRUE;
  ------------------
  |  |  117|  1.00k|#define TRUE true
  ------------------
  662|       |
  663|  1.00k|		credentials = (SSPI_CREDENTIALS*)sspi_SecureHandleGetLowerPointer(phCredential);
  664|  1.00k|		context->credentials = credentials;
  665|       |
  666|  1.00k|		if (context->Workstation.Length < 1)
  ------------------
  |  Branch (666:7): [True: 1.00k, False: 0]
  ------------------
  667|  1.00k|		{
  668|  1.00k|			if (ntlm_SetContextWorkstation(context, nullptr) < 0)
  ------------------
  |  Branch (668:8): [True: 0, False: 1.00k]
  ------------------
  669|      0|			{
  670|      0|				ntlm_ContextFree(context);
  671|      0|				return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  672|      0|			}
  673|  1.00k|		}
  674|       |
  675|  1.00k|		if (ntlm_SetContextServicePrincipalNameW(context, pszTargetName) < 0)
  ------------------
  |  Branch (675:7): [True: 0, False: 1.00k]
  ------------------
  676|      0|		{
  677|      0|			ntlm_ContextFree(context);
  678|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  679|      0|		}
  680|       |
  681|  1.00k|		sspi_SecureHandleSetLowerPointer(phNewContext, context);
  682|  1.00k|		sspi_SecureHandleSetUpperPointer(phNewContext, NTLM_SSP_NAME);
  ------------------
  |  |  102|  1.00k|#define NTLM_SSP_NAME _T("NTLM")
  |  |  ------------------
  |  |  |  |  275|  1.00k|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  |  |  ------------------
  ------------------
  683|  1.00k|	}
  684|       |
  685|  1.52k|	if ((!input_buffer) || (ntlm_get_state(context) == NTLM_STATE_AUTHENTICATE))
  ------------------
  |  Branch (685:6): [True: 1.00k, False: 520]
  |  Branch (685:25): [True: 0, False: 520]
  ------------------
  686|  1.00k|	{
  687|  1.00k|		if (!pOutput)
  ------------------
  |  Branch (687:7): [True: 0, False: 1.00k]
  ------------------
  688|      0|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  689|       |
  690|  1.00k|		if (pOutput->cBuffers < 1)
  ------------------
  |  Branch (690:7): [True: 0, False: 1.00k]
  ------------------
  691|      0|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  692|       |
  693|  1.00k|		output_buffer = sspi_FindSecBuffer(pOutput, SECBUFFER_TOKEN);
  ------------------
  |  |  916|  1.00k|#define SECBUFFER_TOKEN 2
  ------------------
  694|       |
  695|  1.00k|		if (!output_buffer)
  ------------------
  |  Branch (695:7): [True: 0, False: 1.00k]
  ------------------
  696|      0|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  697|       |
  698|  1.00k|		if (output_buffer->cbBuffer < 1)
  ------------------
  |  Branch (698:7): [True: 0, False: 1.00k]
  ------------------
  699|      0|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  700|       |
  701|  1.00k|		if (ntlm_get_state(context) == NTLM_STATE_INITIAL)
  ------------------
  |  Branch (701:7): [True: 1.00k, False: 0]
  ------------------
  702|  1.00k|			ntlm_change_state(context, NTLM_STATE_NEGOTIATE);
  703|       |
  704|  1.00k|		if (ntlm_get_state(context) == NTLM_STATE_NEGOTIATE)
  ------------------
  |  Branch (704:7): [True: 1.00k, False: 0]
  ------------------
  705|  1.00k|			return ntlm_write_NegotiateMessage(context, output_buffer);
  706|       |
  707|      0|		return SEC_E_OUT_OF_SEQUENCE;
  ------------------
  |  |  150|      0|#define SEC_E_OUT_OF_SEQUENCE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090310)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  708|  1.00k|	}
  709|    520|	else
  710|    520|	{
  711|    520|		if (!input_buffer)
  ------------------
  |  Branch (711:7): [True: 0, False: 520]
  ------------------
  712|      0|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  713|       |
  714|    520|		if (input_buffer->cbBuffer < 1)
  ------------------
  |  Branch (714:7): [True: 0, False: 520]
  ------------------
  715|      0|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  716|       |
  717|    520|		PSecBuffer channel_bindings = sspi_FindSecBuffer(pInput, SECBUFFER_CHANNEL_BINDINGS);
  ------------------
  |  |  928|    520|#define SECBUFFER_CHANNEL_BINDINGS 14
  ------------------
  718|       |
  719|    520|		if (channel_bindings)
  ------------------
  |  Branch (719:7): [True: 0, False: 520]
  ------------------
  720|      0|		{
  721|      0|			context->Bindings.BindingsLength = channel_bindings->cbBuffer;
  722|      0|			context->Bindings.Bindings = (SEC_CHANNEL_BINDINGS*)channel_bindings->pvBuffer;
  723|      0|		}
  724|       |
  725|    520|		if (ntlm_get_state(context) == NTLM_STATE_CHALLENGE)
  ------------------
  |  Branch (725:7): [True: 520, False: 0]
  ------------------
  726|    520|		{
  727|    520|			status = ntlm_read_ChallengeMessage(context, input_buffer);
  728|       |
  729|    520|			if (status != SEC_I_CONTINUE_NEEDED)
  ------------------
  |  |  208|    520|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|    520|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (729:8): [True: 453, False: 67]
  ------------------
  730|    453|				return status;
  731|       |
  732|     67|			if (!pOutput)
  ------------------
  |  Branch (732:8): [True: 0, False: 67]
  ------------------
  733|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  734|       |
  735|     67|			if (pOutput->cBuffers < 1)
  ------------------
  |  Branch (735:8): [True: 0, False: 67]
  ------------------
  736|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  737|       |
  738|     67|			output_buffer = sspi_FindSecBuffer(pOutput, SECBUFFER_TOKEN);
  ------------------
  |  |  916|     67|#define SECBUFFER_TOKEN 2
  ------------------
  739|       |
  740|     67|			if (!output_buffer)
  ------------------
  |  Branch (740:8): [True: 0, False: 67]
  ------------------
  741|      0|				return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  742|       |
  743|     67|			if (output_buffer->cbBuffer < 1)
  ------------------
  |  Branch (743:8): [True: 0, False: 67]
  ------------------
  744|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  745|       |
  746|     67|			if (ntlm_get_state(context) == NTLM_STATE_AUTHENTICATE)
  ------------------
  |  Branch (746:8): [True: 67, False: 0]
  ------------------
  747|     67|				return ntlm_write_AuthenticateMessage(context, output_buffer);
  748|     67|		}
  749|       |
  750|      0|		return SEC_E_OUT_OF_SEQUENCE;
  ------------------
  |  |  150|      0|#define SEC_E_OUT_OF_SEQUENCE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090310)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  751|    520|	}
  752|       |
  753|      0|	return SEC_E_OUT_OF_SEQUENCE;
  ------------------
  |  |  150|      0|#define SEC_E_OUT_OF_SEQUENCE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090310)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  754|  1.52k|}
ntlm.c:ntlm_SetContextServicePrincipalNameW:
  159|  1.00k|{
  160|  1.00k|	WINPR_ASSERT(context);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|       |
  162|  1.00k|	if (!ServicePrincipalName)
  ------------------
  |  Branch (162:6): [True: 1.00k, False: 0]
  ------------------
  163|  1.00k|	{
  164|  1.00k|		context->ServicePrincipalName.Buffer = nullptr;
  165|  1.00k|		context->ServicePrincipalName.Length = 0;
  166|  1.00k|		return 1;
  167|  1.00k|	}
  168|       |
  169|      0|	context->ServicePrincipalName.Length = (USHORT)(_wcslen(ServicePrincipalName) * 2);
  170|      0|	context->ServicePrincipalName.Buffer = (PWSTR)malloc(context->ServicePrincipalName.Length + 2);
  171|       |
  172|      0|	if (!context->ServicePrincipalName.Buffer)
  ------------------
  |  Branch (172:6): [True: 0, False: 0]
  ------------------
  173|      0|		return -1;
  174|       |
  175|      0|	memcpy(context->ServicePrincipalName.Buffer, ServicePrincipalName,
  176|      0|	       context->ServicePrincipalName.Length + 2);
  177|      0|	return 1;
  178|      0|}
ntlm.c:ntlm_SetContextAttributesW:
  964|    529|{
  965|    529|	if (!phContext)
  ------------------
  |  Branch (965:6): [True: 0, False: 529]
  ------------------
  966|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  967|       |
  968|    529|	if (!pBuffer)
  ------------------
  |  Branch (968:6): [True: 0, False: 529]
  ------------------
  969|      0|		return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  970|       |
  971|    529|	NTLM_CONTEXT* context = (NTLM_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
  972|    529|	if (!context)
  ------------------
  |  Branch (972:6): [True: 0, False: 529]
  ------------------
  973|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  974|       |
  975|    529|	if (ulAttribute == SECPKG_ATTR_AUTH_NTLM_HASH)
  ------------------
  |  | 1397|    529|#define SECPKG_ATTR_AUTH_NTLM_HASH 1003
  ------------------
  |  Branch (975:6): [True: 529, False: 0]
  ------------------
  976|    529|	{
  977|    529|		SecPkgContext_AuthNtlmHash* AuthNtlmHash = (SecPkgContext_AuthNtlmHash*)pBuffer;
  978|       |
  979|    529|		if (cbBuffer < sizeof(SecPkgContext_AuthNtlmHash))
  ------------------
  |  Branch (979:7): [True: 0, False: 529]
  ------------------
  980|      0|			return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  981|       |
  982|    529|		if (AuthNtlmHash->Version == 1)
  ------------------
  |  Branch (982:7): [True: 0, False: 529]
  ------------------
  983|      0|			CopyMemory(context->NtlmHash, AuthNtlmHash->NtlmHash, 16);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  984|    529|		else if (AuthNtlmHash->Version == 2)
  ------------------
  |  Branch (984:12): [True: 529, False: 0]
  ------------------
  985|    529|			CopyMemory(context->NtlmV2Hash, AuthNtlmHash->NtlmHash, 16);
  ------------------
  |  |  123|    529|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  986|       |
  987|    529|		return SEC_E_OK;
  ------------------
  |  |  133|    529|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    529|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  988|    529|	}
  989|      0|	else if (ulAttribute == SECPKG_ATTR_AUTH_NTLM_MESSAGE)
  ------------------
  |  | 1398|      0|#define SECPKG_ATTR_AUTH_NTLM_MESSAGE 1100
  ------------------
  |  Branch (989:11): [True: 0, False: 0]
  ------------------
  990|      0|	{
  991|      0|		SecPkgContext_AuthNtlmMessage* AuthNtlmMessage = (SecPkgContext_AuthNtlmMessage*)pBuffer;
  992|       |
  993|      0|		if (cbBuffer < sizeof(SecPkgContext_AuthNtlmMessage))
  ------------------
  |  Branch (993:7): [True: 0, False: 0]
  ------------------
  994|      0|			return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  995|       |
  996|      0|		if (AuthNtlmMessage->type == 1)
  ------------------
  |  Branch (996:7): [True: 0, False: 0]
  ------------------
  997|      0|		{
  998|      0|			sspi_SecBufferFree(&context->NegotiateMessage);
  999|       |
 1000|      0|			if (!sspi_SecBufferAlloc(&context->NegotiateMessage, AuthNtlmMessage->length))
  ------------------
  |  Branch (1000:8): [True: 0, False: 0]
  ------------------
 1001|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1002|       |
 1003|      0|			CopyMemory(context->NegotiateMessage.pvBuffer, AuthNtlmMessage->buffer,
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1004|      0|			           AuthNtlmMessage->length);
 1005|      0|		}
 1006|      0|		else if (AuthNtlmMessage->type == 2)
  ------------------
  |  Branch (1006:12): [True: 0, False: 0]
  ------------------
 1007|      0|		{
 1008|      0|			sspi_SecBufferFree(&context->ChallengeMessage);
 1009|       |
 1010|      0|			if (!sspi_SecBufferAlloc(&context->ChallengeMessage, AuthNtlmMessage->length))
  ------------------
  |  Branch (1010:8): [True: 0, False: 0]
  ------------------
 1011|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1012|       |
 1013|      0|			CopyMemory(context->ChallengeMessage.pvBuffer, AuthNtlmMessage->buffer,
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1014|      0|			           AuthNtlmMessage->length);
 1015|      0|		}
 1016|      0|		else if (AuthNtlmMessage->type == 3)
  ------------------
  |  Branch (1016:12): [True: 0, False: 0]
  ------------------
 1017|      0|		{
 1018|      0|			sspi_SecBufferFree(&context->AuthenticateMessage);
 1019|       |
 1020|      0|			if (!sspi_SecBufferAlloc(&context->AuthenticateMessage, AuthNtlmMessage->length))
  ------------------
  |  Branch (1020:8): [True: 0, False: 0]
  ------------------
 1021|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1022|       |
 1023|      0|			CopyMemory(context->AuthenticateMessage.pvBuffer, AuthNtlmMessage->buffer,
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1024|      0|			           AuthNtlmMessage->length);
 1025|      0|		}
 1026|       |
 1027|      0|		return SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1028|      0|	}
 1029|      0|	else if (ulAttribute == SECPKG_ATTR_AUTH_NTLM_TIMESTAMP)
  ------------------
  |  | 1399|      0|#define SECPKG_ATTR_AUTH_NTLM_TIMESTAMP 1101
  ------------------
  |  Branch (1029:11): [True: 0, False: 0]
  ------------------
 1030|      0|	{
 1031|      0|		SecPkgContext_AuthNtlmTimestamp* AuthNtlmTimestamp =
 1032|      0|		    (SecPkgContext_AuthNtlmTimestamp*)pBuffer;
 1033|       |
 1034|      0|		if (cbBuffer < sizeof(SecPkgContext_AuthNtlmTimestamp))
  ------------------
  |  Branch (1034:7): [True: 0, False: 0]
  ------------------
 1035|      0|			return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1036|       |
 1037|      0|		if (AuthNtlmTimestamp->ChallengeOrResponse)
  ------------------
  |  Branch (1037:7): [True: 0, False: 0]
  ------------------
 1038|      0|			CopyMemory(context->ChallengeTimestamp, AuthNtlmTimestamp->Timestamp, 8);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1039|      0|		else
 1040|      0|			CopyMemory(context->Timestamp, AuthNtlmTimestamp->Timestamp, 8);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1041|       |
 1042|      0|		return SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1043|      0|	}
 1044|      0|	else if (ulAttribute == SECPKG_ATTR_AUTH_NTLM_CLIENT_CHALLENGE)
  ------------------
  |  | 1400|      0|#define SECPKG_ATTR_AUTH_NTLM_CLIENT_CHALLENGE 1102
  ------------------
  |  Branch (1044:11): [True: 0, False: 0]
  ------------------
 1045|      0|	{
 1046|      0|		SecPkgContext_AuthNtlmClientChallenge* AuthNtlmClientChallenge =
 1047|      0|		    (SecPkgContext_AuthNtlmClientChallenge*)pBuffer;
 1048|       |
 1049|      0|		if (cbBuffer < sizeof(SecPkgContext_AuthNtlmClientChallenge))
  ------------------
  |  Branch (1049:7): [True: 0, False: 0]
  ------------------
 1050|      0|			return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1051|       |
 1052|      0|		CopyMemory(context->ClientChallenge, AuthNtlmClientChallenge->ClientChallenge, 8);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1053|      0|		return SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1054|      0|	}
 1055|      0|	else if (ulAttribute == SECPKG_ATTR_AUTH_NTLM_SERVER_CHALLENGE)
  ------------------
  |  | 1401|      0|#define SECPKG_ATTR_AUTH_NTLM_SERVER_CHALLENGE 1103
  ------------------
  |  Branch (1055:11): [True: 0, False: 0]
  ------------------
 1056|      0|	{
 1057|      0|		SecPkgContext_AuthNtlmServerChallenge* AuthNtlmServerChallenge =
 1058|      0|		    (SecPkgContext_AuthNtlmServerChallenge*)pBuffer;
 1059|       |
 1060|      0|		if (cbBuffer < sizeof(SecPkgContext_AuthNtlmServerChallenge))
  ------------------
  |  Branch (1060:7): [True: 0, False: 0]
  ------------------
 1061|      0|			return SEC_E_INVALID_PARAMETER;
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1062|       |
 1063|      0|		CopyMemory(context->ServerChallenge, AuthNtlmServerChallenge->ServerChallenge, 8);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1064|      0|		return SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1065|      0|	}
 1066|       |
 1067|      0|	WLog_ERR(TAG, "TODO: Implement ulAttribute=%08" PRIx32, ulAttribute);
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
 1068|      0|	return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1069|    529|}

ntlm_av_pair_get_value_pointer:
  196|  4.18k|{
  197|  4.18k|	WINPR_ASSERT(pAvPair);
  ------------------
  |  |   76|  4.18k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.18k|	do                                                                                             \
  |  |  |  |   61|  4.18k|	{                                                                                              \
  |  |  |  |   62|  4.18k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.18k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.18k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.18k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.18k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.18k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.18k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.18k|                                                                                                   \
  |  |  |  |   70|  4.18k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.18k|	do                                                      \
  |  |  |  |  |  |   32|  4.18k|	{                                                       \
  |  |  |  |  |  |   33|  4.18k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.18k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.18k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.18k|                                                                                                   \
  |  |  |  |   72|  4.18k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.18k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.18k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.18k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|  4.18k|	if (cbAvPair < sizeof(NTLM_AV_PAIR))
  ------------------
  |  Branch (198:6): [True: 0, False: 4.18k]
  ------------------
  199|      0|		return nullptr;
  200|  4.18k|	return (PBYTE)pAvPair + sizeof(NTLM_AV_PAIR);
  201|  4.18k|}
ntlm_av_pair_get:
  241|  6.37k|{
  242|  6.37k|	UINT16 id = 0;
  243|  6.37k|	size_t cbAvPair = cbAvPairList;
  244|  6.37k|	NTLM_AV_PAIR* pAvPair = pAvPairList;
  245|       |
  246|  6.37k|	if (!ntlm_av_pair_check(pAvPair, cbAvPair))
  ------------------
  |  Branch (246:6): [True: 169, False: 6.20k]
  ------------------
  247|    169|		pAvPair = nullptr;
  248|       |
  249|  19.6k|	while (pAvPair && ntlm_av_pair_get_id(pAvPair, cbAvPair, &id))
  ------------------
  |  Branch (249:9): [True: 18.2k, False: 1.36k]
  |  Branch (249:20): [True: 18.2k, False: 0]
  ------------------
  250|  18.2k|	{
  251|  18.2k|		if (id == AvId)
  ------------------
  |  Branch (251:7): [True: 4.62k, False: 13.6k]
  ------------------
  252|  4.62k|			break;
  253|  13.6k|		if (id == MsvAvEOL)
  ------------------
  |  Branch (253:7): [True: 382, False: 13.2k]
  ------------------
  254|    382|		{
  255|    382|			pAvPair = nullptr;
  256|    382|			break;
  257|    382|		}
  258|       |
  259|  13.2k|		pAvPair = ntlm_av_pair_next(pAvPair, &cbAvPair);
  260|  13.2k|	}
  261|       |
  262|  6.37k|	if (!pAvPair)
  ------------------
  |  Branch (262:6): [True: 1.75k, False: 4.62k]
  ------------------
  263|  1.75k|		cbAvPair = 0;
  264|  6.37k|	if (pcbAvPairListRemaining)
  ------------------
  |  Branch (264:6): [True: 6.37k, False: 0]
  ------------------
  265|  6.37k|		*pcbAvPairListRemaining = cbAvPair;
  266|       |
  267|  6.37k|	return pAvPair;
  268|  6.37k|}
ntlm_construct_challenge_target_info:
  511|    529|{
  512|    529|	BOOL rc = FALSE;
  ------------------
  |  |  113|    529|#define FALSE false
  ------------------
  513|    529|	ULONG AvPairsCount = 0;
  514|    529|	ULONG AvPairsLength = 0;
  515|    529|	NTLM_AV_PAIR* pAvPairList = nullptr;
  516|    529|	size_t cbAvPairList = 0;
  517|    529|	UNICODE_STRING NbDomainName = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  518|    529|	UNICODE_STRING NbComputerName = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  519|    529|	UNICODE_STRING DnsDomainName = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  520|    529|	UNICODE_STRING DnsComputerName = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  521|       |
  522|    529|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  523|       |
  524|    529|	if (ntlm_get_target_computer_name(&NbDomainName, ComputerNameNetBIOS) < 0)
  ------------------
  |  Branch (524:6): [True: 0, False: 529]
  ------------------
  525|      0|		goto fail;
  526|       |
  527|    529|	NbComputerName.Buffer = nullptr;
  528|       |
  529|    529|	if (ntlm_get_target_computer_name(&NbComputerName, ComputerNameNetBIOS) < 0)
  ------------------
  |  Branch (529:6): [True: 0, False: 529]
  ------------------
  530|      0|		goto fail;
  531|       |
  532|    529|	DnsDomainName.Buffer = nullptr;
  533|       |
  534|    529|	if (ntlm_get_target_computer_name(&DnsDomainName, ComputerNameDnsDomain) < 0)
  ------------------
  |  Branch (534:6): [True: 0, False: 529]
  ------------------
  535|      0|		goto fail;
  536|       |
  537|    529|	DnsComputerName.Buffer = nullptr;
  538|       |
  539|    529|	if (ntlm_get_target_computer_name(&DnsComputerName, ComputerNameDnsHostname) < 0)
  ------------------
  |  Branch (539:6): [True: 0, False: 529]
  ------------------
  540|      0|		goto fail;
  541|       |
  542|    529|	AvPairsCount = 5;
  543|    529|	AvPairsLength = NbDomainName.Length + NbComputerName.Length + DnsDomainName.Length +
  544|    529|	                DnsComputerName.Length + 8;
  545|    529|	{
  546|    529|		const size_t length = ntlm_av_pair_list_size(AvPairsCount, AvPairsLength);
  547|    529|		if (!sspi_SecBufferAlloc(&context->ChallengeTargetInfo,
  ------------------
  |  Branch (547:7): [True: 0, False: 529]
  ------------------
  548|    529|		                         WINPR_ASSERTING_INT_CAST(uint32_t, length)))
  ------------------
  |  |  112|    529|	__extension__({                                                                             \
  |  |  113|    529|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|    529|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|    529|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|    529|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 529, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 529, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|    529|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|    529|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|    529|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|    529|	})
  ------------------
  549|      0|			goto fail;
  550|    529|	}
  551|       |
  552|    529|	pAvPairList = (NTLM_AV_PAIR*)context->ChallengeTargetInfo.pvBuffer;
  553|    529|	cbAvPairList = context->ChallengeTargetInfo.cbBuffer;
  554|       |
  555|    529|	if (!ntlm_av_pair_list_init(pAvPairList, cbAvPairList))
  ------------------
  |  Branch (555:6): [True: 0, False: 529]
  ------------------
  556|      0|		goto fail;
  557|       |
  558|    529|	if (!ntlm_av_pair_add(pAvPairList, cbAvPairList, MsvAvNbDomainName, (PBYTE)NbDomainName.Buffer,
  ------------------
  |  Branch (558:6): [True: 0, False: 529]
  ------------------
  559|    529|	                      NbDomainName.Length))
  560|      0|		goto fail;
  561|       |
  562|    529|	if (!ntlm_av_pair_add(pAvPairList, cbAvPairList, MsvAvNbComputerName,
  ------------------
  |  Branch (562:6): [True: 0, False: 529]
  ------------------
  563|    529|	                      (PBYTE)NbComputerName.Buffer, NbComputerName.Length))
  564|      0|		goto fail;
  565|       |
  566|    529|	if (!ntlm_av_pair_add(pAvPairList, cbAvPairList, MsvAvDnsDomainName,
  ------------------
  |  Branch (566:6): [True: 0, False: 529]
  ------------------
  567|    529|	                      (PBYTE)DnsDomainName.Buffer, DnsDomainName.Length))
  568|      0|		goto fail;
  569|       |
  570|    529|	if (!ntlm_av_pair_add(pAvPairList, cbAvPairList, MsvAvDnsComputerName,
  ------------------
  |  Branch (570:6): [True: 0, False: 529]
  ------------------
  571|    529|	                      (PBYTE)DnsComputerName.Buffer, DnsComputerName.Length))
  572|      0|		goto fail;
  573|       |
  574|    529|	if (!ntlm_av_pair_add(pAvPairList, cbAvPairList, MsvAvTimestamp, context->Timestamp,
  ------------------
  |  Branch (574:6): [True: 0, False: 529]
  ------------------
  575|    529|	                      sizeof(context->Timestamp)))
  576|      0|		goto fail;
  577|       |
  578|    529|	rc = TRUE;
  ------------------
  |  |  117|    529|#define TRUE true
  ------------------
  579|    529|fail:
  580|    529|	ntlm_free_unicode_string(&NbDomainName);
  581|    529|	ntlm_free_unicode_string(&NbComputerName);
  582|    529|	ntlm_free_unicode_string(&DnsDomainName);
  583|    529|	ntlm_free_unicode_string(&DnsComputerName);
  584|    529|	return rc;
  585|    529|}
ntlm_construct_authenticate_target_info:
  588|    291|{
  589|    291|	ULONG AvPairsCount = 0;
  590|    291|	size_t AvPairsValueLength = 0;
  591|    291|	NTLM_AV_PAIR* AvTimestamp = nullptr;
  592|    291|	NTLM_AV_PAIR* AvNbDomainName = nullptr;
  593|    291|	NTLM_AV_PAIR* AvNbComputerName = nullptr;
  594|    291|	NTLM_AV_PAIR* AvDnsDomainName = nullptr;
  595|    291|	NTLM_AV_PAIR* AvDnsComputerName = nullptr;
  596|    291|	NTLM_AV_PAIR* AvDnsTreeName = nullptr;
  597|    291|	NTLM_AV_PAIR* ChallengeTargetInfo = nullptr;
  598|    291|	NTLM_AV_PAIR* AuthenticateTargetInfo = nullptr;
  599|    291|	size_t cbAvTimestamp = 0;
  600|    291|	size_t cbAvNbDomainName = 0;
  601|    291|	size_t cbAvNbComputerName = 0;
  602|    291|	size_t cbAvDnsDomainName = 0;
  603|    291|	size_t cbAvDnsComputerName = 0;
  604|    291|	size_t cbAvDnsTreeName = 0;
  605|    291|	size_t cbChallengeTargetInfo = 0;
  606|    291|	size_t cbAuthenticateTargetInfo = 0;
  607|       |
  608|    291|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    291|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    291|	do                                                                                             \
  |  |  |  |   61|    291|	{                                                                                              \
  |  |  |  |   62|    291|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    291|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    291|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    291|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    291|                                                                                                   \
  |  |  |  |   70|    291|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    291|	do                                                      \
  |  |  |  |  |  |   32|    291|	{                                                       \
  |  |  |  |  |  |   33|    291|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    291|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    291|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    291|                                                                                                   \
  |  |  |  |   72|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    291|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    291|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    291|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 291]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  609|       |
  610|    291|	AvPairsCount = 1;
  611|    291|	ChallengeTargetInfo = (NTLM_AV_PAIR*)context->ChallengeTargetInfo.pvBuffer;
  612|    291|	cbChallengeTargetInfo = context->ChallengeTargetInfo.cbBuffer;
  613|    291|	AvNbDomainName = ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo, MsvAvNbDomainName,
  614|    291|	                                  &cbAvNbDomainName);
  615|    291|	AvNbComputerName = ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo,
  616|    291|	                                    MsvAvNbComputerName, &cbAvNbComputerName);
  617|    291|	AvDnsDomainName = ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo,
  618|    291|	                                   MsvAvDnsDomainName, &cbAvDnsDomainName);
  619|    291|	AvDnsComputerName = ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo,
  620|    291|	                                     MsvAvDnsComputerName, &cbAvDnsComputerName);
  621|    291|	AvDnsTreeName = ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo, MsvAvDnsTreeName,
  622|    291|	                                 &cbAvDnsTreeName);
  623|    291|	AvTimestamp = ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo, MsvAvTimestamp,
  624|    291|	                               &cbAvTimestamp);
  625|       |
  626|    291|	if (AvNbDomainName)
  ------------------
  |  Branch (626:6): [True: 235, False: 56]
  ------------------
  627|    235|	{
  628|    235|		size_t avLen = 0;
  629|    235|		if (!ntlm_av_pair_get_len(AvNbDomainName, cbAvNbDomainName, &avLen))
  ------------------
  |  Branch (629:7): [True: 0, False: 235]
  ------------------
  630|      0|			goto fail;
  631|    235|		AvPairsCount++; /* MsvAvNbDomainName */
  632|    235|		AvPairsValueLength += avLen;
  633|    235|	}
  634|       |
  635|    291|	if (AvNbComputerName)
  ------------------
  |  Branch (635:6): [True: 47, False: 244]
  ------------------
  636|     47|	{
  637|     47|		size_t avLen = 0;
  638|     47|		if (!ntlm_av_pair_get_len(AvNbComputerName, cbAvNbComputerName, &avLen))
  ------------------
  |  Branch (638:7): [True: 0, False: 47]
  ------------------
  639|      0|			goto fail;
  640|     47|		AvPairsCount++; /* MsvAvNbComputerName */
  641|     47|		AvPairsValueLength += avLen;
  642|     47|	}
  643|       |
  644|    291|	if (AvDnsDomainName)
  ------------------
  |  Branch (644:6): [True: 41, False: 250]
  ------------------
  645|     41|	{
  646|     41|		size_t avLen = 0;
  647|     41|		if (!ntlm_av_pair_get_len(AvDnsDomainName, cbAvDnsDomainName, &avLen))
  ------------------
  |  Branch (647:7): [True: 0, False: 41]
  ------------------
  648|      0|			goto fail;
  649|     41|		AvPairsCount++; /* MsvAvDnsDomainName */
  650|     41|		AvPairsValueLength += avLen;
  651|     41|	}
  652|       |
  653|    291|	if (AvDnsComputerName)
  ------------------
  |  Branch (653:6): [True: 154, False: 137]
  ------------------
  654|    154|	{
  655|    154|		size_t avLen = 0;
  656|    154|		if (!ntlm_av_pair_get_len(AvDnsComputerName, cbAvDnsComputerName, &avLen))
  ------------------
  |  Branch (656:7): [True: 0, False: 154]
  ------------------
  657|      0|			goto fail;
  658|    154|		AvPairsCount++; /* MsvAvDnsComputerName */
  659|    154|		AvPairsValueLength += avLen;
  660|    154|	}
  661|       |
  662|    291|	if (AvDnsTreeName)
  ------------------
  |  Branch (662:6): [True: 27, False: 264]
  ------------------
  663|     27|	{
  664|     27|		size_t avLen = 0;
  665|     27|		if (!ntlm_av_pair_get_len(AvDnsTreeName, cbAvDnsTreeName, &avLen))
  ------------------
  |  Branch (665:7): [True: 0, False: 27]
  ------------------
  666|      0|			goto fail;
  667|     27|		AvPairsCount++; /* MsvAvDnsTreeName */
  668|     27|		AvPairsValueLength += avLen;
  669|     27|	}
  670|       |
  671|    291|	AvPairsCount++; /* MsvAvTimestamp */
  672|    291|	AvPairsValueLength += 8;
  673|       |
  674|    291|	if (context->UseMIC)
  ------------------
  |  Branch (674:6): [True: 291, False: 0]
  ------------------
  675|    291|	{
  676|    291|		AvPairsCount++; /* MsvAvFlags */
  677|    291|		AvPairsValueLength += 4;
  678|    291|	}
  679|       |
  680|    291|	if (context->SendSingleHostData)
  ------------------
  |  Branch (680:6): [True: 0, False: 291]
  ------------------
  681|      0|	{
  682|      0|		AvPairsCount++; /* MsvAvSingleHost */
  683|      0|		ntlm_compute_single_host_data(context);
  684|      0|		AvPairsValueLength += context->SingleHostData.Size;
  685|      0|	}
  686|       |
  687|       |	/**
  688|       |	 * Extended Protection for Authentication:
  689|       |	 * http://blogs.technet.com/b/srd/archive/2009/12/08/extended-protection-for-authentication.aspx
  690|       |	 */
  691|       |
  692|    291|	if (!context->SuppressExtendedProtection)
  ------------------
  |  Branch (692:6): [True: 291, False: 0]
  ------------------
  693|    291|	{
  694|       |		/**
  695|       |		 * SEC_CHANNEL_BINDINGS structure
  696|       |		 * http://msdn.microsoft.com/en-us/library/windows/desktop/dd919963/
  697|       |		 */
  698|    291|		AvPairsCount++; /* MsvAvChannelBindings */
  699|    291|		AvPairsValueLength += 16;
  700|    291|		ntlm_compute_channel_bindings(context);
  701|       |
  702|    291|		if (context->ServicePrincipalName.Length > 0)
  ------------------
  |  Branch (702:7): [True: 0, False: 291]
  ------------------
  703|      0|		{
  704|      0|			AvPairsCount++; /* MsvAvTargetName */
  705|      0|			AvPairsValueLength += context->ServicePrincipalName.Length;
  706|      0|		}
  707|    291|	}
  708|       |
  709|    291|	{
  710|    291|		size_t size = ntlm_av_pair_list_size(AvPairsCount, AvPairsValueLength);
  711|    291|		if (context->NTLMv2)
  ------------------
  |  Branch (711:7): [True: 291, False: 0]
  ------------------
  712|    291|			size += 8; /* unknown 8-byte padding */
  713|       |
  714|    291|		if (!sspi_SecBufferAlloc(&context->AuthenticateTargetInfo,
  ------------------
  |  Branch (714:7): [True: 0, False: 291]
  ------------------
  715|    291|		                         WINPR_ASSERTING_INT_CAST(uint32_t, size)))
  ------------------
  |  |  112|    291|	__extension__({                                                                             \
  |  |  113|    291|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|    291|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|    291|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    291|	do                                                                                             \
  |  |  |  |  |  |   61|    291|	{                                                                                              \
  |  |  |  |  |  |   62|    291|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    291|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    291|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    291|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    291|                                                                                                   \
  |  |  |  |  |  |   70|    291|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    291|	do                                                      \
  |  |  |  |  |  |  |  |   32|    291|	{                                                       \
  |  |  |  |  |  |  |  |   33|    291|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 291]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    291|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    291|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 291]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    291|                                                                                                   \
  |  |  |  |  |  |   72|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    291|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    291|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    291|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|    291|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|    291|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|    291|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    291|	do                                                                                             \
  |  |  |  |  |  |   61|    291|	{                                                                                              \
  |  |  |  |  |  |   62|    291|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    291|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    291|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    291|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    291|                                                                                                   \
  |  |  |  |  |  |   70|    291|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    291|	do                                                      \
  |  |  |  |  |  |  |  |   32|    291|	{                                                       \
  |  |  |  |  |  |  |  |   33|    873|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 291, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 291, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    291|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    291|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 291]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    291|                                                                                                   \
  |  |  |  |  |  |   72|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    291|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    291|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    291|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|    291|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|    291|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|    291|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|    291|	})
  ------------------
  716|      0|			goto fail;
  717|    291|	}
  718|       |
  719|    291|	AuthenticateTargetInfo = (NTLM_AV_PAIR*)context->AuthenticateTargetInfo.pvBuffer;
  720|    291|	cbAuthenticateTargetInfo = context->AuthenticateTargetInfo.cbBuffer;
  721|       |
  722|    291|	if (!ntlm_av_pair_list_init(AuthenticateTargetInfo, cbAuthenticateTargetInfo))
  ------------------
  |  Branch (722:6): [True: 0, False: 291]
  ------------------
  723|      0|		goto fail;
  724|       |
  725|    291|	if (AvNbDomainName)
  ------------------
  |  Branch (725:6): [True: 235, False: 56]
  ------------------
  726|    235|	{
  727|    235|		if (!ntlm_av_pair_add_copy(AuthenticateTargetInfo, cbAuthenticateTargetInfo, AvNbDomainName,
  ------------------
  |  Branch (727:7): [True: 0, False: 235]
  ------------------
  728|    235|		                           cbAvNbDomainName))
  729|      0|			goto fail;
  730|    235|	}
  731|       |
  732|    291|	if (AvNbComputerName)
  ------------------
  |  Branch (732:6): [True: 47, False: 244]
  ------------------
  733|     47|	{
  734|     47|		if (!ntlm_av_pair_add_copy(AuthenticateTargetInfo, cbAuthenticateTargetInfo,
  ------------------
  |  Branch (734:7): [True: 0, False: 47]
  ------------------
  735|     47|		                           AvNbComputerName, cbAvNbComputerName))
  736|      0|			goto fail;
  737|     47|	}
  738|       |
  739|    291|	if (AvDnsDomainName)
  ------------------
  |  Branch (739:6): [True: 41, False: 250]
  ------------------
  740|     41|	{
  741|     41|		if (!ntlm_av_pair_add_copy(AuthenticateTargetInfo, cbAuthenticateTargetInfo,
  ------------------
  |  Branch (741:7): [True: 0, False: 41]
  ------------------
  742|     41|		                           AvDnsDomainName, cbAvDnsDomainName))
  743|      0|			goto fail;
  744|     41|	}
  745|       |
  746|    291|	if (AvDnsComputerName)
  ------------------
  |  Branch (746:6): [True: 154, False: 137]
  ------------------
  747|    154|	{
  748|    154|		if (!ntlm_av_pair_add_copy(AuthenticateTargetInfo, cbAuthenticateTargetInfo,
  ------------------
  |  Branch (748:7): [True: 0, False: 154]
  ------------------
  749|    154|		                           AvDnsComputerName, cbAvDnsComputerName))
  750|      0|			goto fail;
  751|    154|	}
  752|       |
  753|    291|	if (AvDnsTreeName)
  ------------------
  |  Branch (753:6): [True: 27, False: 264]
  ------------------
  754|     27|	{
  755|     27|		if (!ntlm_av_pair_add_copy(AuthenticateTargetInfo, cbAuthenticateTargetInfo, AvDnsTreeName,
  ------------------
  |  Branch (755:7): [True: 0, False: 27]
  ------------------
  756|     27|		                           cbAvDnsTreeName))
  757|      0|			goto fail;
  758|     27|	}
  759|       |
  760|    291|	if (AvTimestamp)
  ------------------
  |  Branch (760:6): [True: 76, False: 215]
  ------------------
  761|     76|	{
  762|     76|		if (!ntlm_av_pair_add_copy(AuthenticateTargetInfo, cbAuthenticateTargetInfo, AvTimestamp,
  ------------------
  |  Branch (762:7): [True: 3, False: 73]
  ------------------
  763|     76|		                           cbAvTimestamp))
  764|      3|			goto fail;
  765|     76|	}
  766|       |
  767|    288|	if (context->UseMIC)
  ------------------
  |  Branch (767:6): [True: 288, False: 0]
  ------------------
  768|    288|	{
  769|    288|		UINT32 flags = 0;
  770|    288|		winpr_Data_Write_UINT32(&flags, MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK);
  ------------------
  |  |  119|    288|#define MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK 0x00000002
  ------------------
  771|       |
  772|    288|		if (!ntlm_av_pair_add(AuthenticateTargetInfo, cbAuthenticateTargetInfo, MsvAvFlags,
  ------------------
  |  Branch (772:7): [True: 3, False: 285]
  ------------------
  773|    288|		                      (PBYTE)&flags, 4))
  774|      3|			goto fail;
  775|    288|	}
  776|       |
  777|    285|	if (context->SendSingleHostData)
  ------------------
  |  Branch (777:6): [True: 0, False: 285]
  ------------------
  778|      0|	{
  779|      0|		WINPR_ASSERT(context->SingleHostData.Size <= UINT16_MAX);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  780|      0|		if (!ntlm_av_pair_add(AuthenticateTargetInfo, cbAuthenticateTargetInfo, MsvAvSingleHost,
  ------------------
  |  Branch (780:7): [True: 0, False: 0]
  ------------------
  781|      0|		                      (PBYTE)&context->SingleHostData,
  782|      0|		                      (UINT16)context->SingleHostData.Size))
  783|      0|			goto fail;
  784|      0|	}
  785|       |
  786|    285|	if (!context->SuppressExtendedProtection)
  ------------------
  |  Branch (786:6): [True: 285, False: 0]
  ------------------
  787|    285|	{
  788|    285|		if (!ntlm_av_pair_add(AuthenticateTargetInfo, cbAuthenticateTargetInfo,
  ------------------
  |  Branch (788:7): [True: 3, False: 282]
  ------------------
  789|    285|		                      MsvAvChannelBindings, context->ChannelBindingsHash, 16))
  790|      3|			goto fail;
  791|       |
  792|    282|		if (context->ServicePrincipalName.Length > 0)
  ------------------
  |  Branch (792:7): [True: 0, False: 282]
  ------------------
  793|      0|		{
  794|      0|			if (!ntlm_av_pair_add(AuthenticateTargetInfo, cbAuthenticateTargetInfo, MsvAvTargetName,
  ------------------
  |  Branch (794:8): [True: 0, False: 0]
  ------------------
  795|      0|			                      (PBYTE)context->ServicePrincipalName.Buffer,
  796|      0|			                      context->ServicePrincipalName.Length))
  797|      0|				goto fail;
  798|      0|		}
  799|    282|	}
  800|       |
  801|    282|	if (context->NTLMv2)
  ------------------
  |  Branch (801:6): [True: 282, False: 0]
  ------------------
  802|    282|	{
  803|    282|		size_t cbAvEOL = 0;
  804|    282|		NTLM_AV_PAIR* AvEOL =
  805|    282|		    ntlm_av_pair_get(ChallengeTargetInfo, cbChallengeTargetInfo, MsvAvEOL, &cbAvEOL);
  806|       |
  807|    282|		size_t cbAvEntryLen = 0;
  808|    282|		if (!ntlm_av_pair_get_len(AvEOL, cbAvEOL, &cbAvEntryLen))
  ------------------
  |  Branch (808:7): [True: 215, False: 67]
  ------------------
  809|    215|			goto fail;
  810|       |
  811|     67|		ZeroMemory(AvEOL, sizeof(NTLM_AV_PAIR));
  ------------------
  |  |  126|     67|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  812|     67|	}
  813|       |
  814|     67|	return TRUE;
  ------------------
  |  |  117|     67|#define TRUE true
  ------------------
  815|    224|fail:
  816|    224|	sspi_SecBufferFree(&context->AuthenticateTargetInfo);
  817|    224|	return FALSE;
  ------------------
  |  |  113|    224|#define FALSE false
  ------------------
  818|    282|}
ntlm_av_pairs.c:ntlm_av_pair_check:
  216|  40.9k|{
  217|  40.9k|	return ntlm_av_pair_check_data(pAvPair, cbAvPair, 0);
  218|  40.9k|}
ntlm_av_pairs.c:ntlm_av_pair_check_data:
   45|  40.9k|{
   46|  40.9k|	size_t offset = 0;
   47|  40.9k|	if (!pAvPair || cbAvPair < sizeof(NTLM_AV_PAIR) + size)
  ------------------
  |  Branch (47:6): [True: 35, False: 40.9k]
  |  Branch (47:18): [True: 66, False: 40.8k]
  ------------------
   48|    101|		return FALSE;
  ------------------
  |  |  113|    101|#define FALSE false
  ------------------
   49|  40.8k|	if (!ntlm_av_pair_get_next_offset(pAvPair, cbAvPair, &offset))
  ------------------
  |  Branch (49:6): [True: 0, False: 40.8k]
  ------------------
   50|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   51|  40.8k|	return cbAvPair >= offset;
   52|  40.8k|}
ntlm_av_pairs.c:ntlm_av_pair_get_next_offset:
  204|  57.9k|{
  205|  57.9k|	size_t avLen = 0;
  206|  57.9k|	if (!pOffset)
  ------------------
  |  Branch (206:6): [True: 0, False: 57.9k]
  ------------------
  207|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  208|       |
  209|  57.9k|	if (!ntlm_av_pair_get_len(pAvPair, size, &avLen))
  ------------------
  |  Branch (209:6): [True: 0, False: 57.9k]
  ------------------
  210|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  211|  57.9k|	*pOffset = avLen + sizeof(NTLM_AV_PAIR);
  212|  57.9k|	return TRUE;
  ------------------
  |  |  117|  57.9k|#define TRUE true
  ------------------
  213|  57.9k|}
ntlm_av_pairs.c:ntlm_av_pair_get_id:
  116|  18.8k|{
  117|  18.8k|	if (!pAvPair || !pair)
  ------------------
  |  Branch (117:6): [True: 0, False: 18.8k]
  |  Branch (117:18): [True: 0, False: 18.8k]
  ------------------
  118|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  119|       |
  120|  18.8k|	if (size < sizeof(NTLM_AV_PAIR))
  ------------------
  |  Branch (120:6): [True: 0, False: 18.8k]
  ------------------
  121|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  122|       |
  123|  18.8k|	const UINT16 AvId = winpr_Data_Get_UINT16(&pAvPair->AvId);
  124|       |
  125|  18.8k|	*pair = AvId;
  126|  18.8k|	return TRUE;
  ------------------
  |  |  117|  18.8k|#define TRUE true
  ------------------
  127|  18.8k|}
ntlm_av_pairs.c:ntlm_av_pair_next:
  221|  17.0k|{
  222|  17.0k|	size_t offset = 0;
  223|       |
  224|  17.0k|	if (!pcbAvPair)
  ------------------
  |  Branch (224:6): [True: 0, False: 17.0k]
  ------------------
  225|      0|		return nullptr;
  226|  17.0k|	if (!ntlm_av_pair_check(pAvPair, *pcbAvPair))
  ------------------
  |  Branch (226:6): [True: 0, False: 17.0k]
  ------------------
  227|      0|		return nullptr;
  228|       |
  229|  17.0k|	if (!ntlm_av_pair_get_next_offset(pAvPair, *pcbAvPair, &offset))
  ------------------
  |  Branch (229:6): [True: 0, False: 17.0k]
  ------------------
  230|      0|		return nullptr;
  231|       |
  232|  17.0k|	*pcbAvPair -= offset;
  233|  17.0k|	NTLM_AV_PAIR* next = (NTLM_AV_PAIR*)((PBYTE)pAvPair + offset);
  234|  17.0k|	if (!ntlm_av_pair_check(next, *pcbAvPair))
  ------------------
  |  Branch (234:6): [True: 1.19k, False: 15.8k]
  ------------------
  235|  1.19k|		return nullptr;
  236|  15.8k|	return next;
  237|  17.0k|}
ntlm_av_pairs.c:ntlm_get_target_computer_name:
  364|  2.11k|{
  365|  2.11k|	int status = -1;
  366|       |
  367|  2.11k|	WINPR_ASSERT(pName);
  ------------------
  |  |   76|  2.11k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  2.11k|	do                                                                                             \
  |  |  |  |   61|  2.11k|	{                                                                                              \
  |  |  |  |   62|  2.11k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  2.11k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  2.11k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  2.11k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  2.11k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  2.11k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  2.11k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  2.11k|                                                                                                   \
  |  |  |  |   70|  2.11k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.11k|	do                                                      \
  |  |  |  |  |  |   32|  2.11k|	{                                                       \
  |  |  |  |  |  |   33|  2.11k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 2.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  2.11k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  2.11k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 2.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  2.11k|                                                                                                   \
  |  |  |  |   72|  2.11k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  2.11k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  2.11k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  2.11k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 2.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  368|       |
  369|  2.11k|	char* name = get_name(ComputerNameNetBIOS);
  370|  2.11k|	if (!name)
  ------------------
  |  Branch (370:6): [True: 0, False: 2.11k]
  ------------------
  371|      0|		return -1;
  372|       |
  373|  2.11k|	CharUpperA(name);
  374|       |
  375|  2.11k|	size_t len = 0;
  376|  2.11k|	pName->Buffer = ConvertUtf8ToWCharAlloc(name, &len);
  377|  2.11k|	free(name);
  378|       |
  379|  2.11k|	if (!pName->Buffer || (len == 0) || (len > UINT16_MAX / sizeof(WCHAR)))
  ------------------
  |  Branch (379:6): [True: 0, False: 2.11k]
  |  Branch (379:24): [True: 0, False: 2.11k]
  |  Branch (379:38): [True: 0, False: 2.11k]
  ------------------
  380|      0|	{
  381|      0|		free(pName->Buffer);
  382|      0|		pName->Buffer = nullptr;
  383|      0|		return status;
  384|      0|	}
  385|       |
  386|  2.11k|	pName->Length = (USHORT)((len) * sizeof(WCHAR));
  387|  2.11k|	pName->MaximumLength = pName->Length;
  388|  2.11k|	return 1;
  389|  2.11k|}
ntlm_av_pairs.c:get_name:
  339|  2.11k|{
  340|  2.11k|	DWORD nSize = 0;
  341|       |
  342|  2.11k|	if (GetComputerNameExA(type, nullptr, &nSize))
  ------------------
  |  Branch (342:6): [True: 0, False: 2.11k]
  ------------------
  343|      0|		return nullptr;
  344|       |
  345|  2.11k|	if (GetLastError() != ERROR_MORE_DATA)
  ------------------
  |  |  367|  2.11k|#define ERROR_MORE_DATA 0x000000EA
  ------------------
  |  Branch (345:6): [True: 0, False: 2.11k]
  ------------------
  346|      0|		return nullptr;
  347|       |
  348|  2.11k|	char* computerName = calloc(1, nSize);
  349|       |
  350|  2.11k|	if (!computerName)
  ------------------
  |  Branch (350:6): [True: 0, False: 2.11k]
  ------------------
  351|      0|		return nullptr;
  352|       |
  353|  2.11k|	if (!GetComputerNameExA(type, computerName, &nSize))
  ------------------
  |  Branch (353:6): [True: 0, False: 2.11k]
  ------------------
  354|      0|	{
  355|      0|		free(computerName);
  356|      0|		return nullptr;
  357|      0|	}
  358|       |
  359|  2.11k|	return computerName;
  360|  2.11k|}
ntlm_av_pairs.c:ntlm_av_pair_list_size:
  190|    820|{
  191|       |	/* size of headers + value lengths + terminating MsvAvEOL AV_PAIR */
  192|    820|	return ((AvPairsCount + 1) * 4ULL) + AvPairsValueLength;
  193|    820|}
ntlm_av_pairs.c:ntlm_av_pair_list_init:
  103|  4.60k|{
  104|  4.60k|	NTLM_AV_PAIR* pAvPair = pAvPairList;
  105|       |
  106|  4.60k|	if (!pAvPair || (cbAvPairList < sizeof(NTLM_AV_PAIR)))
  ------------------
  |  Branch (106:6): [True: 0, False: 4.60k]
  |  Branch (106:18): [True: 0, False: 4.60k]
  ------------------
  107|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  108|       |
  109|  4.60k|	ntlm_av_pair_set_id(pAvPair, MsvAvEOL);
  110|  4.60k|	ntlm_av_pair_set_len(pAvPair, 0);
  111|  4.60k|	return TRUE;
  ------------------
  |  |  117|  4.60k|#define TRUE true
  ------------------
  112|  4.60k|}
ntlm_av_pairs.c:ntlm_av_pair_set_id:
   91|  8.39k|{
   92|  8.39k|	WINPR_ASSERT(pAvPair);
  ------------------
  |  |   76|  8.39k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  8.39k|	do                                                                                             \
  |  |  |  |   61|  8.39k|	{                                                                                              \
  |  |  |  |   62|  8.39k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  8.39k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  8.39k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  8.39k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  8.39k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  8.39k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  8.39k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  8.39k|                                                                                                   \
  |  |  |  |   70|  8.39k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  8.39k|	do                                                      \
  |  |  |  |  |  |   32|  8.39k|	{                                                       \
  |  |  |  |  |  |   33|  8.39k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 8.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  8.39k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  8.39k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 8.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  8.39k|                                                                                                   \
  |  |  |  |   72|  8.39k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  8.39k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  8.39k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  8.39k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 8.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|  8.39k|	winpr_Data_Write_UINT16(&pAvPair->AvId, id);
   94|  8.39k|}
ntlm_av_pairs.c:ntlm_av_pair_set_len:
   97|  8.39k|{
   98|  8.39k|	WINPR_ASSERT(pAvPair);
  ------------------
  |  |   76|  8.39k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  8.39k|	do                                                                                             \
  |  |  |  |   61|  8.39k|	{                                                                                              \
  |  |  |  |   62|  8.39k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  8.39k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  8.39k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  8.39k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  8.39k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  8.39k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  8.39k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  8.39k|                                                                                                   \
  |  |  |  |   70|  8.39k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  8.39k|	do                                                      \
  |  |  |  |  |  |   32|  8.39k|	{                                                       \
  |  |  |  |  |  |   33|  8.39k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 8.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  8.39k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  8.39k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 8.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  8.39k|                                                                                                   \
  |  |  |  |   72|  8.39k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  8.39k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  8.39k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  8.39k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 8.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|  8.39k|	winpr_Data_Write_UINT16(&pAvPair->AvLen, len);
  100|  8.39k|}
ntlm_av_pairs.c:ntlm_av_pair_add:
  272|  3.79k|{
  273|  3.79k|	size_t cbAvPair = 0;
  274|  3.79k|	NTLM_AV_PAIR* pAvPair = nullptr;
  275|       |
  276|  3.79k|	pAvPair = ntlm_av_pair_get(pAvPairList, cbAvPairList, MsvAvEOL, &cbAvPair);
  277|       |
  278|       |	/* size of header + value length + terminating MsvAvEOL AV_PAIR */
  279|  3.79k|	if (!pAvPair || cbAvPair < 2 * sizeof(NTLM_AV_PAIR) + AvLen)
  ------------------
  |  Branch (279:6): [True: 0, False: 3.79k]
  |  Branch (279:18): [True: 9, False: 3.78k]
  ------------------
  280|      9|		return FALSE;
  ------------------
  |  |  113|      9|#define FALSE false
  ------------------
  281|       |
  282|  3.78k|	ntlm_av_pair_set_id(pAvPair, (UINT16)AvId);
  283|  3.78k|	ntlm_av_pair_set_len(pAvPair, AvLen);
  284|  3.78k|	if (AvLen)
  ------------------
  |  Branch (284:6): [True: 3.42k, False: 361]
  ------------------
  285|  3.42k|	{
  286|  3.42k|		WINPR_ASSERT(Value != nullptr);
  ------------------
  |  |   76|  3.42k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.42k|	do                                                                                             \
  |  |  |  |   61|  3.42k|	{                                                                                              \
  |  |  |  |   62|  3.42k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.42k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.42k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.42k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.42k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.42k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.42k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.42k|                                                                                                   \
  |  |  |  |   70|  3.42k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.42k|	do                                                      \
  |  |  |  |  |  |   32|  3.42k|	{                                                       \
  |  |  |  |  |  |   33|  3.42k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.42k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.42k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.42k|                                                                                                   \
  |  |  |  |   72|  3.42k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.42k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.42k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.42k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  287|  3.42k|		CopyMemory(ntlm_av_pair_get_value_pointer(pAvPair, cbAvPair), Value, AvLen);
  ------------------
  |  |  123|  3.42k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  288|  3.42k|	}
  289|       |
  290|  3.78k|	pAvPair = ntlm_av_pair_next(pAvPair, &cbAvPair);
  291|  3.78k|	return ntlm_av_pair_list_init(pAvPair, cbAvPair);
  292|  3.79k|}
ntlm_av_pairs.c:ntlm_free_unicode_string:
  392|  2.11k|{
  393|  2.11k|	if (string)
  ------------------
  |  Branch (393:6): [True: 2.11k, False: 0]
  ------------------
  394|  2.11k|	{
  395|  2.11k|		if (string->Length > 0)
  ------------------
  |  Branch (395:7): [True: 2.11k, False: 0]
  ------------------
  396|  2.11k|		{
  397|  2.11k|			free(string->Buffer);
  398|  2.11k|			string->Buffer = nullptr;
  399|  2.11k|			string->Length = 0;
  400|  2.11k|			string->MaximumLength = 0;
  401|  2.11k|		}
  402|  2.11k|	}
  403|  2.11k|}
ntlm_av_pairs.c:ntlm_av_pair_get_len:
  150|  59.2k|{
  151|  59.2k|	if (!pAvPair)
  ------------------
  |  Branch (151:6): [True: 215, False: 59.0k]
  ------------------
  152|    215|		return FALSE;
  ------------------
  |  |  113|    215|#define FALSE false
  ------------------
  153|       |
  154|  59.0k|	if (size < sizeof(NTLM_AV_PAIR))
  ------------------
  |  Branch (154:6): [True: 0, False: 59.0k]
  ------------------
  155|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  156|       |
  157|  59.0k|	const UINT16 AvLen = winpr_Data_Get_UINT16(&pAvPair->AvLen);
  158|       |
  159|  59.0k|	*pAvLen = AvLen;
  160|  59.0k|	return TRUE;
  ------------------
  |  |  117|  59.0k|#define TRUE true
  ------------------
  161|  59.0k|}
ntlm_av_pairs.c:ntlm_compute_channel_bindings:
  444|    291|{
  445|    291|	WINPR_DIGEST_CTX* md5 = nullptr;
  446|    291|	BYTE* ChannelBindingToken = nullptr;
  447|    291|	UINT32 ChannelBindingTokenLength = 0;
  448|    291|	SEC_CHANNEL_BINDINGS* ChannelBindings = nullptr;
  449|       |
  450|    291|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    291|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    291|	do                                                                                             \
  |  |  |  |   61|    291|	{                                                                                              \
  |  |  |  |   62|    291|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    291|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    291|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    291|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    291|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    291|                                                                                                   \
  |  |  |  |   70|    291|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    291|	do                                                      \
  |  |  |  |  |  |   32|    291|	{                                                       \
  |  |  |  |  |  |   33|    291|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    291|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    291|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    291|                                                                                                   \
  |  |  |  |   72|    291|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    291|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    291|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    291|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 291]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  451|       |
  452|    291|	ZeroMemory(context->ChannelBindingsHash, WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |  126|    291|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  453|    291|	ChannelBindings = context->Bindings.Bindings;
  454|       |
  455|    291|	if (!ChannelBindings)
  ------------------
  |  Branch (455:6): [True: 291, False: 0]
  ------------------
  456|    291|		return;
  457|       |
  458|      0|	if (!(md5 = winpr_Digest_New()))
  ------------------
  |  Branch (458:6): [True: 0, False: 0]
  ------------------
  459|      0|		return;
  460|       |
  461|      0|	if (!winpr_Digest_Init(md5, WINPR_MD_MD5))
  ------------------
  |  Branch (461:6): [True: 0, False: 0]
  ------------------
  462|      0|		goto out;
  463|       |
  464|      0|	ChannelBindingTokenLength = context->Bindings.BindingsLength - sizeof(SEC_CHANNEL_BINDINGS);
  465|      0|	ChannelBindingToken = &((BYTE*)ChannelBindings)[ChannelBindings->dwApplicationDataOffset];
  466|       |
  467|      0|	if (!ntlm_md5_update_uint32_be(md5, ChannelBindings->dwInitiatorAddrType))
  ------------------
  |  Branch (467:6): [True: 0, False: 0]
  ------------------
  468|      0|		goto out;
  469|       |
  470|      0|	if (!ntlm_md5_update_uint32_be(md5, ChannelBindings->cbInitiatorLength))
  ------------------
  |  Branch (470:6): [True: 0, False: 0]
  ------------------
  471|      0|		goto out;
  472|       |
  473|      0|	if (!ntlm_md5_update_uint32_be(md5, ChannelBindings->dwAcceptorAddrType))
  ------------------
  |  Branch (473:6): [True: 0, False: 0]
  ------------------
  474|      0|		goto out;
  475|       |
  476|      0|	if (!ntlm_md5_update_uint32_be(md5, ChannelBindings->cbAcceptorLength))
  ------------------
  |  Branch (476:6): [True: 0, False: 0]
  ------------------
  477|      0|		goto out;
  478|       |
  479|      0|	if (!ntlm_md5_update_uint32_be(md5, ChannelBindings->cbApplicationDataLength))
  ------------------
  |  Branch (479:6): [True: 0, False: 0]
  ------------------
  480|      0|		goto out;
  481|       |
  482|      0|	if (!winpr_Digest_Update(md5, (void*)ChannelBindingToken, ChannelBindingTokenLength))
  ------------------
  |  Branch (482:6): [True: 0, False: 0]
  ------------------
  483|      0|		goto out;
  484|       |
  485|      0|	if (!winpr_Digest_Final(md5, context->ChannelBindingsHash, WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|      0|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  |  Branch (485:6): [True: 0, False: 0]
  ------------------
  486|      0|		goto out;
  487|       |
  488|      0|out:
  489|      0|	winpr_Digest_Free(md5);
  490|      0|}
ntlm_av_pairs.c:ntlm_av_pair_add_copy:
  317|    580|{
  318|    580|	UINT16 pair = 0;
  319|    580|	size_t avLen = 0;
  320|       |
  321|    580|	if (!ntlm_av_pair_check(pAvPair, cbAvPair))
  ------------------
  |  Branch (321:6): [True: 0, False: 580]
  ------------------
  322|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  323|       |
  324|    580|	if (!ntlm_av_pair_get_id(pAvPair, cbAvPair, &pair))
  ------------------
  |  Branch (324:6): [True: 0, False: 580]
  ------------------
  325|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  326|       |
  327|    580|	if (!ntlm_av_pair_get_len(pAvPair, cbAvPair, &avLen))
  ------------------
  |  Branch (327:6): [True: 0, False: 580]
  ------------------
  328|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  329|       |
  330|    580|	if (!ntlm_av_pair_valid(pair))
  ------------------
  |  Branch (330:6): [True: 0, False: 580]
  ------------------
  331|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  332|       |
  333|    580|	WINPR_ASSERT(avLen <= UINT16_MAX);
  ------------------
  |  |   76|    580|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    580|	do                                                                                             \
  |  |  |  |   61|    580|	{                                                                                              \
  |  |  |  |   62|    580|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    580|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    580|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    580|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    580|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    580|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    580|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    580|                                                                                                   \
  |  |  |  |   70|    580|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    580|	do                                                      \
  |  |  |  |  |  |   32|    580|	{                                                       \
  |  |  |  |  |  |   33|    580|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 580]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    580|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    580|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 580]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    580|                                                                                                   \
  |  |  |  |   72|    580|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    580|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    580|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    580|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 580]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  334|    580|	return ntlm_av_pair_add(pAvPairList, cbAvPairList, WINPR_ASSERTING_INT_CAST(NTLM_AV_ID, pair),
  ------------------
  |  |  112|    580|	__extension__({                                                                             \
  |  |  113|    580|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|    580|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|    580|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    580|	do                                                                                             \
  |  |  |  |  |  |   61|    580|	{                                                                                              \
  |  |  |  |  |  |   62|    580|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    580|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    580|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    580|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    580|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    580|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    580|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    580|                                                                                                   \
  |  |  |  |  |  |   70|    580|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    580|	do                                                      \
  |  |  |  |  |  |  |  |   32|    580|	{                                                       \
  |  |  |  |  |  |  |  |   33|    580|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 580]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    580|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    580|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 580]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    580|                                                                                                   \
  |  |  |  |  |  |   72|    580|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    580|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    580|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    580|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 580]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|    580|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|    580|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|    580|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    580|	do                                                                                             \
  |  |  |  |  |  |   61|    580|	{                                                                                              \
  |  |  |  |  |  |   62|    580|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|    580|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|    580|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|    580|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|    580|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|    580|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|    580|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|    580|                                                                                                   \
  |  |  |  |  |  |   70|    580|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|    580|	do                                                      \
  |  |  |  |  |  |  |  |   32|    580|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.74k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 580, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 580, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    580|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|    580|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 580]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    580|                                                                                                   \
  |  |  |  |  |  |   72|    580|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|    580|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|    580|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|    580|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 580]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|    580|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|    580|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|    580|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|    580|	})
  ------------------
  335|    580|	                        ntlm_av_pair_get_value_pointer(pAvPair, cbAvPair), (UINT16)avLen);
  336|    580|}
ntlm_av_pairs.c:ntlm_av_pair_valid:
  295|    580|{
  296|    580|	switch (pair)
  297|    580|	{
  298|      0|		case MsvAvEOL:
  ------------------
  |  Branch (298:3): [True: 0, False: 580]
  ------------------
  299|     47|		case MsvAvNbComputerName:
  ------------------
  |  Branch (299:3): [True: 47, False: 533]
  ------------------
  300|    282|		case MsvAvNbDomainName:
  ------------------
  |  Branch (300:3): [True: 235, False: 345]
  ------------------
  301|    436|		case MsvAvDnsComputerName:
  ------------------
  |  Branch (301:3): [True: 154, False: 426]
  ------------------
  302|    477|		case MsvAvDnsDomainName:
  ------------------
  |  Branch (302:3): [True: 41, False: 539]
  ------------------
  303|    504|		case MsvAvDnsTreeName:
  ------------------
  |  Branch (303:3): [True: 27, False: 553]
  ------------------
  304|    504|		case MsvAvFlags:
  ------------------
  |  Branch (304:3): [True: 0, False: 580]
  ------------------
  305|    580|		case MsvAvTimestamp:
  ------------------
  |  Branch (305:3): [True: 76, False: 504]
  ------------------
  306|    580|		case MsvAvSingleHost:
  ------------------
  |  Branch (306:3): [True: 0, False: 580]
  ------------------
  307|    580|		case MsvAvTargetName:
  ------------------
  |  Branch (307:3): [True: 0, False: 580]
  ------------------
  308|    580|		case MsvAvChannelBindings:
  ------------------
  |  Branch (308:3): [True: 0, False: 580]
  ------------------
  309|    580|			return TRUE;
  ------------------
  |  |  117|    580|#define TRUE true
  ------------------
  310|      0|		default:
  ------------------
  |  Branch (310:3): [True: 0, False: 580]
  ------------------
  311|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  312|    580|	}
  313|    580|}

ntlm_get_version_info:
   59|  1.59k|{
   60|  1.59k|	WINPR_ASSERT(versionInfo);
  ------------------
  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|       |
   62|       |#if defined(WITH_WINPR_DEPRECATED)
   63|       |	OSVERSIONINFOA osVersionInfo = WINPR_C_ARRAY_INIT;
   64|       |	osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
   65|       |	if (!GetVersionExA(&osVersionInfo))
   66|       |		return FALSE;
   67|       |	versionInfo->ProductMajorVersion = (UINT8)osVersionInfo.dwMajorVersion;
   68|       |	versionInfo->ProductMinorVersion = (UINT8)osVersionInfo.dwMinorVersion;
   69|       |	versionInfo->ProductBuild = (UINT16)osVersionInfo.dwBuildNumber;
   70|       |#else
   71|       |	/* Always return fixed version number.
   72|       |	 *
   73|       |	 * ProductVersion is fixed since windows 10 to Major 10, Minor 0
   74|       |	 * ProductBuild taken from https://en.wikipedia.org/wiki/Windows_11_version_history
   75|       |	 * with most recent (pre) release build number
   76|       |	 */
   77|  1.59k|	versionInfo->ProductMajorVersion = 10;
   78|  1.59k|	versionInfo->ProductMinorVersion = 0;
   79|  1.59k|	versionInfo->ProductBuild = 22631;
   80|  1.59k|#endif
   81|  1.59k|	ZeroMemory(versionInfo->Reserved, sizeof(versionInfo->Reserved));
  ------------------
  |  |  126|  1.59k|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
   82|  1.59k|	versionInfo->NTLMRevisionCurrent = NTLMSSP_REVISION_W2K3;
  ------------------
  |  |  127|  1.59k|#define NTLMSSP_REVISION_W2K3 0x0F
  ------------------
   83|  1.59k|	return TRUE;
  ------------------
  |  |  117|  1.59k|#define TRUE true
  ------------------
   84|  1.59k|}
ntlm_read_version_info:
   95|    775|{
   96|    775|	WINPR_ASSERT(s);
  ------------------
  |  |   76|    775|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    775|	do                                                                                             \
  |  |  |  |   61|    775|	{                                                                                              \
  |  |  |  |   62|    775|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    775|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    775|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    775|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    775|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    775|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    775|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    775|                                                                                                   \
  |  |  |  |   70|    775|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    775|	do                                                      \
  |  |  |  |  |  |   32|    775|	{                                                       \
  |  |  |  |  |  |   33|    775|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 775]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    775|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    775|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 775]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    775|                                                                                                   \
  |  |  |  |   72|    775|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    775|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    775|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    775|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 775]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   97|    775|	WINPR_ASSERT(versionInfo);
  ------------------
  |  |   76|    775|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    775|	do                                                                                             \
  |  |  |  |   61|    775|	{                                                                                              \
  |  |  |  |   62|    775|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    775|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    775|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    775|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    775|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    775|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    775|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    775|                                                                                                   \
  |  |  |  |   70|    775|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    775|	do                                                      \
  |  |  |  |  |  |   32|    775|	{                                                       \
  |  |  |  |  |  |   33|    775|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 775]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    775|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    775|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 775]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    775|                                                                                                   \
  |  |  |  |   72|    775|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    775|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    775|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    775|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 775]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|       |
   99|    775|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 8))
  ------------------
  |  |  128|    775|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|    775|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|    775|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|    775|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (99:6): [True: 8, False: 767]
  ------------------
  100|      8|		return FALSE;
  ------------------
  |  |  113|      8|#define FALSE false
  ------------------
  101|       |
  102|    767|	Stream_Read_UINT8(s, versionInfo->ProductMajorVersion); /* ProductMajorVersion (1 byte) */
  ------------------
  |  |  648|    767|	do                                 \
  |  |  649|    767|	{                                  \
  |  |  650|    767|		_v = stream_read_u8(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    767|#define TRUE true
  |  |  ------------------
  |  |  651|    767|	} while (0)
  |  |  ------------------
  |  |  |  Branch (651:11): [Folded, False: 767]
  |  |  ------------------
  ------------------
  103|    767|	Stream_Read_UINT8(s, versionInfo->ProductMinorVersion); /* ProductMinorVersion (1 byte) */
  ------------------
  |  |  648|    767|	do                                 \
  |  |  649|    767|	{                                  \
  |  |  650|    767|		_v = stream_read_u8(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    767|#define TRUE true
  |  |  ------------------
  |  |  651|    767|	} while (0)
  |  |  ------------------
  |  |  |  Branch (651:11): [Folded, False: 767]
  |  |  ------------------
  ------------------
  104|    767|	Stream_Read_UINT16(s, versionInfo->ProductBuild);       /* ProductBuild (2 bytes) */
  ------------------
  |  |  660|    767|	do                                     \
  |  |  661|    767|	{                                      \
  |  |  662|    767|		_v = stream_read_u16_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    767|#define TRUE true
  |  |  ------------------
  |  |  663|    767|	} while (0)
  |  |  ------------------
  |  |  |  Branch (663:11): [Folded, False: 767]
  |  |  ------------------
  ------------------
  105|    767|	Stream_Read(s, versionInfo->Reserved, sizeof(versionInfo->Reserved)); /* Reserved (3 bytes) */
  106|    767|	Stream_Read_UINT8(s, versionInfo->NTLMRevisionCurrent); /* NTLMRevisionCurrent (1 byte) */
  ------------------
  |  |  648|    767|	do                                 \
  |  |  649|    767|	{                                  \
  |  |  650|    767|		_v = stream_read_u8(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    767|#define TRUE true
  |  |  ------------------
  |  |  651|    767|	} while (0)
  |  |  ------------------
  |  |  |  Branch (651:11): [Folded, False: 767]
  |  |  ------------------
  ------------------
  107|    767|	return TRUE;
  ------------------
  |  |  117|    767|#define TRUE true
  ------------------
  108|    775|}
ntlm_write_version_info:
  119|  1.58k|{
  120|  1.58k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  1.58k|	WINPR_ASSERT(versionInfo);
  ------------------
  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  122|       |
  123|  1.58k|	if (!Stream_CheckAndLogRequiredCapacityEx(
  ------------------
  |  Branch (123:6): [True: 0, False: 1.58k]
  ------------------
  124|  1.58k|	        TAG, WLOG_WARN, s, 5ull + sizeof(versionInfo->Reserved), 1ull,
  ------------------
  |  |   37|  1.58k|#define TAG WINPR_TAG("sspi.NTLM")
  |  |  ------------------
  |  |  |  |   25|  1.58k|#define WINPR_TAG(tag) "com.winpr." tag
  |  |  ------------------
  ------------------
              	        TAG, WLOG_WARN, s, 5ull + sizeof(versionInfo->Reserved), 1ull,
  ------------------
  |  |   45|  1.58k|#define WLOG_WARN 3
  ------------------
  125|  1.58k|	        "%s(%s:%" PRIuz ") NTLM_VERSION_INFO", __func__, __FILE__, (size_t)__LINE__))
  126|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  127|       |
  128|  1.58k|	Stream_Write_UINT8(s, versionInfo->ProductMajorVersion); /* ProductMajorVersion (1 byte) */
  ------------------
  |  |  858|  1.58k|	do                                          \
  |  |  859|  1.58k|	{                                           \
  |  |  860|  1.58k|		WINPR_ASSERT((v) <= UINT8_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  861|  1.58k|		WINPR_ASSERT((v) >= 0);                 \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  862|  1.58k|		Stream_Write_UINT8_unchecked((s), (v)); \
  |  |  863|  1.58k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (863:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  129|  1.58k|	Stream_Write_UINT8(s, versionInfo->ProductMinorVersion); /* ProductMinorVersion (1 byte) */
  ------------------
  |  |  858|  1.58k|	do                                          \
  |  |  859|  1.58k|	{                                           \
  |  |  860|  1.58k|		WINPR_ASSERT((v) <= UINT8_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  861|  1.58k|		WINPR_ASSERT((v) >= 0);                 \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  862|  1.58k|		Stream_Write_UINT8_unchecked((s), (v)); \
  |  |  863|  1.58k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (863:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  130|  1.58k|	Stream_Write_UINT16(s, versionInfo->ProductBuild);       /* ProductBuild (2 bytes) */
  ------------------
  |  |  909|  1.58k|	do                                           \
  |  |  910|  1.58k|	{                                            \
  |  |  911|  1.58k|		WINPR_ASSERT((v) <= UINT16_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  912|  1.58k|		WINPR_ASSERT((v) >= 0);                  \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  913|  1.58k|		Stream_Write_UINT16_unchecked((s), (v)); \
  |  |  914|  1.58k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (914:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  131|  1.58k|	Stream_Write(s, versionInfo->Reserved, sizeof(versionInfo->Reserved)); /* Reserved (3 bytes) */
  132|  1.58k|	Stream_Write_UINT8(s, versionInfo->NTLMRevisionCurrent); /* NTLMRevisionCurrent (1 byte) */
  ------------------
  |  |  858|  1.58k|	do                                          \
  |  |  859|  1.58k|	{                                           \
  |  |  860|  1.58k|		WINPR_ASSERT((v) <= UINT8_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  861|  1.58k|		WINPR_ASSERT((v) >= 0);                 \
  |  |  ------------------
  |  |  |  |   76|  1.58k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.58k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.58k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.58k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.58k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.58k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.58k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.58k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.58k|                                                                                                   \
  |  |  |  |  |  |   70|  1.58k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.58k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.58k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.58k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.58k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.58k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.58k|                                                                                                   \
  |  |  |  |  |  |   72|  1.58k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.58k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.58k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.58k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  862|  1.58k|		Stream_Write_UINT8_unchecked((s), (v)); \
  |  |  863|  1.58k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (863:11): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
  133|  1.58k|	return TRUE;
  ------------------
  |  |  117|  1.58k|#define TRUE true
  ------------------
  134|  1.58k|}
ntlm_read_ntlm_v2_response:
  221|    203|{
  222|    203|	WINPR_ASSERT(s);
  ------------------
  |  |   76|    203|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    203|	do                                                                                             \
  |  |  |  |   61|    203|	{                                                                                              \
  |  |  |  |   62|    203|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    203|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    203|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    203|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    203|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    203|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    203|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    203|                                                                                                   \
  |  |  |  |   70|    203|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    203|	do                                                      \
  |  |  |  |  |  |   32|    203|	{                                                       \
  |  |  |  |  |  |   33|    203|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 203]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    203|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    203|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 203]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    203|                                                                                                   \
  |  |  |  |   72|    203|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    203|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    203|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    203|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 203]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|    203|	WINPR_ASSERT(response);
  ------------------
  |  |   76|    203|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    203|	do                                                                                             \
  |  |  |  |   61|    203|	{                                                                                              \
  |  |  |  |   62|    203|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    203|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    203|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    203|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    203|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    203|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    203|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    203|                                                                                                   \
  |  |  |  |   70|    203|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    203|	do                                                      \
  |  |  |  |  |  |   32|    203|	{                                                       \
  |  |  |  |  |  |   33|    203|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 203]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    203|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    203|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 203]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    203|                                                                                                   \
  |  |  |  |   72|    203|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    203|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    203|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    203|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 203]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|       |
  225|    203|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 16))
  ------------------
  |  |  128|    203|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|    203|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|    203|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|    203|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (225:6): [True: 3, False: 200]
  ------------------
  226|      3|		return FALSE;
  ------------------
  |  |  113|      3|#define FALSE false
  ------------------
  227|       |
  228|    200|	Stream_Read(s, response->Response, 16);
  229|    200|	return ntlm_read_ntlm_v2_client_challenge(s, &(response->Challenge));
  230|    203|}
ntlm_generate_timestamp:
  267|    596|{
  268|    596|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    596|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    596|	do                                                                                             \
  |  |  |  |   61|    596|	{                                                                                              \
  |  |  |  |   62|    596|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    596|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    596|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    596|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    596|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    596|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    596|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    596|                                                                                                   \
  |  |  |  |   70|    596|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    596|	do                                                      \
  |  |  |  |  |  |   32|    596|	{                                                       \
  |  |  |  |  |  |   33|    596|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 596]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    596|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    596|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 596]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    596|                                                                                                   \
  |  |  |  |   72|    596|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    596|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    596|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    596|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 596]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  269|       |
  270|    596|	if (memcmp(context->ChallengeTimestamp, NTLM_NULL_BUFFER, 8) != 0)
  ------------------
  |  Branch (270:6): [True: 7, False: 589]
  ------------------
  271|      7|		CopyMemory(context->Timestamp, context->ChallengeTimestamp, 8);
  ------------------
  |  |  123|      7|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  272|    589|	else
  273|    589|		ntlm_current_time(context->Timestamp, sizeof(context->Timestamp));
  274|    596|}
ntlm_compute_lm_v2_response:
  500|    310|{
  501|    310|	BYTE* response = nullptr;
  502|    310|	BYTE value[WINPR_MD5_DIGEST_LENGTH] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    310|	{                      \
  |  |   85|    310|	} /** @since version 3.24.0 */
  ------------------
  503|       |
  504|    310|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    310|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    310|	do                                                                                             \
  |  |  |  |   61|    310|	{                                                                                              \
  |  |  |  |   62|    310|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    310|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    310|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    310|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    310|                                                                                                   \
  |  |  |  |   70|    310|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    310|	do                                                      \
  |  |  |  |  |  |   32|    310|	{                                                       \
  |  |  |  |  |  |   33|    310|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    310|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    310|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    310|                                                                                                   \
  |  |  |  |   72|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    310|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    310|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    310|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  505|       |
  506|    310|	if (context->LmCompatibilityLevel < 2)
  ------------------
  |  Branch (506:6): [True: 0, False: 310]
  ------------------
  507|      0|	{
  508|      0|		if (!sspi_SecBufferAlloc(&context->LmChallengeResponse, 24))
  ------------------
  |  Branch (508:7): [True: 0, False: 0]
  ------------------
  509|      0|			return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  510|       |
  511|      0|		ZeroMemory(context->LmChallengeResponse.pvBuffer, 24);
  ------------------
  |  |  126|      0|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  512|      0|		return SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  513|      0|	}
  514|       |
  515|       |	/* Compute the NTLMv2 hash */
  516|       |
  517|    310|	if (!ntlm_compute_ntlm_v2_hash(context, context->NtlmV2Hash))
  ------------------
  |  Branch (517:6): [True: 0, False: 310]
  ------------------
  518|      0|		return SEC_E_NO_CREDENTIALS;
  ------------------
  |  |  148|      0|#define SEC_E_NO_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030E)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  519|       |
  520|       |	/* Concatenate the server and client challenges */
  521|    310|	CopyMemory(value, context->ServerChallenge, 8);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  522|    310|	CopyMemory(&value[8], context->ClientChallenge, 8);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  523|       |
  524|    310|	if (!sspi_SecBufferAlloc(&context->LmChallengeResponse, 24))
  ------------------
  |  Branch (524:6): [True: 0, False: 310]
  ------------------
  525|      0|		return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  526|       |
  527|    310|	response = (BYTE*)context->LmChallengeResponse.pvBuffer;
  528|       |	/* Compute the HMAC-MD5 hash of the resulting value using the NTLMv2 hash as the key */
  529|    310|	if (!winpr_HMAC(WINPR_MD_MD5, (void*)context->NtlmV2Hash, WINPR_MD5_DIGEST_LENGTH, (BYTE*)value,
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  |  Branch (529:6): [True: 0, False: 310]
  ------------------
  530|    310|	                WINPR_MD5_DIGEST_LENGTH, response, WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
              	                WINPR_MD5_DIGEST_LENGTH, response, WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  531|      0|		return SEC_E_ALGORITHM_MISMATCH;
  ------------------
  |  |  165|      0|#define SEC_E_ALGORITHM_MISMATCH WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090331)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  532|       |
  533|       |	/* Concatenate the resulting HMAC-MD5 hash and the client challenge, giving us the LMv2 response
  534|       |	 * (24 bytes) */
  535|    310|	CopyMemory(&response[16], context->ClientChallenge, 8);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  536|    310|	return SEC_E_OK;
  ------------------
  |  |  133|    310|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    310|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  537|    310|}
ntlm_compute_ntlm_v2_response:
  550|    310|{
  551|    310|	SecBuffer ntlm_v2_temp = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    310|	{                      \
  |  |   85|    310|	} /** @since version 3.24.0 */
  ------------------
  552|    310|	SecBuffer ntlm_v2_temp_chal = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    310|	{                      \
  |  |   85|    310|	} /** @since version 3.24.0 */
  ------------------
  553|       |
  554|    310|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    310|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    310|	do                                                                                             \
  |  |  |  |   61|    310|	{                                                                                              \
  |  |  |  |   62|    310|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    310|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    310|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    310|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    310|                                                                                                   \
  |  |  |  |   70|    310|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    310|	do                                                      \
  |  |  |  |  |  |   32|    310|	{                                                       \
  |  |  |  |  |  |   33|    310|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    310|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    310|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    310|                                                                                                   \
  |  |  |  |   72|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    310|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    310|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    310|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  555|       |
  556|    310|	PSecBuffer TargetInfo = &context->ChallengeTargetInfo;
  557|    310|	SECURITY_STATUS ret = SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|    310|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|    310|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  558|       |
  559|    310|	if (!sspi_SecBufferAlloc(&ntlm_v2_temp, TargetInfo->cbBuffer + 28))
  ------------------
  |  Branch (559:6): [True: 0, False: 310]
  ------------------
  560|      0|		goto exit;
  561|       |
  562|    310|	ZeroMemory(ntlm_v2_temp.pvBuffer, ntlm_v2_temp.cbBuffer);
  ------------------
  |  |  126|    310|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  563|    310|	{
  564|    310|		BYTE* blob = (BYTE*)ntlm_v2_temp.pvBuffer;
  565|       |
  566|       |		/* Compute the NTLMv2 hash */
  567|    310|		ret = SEC_E_NO_CREDENTIALS;
  ------------------
  |  |  148|    310|#define SEC_E_NO_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030E)
  |  |  ------------------
  |  |  |  |   33|    310|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  568|    310|		if (!ntlm_compute_ntlm_v2_hash(context, (BYTE*)context->NtlmV2Hash))
  ------------------
  |  Branch (568:7): [True: 0, False: 310]
  ------------------
  569|      0|			goto exit;
  570|       |
  571|       |		/* Construct temp */
  572|    310|		blob[0] = 1; /* RespType (1 byte) */
  573|    310|		blob[1] = 1; /* HighRespType (1 byte) */
  574|       |		/* Reserved1 (2 bytes) */
  575|       |		/* Reserved2 (4 bytes) */
  576|    310|		CopyMemory(&blob[8], context->Timestamp, 8);        /* Timestamp (8 bytes) */
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  577|    310|		CopyMemory(&blob[16], context->ClientChallenge, 8); /* ClientChallenge (8 bytes) */
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  578|       |		/* Reserved3 (4 bytes) */
  579|    310|		CopyMemory(&blob[28], TargetInfo->pvBuffer, TargetInfo->cbBuffer);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  580|       |#ifdef WITH_DEBUG_NTLM
  581|       |		WLog_VRB(TAG, "NTLMv2 Response Temp Blob");
  582|       |		winpr_HexDump(TAG, WLOG_TRACE, ntlm_v2_temp.pvBuffer, ntlm_v2_temp.cbBuffer);
  583|       |#endif
  584|    310|	}
  585|       |	/* Concatenate server challenge with temp */
  586|    310|	ret = SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|    310|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|    310|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  587|    310|	if (!sspi_SecBufferAlloc(&ntlm_v2_temp_chal, ntlm_v2_temp.cbBuffer + 8))
  ------------------
  |  Branch (587:6): [True: 0, False: 310]
  ------------------
  588|      0|		goto exit;
  589|       |
  590|    310|	{
  591|    310|		BYTE* blob = (BYTE*)ntlm_v2_temp_chal.pvBuffer;
  592|    310|		CopyMemory(blob, context->ServerChallenge, 8);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  593|    310|		CopyMemory(&blob[8], ntlm_v2_temp.pvBuffer, ntlm_v2_temp.cbBuffer);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  594|    310|		if (!winpr_HMAC(WINPR_MD_MD5, (BYTE*)context->NtlmV2Hash, WINPR_MD5_DIGEST_LENGTH,
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  |  Branch (594:7): [True: 0, False: 310]
  ------------------
  595|    310|		                (BYTE*)ntlm_v2_temp_chal.pvBuffer, ntlm_v2_temp_chal.cbBuffer,
  596|    310|		                context->NtProofString, WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  597|      0|			goto exit;
  598|    310|	}
  599|       |
  600|       |	/* NtChallengeResponse, Concatenate NTProofStr with temp */
  601|       |
  602|    310|	if (!sspi_SecBufferAlloc(&context->NtChallengeResponse, ntlm_v2_temp.cbBuffer + 16))
  ------------------
  |  Branch (602:6): [True: 0, False: 310]
  ------------------
  603|      0|		goto exit;
  604|       |
  605|    310|	{
  606|    310|		BYTE* blob = (BYTE*)context->NtChallengeResponse.pvBuffer;
  607|    310|		CopyMemory(blob, context->NtProofString, WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  608|    310|		CopyMemory(&blob[16], ntlm_v2_temp.pvBuffer, ntlm_v2_temp.cbBuffer);
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  609|    310|	}
  610|       |	/* Compute SessionBaseKey, the HMAC-MD5 hash of NTProofStr using the NTLMv2 hash as the key */
  611|    310|	if (!winpr_HMAC(WINPR_MD_MD5, (BYTE*)context->NtlmV2Hash, WINPR_MD5_DIGEST_LENGTH,
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  |  Branch (611:6): [True: 0, False: 310]
  ------------------
  612|    310|	                context->NtProofString, WINPR_MD5_DIGEST_LENGTH, context->SessionBaseKey,
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  613|    310|	                WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|    310|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  614|      0|		goto exit;
  615|    310|	ret = SEC_E_OK;
  ------------------
  |  |  133|    310|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    310|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  616|    310|exit:
  617|    310|	sspi_SecBufferFree(&ntlm_v2_temp);
  618|    310|	sspi_SecBufferFree(&ntlm_v2_temp_chal);
  619|    310|	return ret;
  620|    310|}
ntlm_rc4k:
  631|     71|{
  632|     71|	WINPR_RC4_CTX* rc4 = winpr_RC4_New(key, 16);
  633|       |
  634|     71|	if (!rc4)
  ------------------
  |  Branch (634:6): [True: 0, False: 71]
  ------------------
  635|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  636|       |
  637|     71|	const BOOL rc = winpr_RC4_Update(rc4, length, plaintext, ciphertext);
  638|     71|	winpr_RC4_Free(rc4);
  639|     71|	return rc;
  640|     71|}
ntlm_generate_client_challenge:
  648|    520|{
  649|    520|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    520|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    520|	do                                                                                             \
  |  |  |  |   61|    520|	{                                                                                              \
  |  |  |  |   62|    520|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    520|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    520|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    520|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    520|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    520|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    520|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    520|                                                                                                   \
  |  |  |  |   70|    520|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    520|	do                                                      \
  |  |  |  |  |  |   32|    520|	{                                                       \
  |  |  |  |  |  |   33|    520|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 520]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    520|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    520|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 520]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    520|                                                                                                   \
  |  |  |  |   72|    520|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    520|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    520|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    520|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 520]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  650|       |
  651|       |	/* ClientChallenge is used in computation of LMv2 and NTLMv2 responses */
  652|    520|	if (memcmp(context->ClientChallenge, NTLM_NULL_BUFFER, sizeof(context->ClientChallenge)) != 0)
  ------------------
  |  Branch (652:6): [True: 0, False: 520]
  ------------------
  653|      0|		return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  654|       |
  655|    520|	return winpr_RAND(context->ClientChallenge, sizeof(context->ClientChallenge)) >= 0;
  656|    520|}
ntlm_generate_server_challenge:
  664|    529|{
  665|    529|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  666|       |
  667|    529|	if (memcmp(context->ServerChallenge, NTLM_NULL_BUFFER, sizeof(context->ServerChallenge)) != 0)
  ------------------
  |  Branch (667:6): [True: 0, False: 529]
  ------------------
  668|      0|		return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  669|       |
  670|    529|	return winpr_RAND(context->ServerChallenge, sizeof(context->ServerChallenge)) >= 0;
  671|    529|}
ntlm_generate_key_exchange_key:
  679|    310|{
  680|    310|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    310|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    310|	do                                                                                             \
  |  |  |  |   61|    310|	{                                                                                              \
  |  |  |  |   62|    310|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    310|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    310|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    310|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    310|                                                                                                   \
  |  |  |  |   70|    310|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    310|	do                                                      \
  |  |  |  |  |  |   32|    310|	{                                                       \
  |  |  |  |  |  |   33|    310|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    310|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    310|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    310|                                                                                                   \
  |  |  |  |   72|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    310|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    310|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    310|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  681|    310|	WINPR_ASSERT(sizeof(context->KeyExchangeKey) == sizeof(context->SessionBaseKey));
  ------------------
  |  |   76|    310|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    310|	do                                                                                             \
  |  |  |  |   61|    310|	{                                                                                              \
  |  |  |  |   62|    310|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    310|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    310|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    310|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    310|                                                                                                   \
  |  |  |  |   70|    310|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    310|	do                                                      \
  |  |  |  |  |  |   32|    310|	{                                                       \
  |  |  |  |  |  |   33|    310|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    310|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    310|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    310|                                                                                                   \
  |  |  |  |   72|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    310|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    310|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    310|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  682|       |
  683|       |	/* In NTLMv2, KeyExchangeKey is the 128-bit SessionBaseKey */
  684|    310|	CopyMemory(context->KeyExchangeKey, context->SessionBaseKey, sizeof(context->KeyExchangeKey));
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  685|    310|	return TRUE;
  ------------------
  |  |  117|    310|#define TRUE true
  ------------------
  686|    310|}
ntlm_generate_random_session_key:
  694|     67|{
  695|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|     67|	return winpr_RAND(context->RandomSessionKey, sizeof(context->RandomSessionKey)) >= 0;
  697|     67|}
ntlm_generate_exported_session_key:
  705|    310|{
  706|    310|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    310|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    310|	do                                                                                             \
  |  |  |  |   61|    310|	{                                                                                              \
  |  |  |  |   62|    310|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    310|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    310|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    310|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    310|                                                                                                   \
  |  |  |  |   70|    310|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    310|	do                                                      \
  |  |  |  |  |  |   32|    310|	{                                                       \
  |  |  |  |  |  |   33|    310|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    310|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    310|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    310|                                                                                                   \
  |  |  |  |   72|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    310|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    310|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    310|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  707|    310|	WINPR_ASSERT(sizeof(context->ExportedSessionKey) >= sizeof(context->RandomSessionKey));
  ------------------
  |  |   76|    310|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    310|	do                                                                                             \
  |  |  |  |   61|    310|	{                                                                                              \
  |  |  |  |   62|    310|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    310|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    310|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    310|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    310|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    310|                                                                                                   \
  |  |  |  |   70|    310|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    310|	do                                                      \
  |  |  |  |  |  |   32|    310|	{                                                       \
  |  |  |  |  |  |   33|    310|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    310|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    310|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 310]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    310|                                                                                                   \
  |  |  |  |   72|    310|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    310|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    310|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    310|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  708|       |
  709|    310|	CopyMemory(context->ExportedSessionKey, context->RandomSessionKey,
  ------------------
  |  |  123|    310|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  710|    310|	           sizeof(context->ExportedSessionKey));
  711|    310|	return TRUE;
  ------------------
  |  |  117|    310|#define TRUE true
  ------------------
  712|    310|}
ntlm_encrypt_random_session_key:
  720|     67|{
  721|       |	/* In NTLMv2, EncryptedRandomSessionKey is the ExportedSessionKey RC4-encrypted with the
  722|       |	 * KeyExchangeKey */
  723|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  724|     67|	return ntlm_rc4k(context->KeyExchangeKey, 16, context->RandomSessionKey,
  725|     67|	                 context->EncryptedRandomSessionKey);
  726|     67|}
ntlm_decrypt_random_session_key:
  734|    243|{
  735|    243|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    243|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    243|	do                                                                                             \
  |  |  |  |   61|    243|	{                                                                                              \
  |  |  |  |   62|    243|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    243|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    243|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    243|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    243|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    243|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    243|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    243|                                                                                                   \
  |  |  |  |   70|    243|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    243|	do                                                      \
  |  |  |  |  |  |   32|    243|	{                                                       \
  |  |  |  |  |  |   33|    243|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 243]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    243|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    243|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 243]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    243|                                                                                                   \
  |  |  |  |   72|    243|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    243|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    243|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    243|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  736|       |
  737|       |	/* In NTLMv2, EncryptedRandomSessionKey is the ExportedSessionKey RC4-encrypted with the
  738|       |	 * KeyExchangeKey */
  739|       |
  740|       |	/**
  741|       |	 * 	if (NegotiateFlags & NTLMSSP_NEGOTIATE_KEY_EXCH)
  742|       |	 * 		Set RandomSessionKey to RC4K(KeyExchangeKey,
  743|       |	 * AUTHENTICATE_MESSAGE.EncryptedRandomSessionKey) else Set RandomSessionKey to KeyExchangeKey
  744|       |	 */
  745|    243|	if (context->NegotiateKeyExchange)
  ------------------
  |  Branch (745:6): [True: 4, False: 239]
  ------------------
  746|      4|	{
  747|      4|		WINPR_ASSERT(sizeof(context->EncryptedRandomSessionKey) ==
  ------------------
  |  |   76|      4|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      4|	do                                                                                             \
  |  |  |  |   61|      4|	{                                                                                              \
  |  |  |  |   62|      4|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      4|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      4|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      4|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      4|                                                                                                   \
  |  |  |  |   70|      4|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      4|	do                                                      \
  |  |  |  |  |  |   32|      4|	{                                                       \
  |  |  |  |  |  |   33|      4|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [Folded, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      4|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      4|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      4|                                                                                                   \
  |  |  |  |   72|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      4|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      4|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      4|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  748|      4|		             sizeof(context->RandomSessionKey));
  749|      4|		return ntlm_rc4k(context->KeyExchangeKey, sizeof(context->EncryptedRandomSessionKey),
  750|      4|		                 context->EncryptedRandomSessionKey, context->RandomSessionKey);
  751|      4|	}
  752|    239|	else
  753|    239|	{
  754|    239|		WINPR_ASSERT(sizeof(context->RandomSessionKey) == sizeof(context->KeyExchangeKey));
  ------------------
  |  |   76|    239|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    239|	do                                                                                             \
  |  |  |  |   61|    239|	{                                                                                              \
  |  |  |  |   62|    239|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    239|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    239|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    239|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    239|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    239|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    239|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    239|                                                                                                   \
  |  |  |  |   70|    239|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    239|	do                                                      \
  |  |  |  |  |  |   32|    239|	{                                                       \
  |  |  |  |  |  |   33|    239|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [Folded, False: 239]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    239|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    239|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 239]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    239|                                                                                                   \
  |  |  |  |   72|    239|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    239|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    239|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    239|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 239]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  755|    239|		CopyMemory(context->RandomSessionKey, context->KeyExchangeKey,
  ------------------
  |  |  123|    239|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  756|    239|		           sizeof(context->RandomSessionKey));
  757|    239|	}
  758|    239|	return TRUE;
  ------------------
  |  |  117|    239|#define TRUE true
  ------------------
  759|    243|}
ntlm_generate_client_signing_key:
  805|     67|{
  806|     67|	const SecBuffer signMagic = { sizeof(NTLM_CLIENT_SIGN_MAGIC), 0, NTLM_CLIENT_SIGN_MAGIC };
  807|       |
  808|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     67|	return ntlm_generate_signing_key(context->ExportedSessionKey, &signMagic,
  810|     67|	                                 context->ClientSigningKey);
  811|     67|}
ntlm_generate_server_signing_key:
  821|     67|{
  822|     67|	const SecBuffer signMagic = { sizeof(NTLM_SERVER_SIGN_MAGIC), 0, NTLM_SERVER_SIGN_MAGIC };
  823|       |
  824|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  825|     67|	return ntlm_generate_signing_key(context->ExportedSessionKey, &signMagic,
  826|     67|	                                 context->ServerSigningKey);
  827|     67|}
ntlm_generate_client_sealing_key:
  837|     67|{
  838|     67|	const SecBuffer sealMagic = { sizeof(NTLM_CLIENT_SEAL_MAGIC), 0, NTLM_CLIENT_SEAL_MAGIC };
  839|       |
  840|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  841|     67|	return ntlm_generate_signing_key(context->ExportedSessionKey, &sealMagic,
  842|     67|	                                 context->ClientSealingKey);
  843|     67|}
ntlm_generate_server_sealing_key:
  853|     67|{
  854|     67|	const SecBuffer sealMagic = { sizeof(NTLM_SERVER_SEAL_MAGIC), 0, NTLM_SERVER_SEAL_MAGIC };
  855|       |
  856|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|     67|	return ntlm_generate_signing_key(context->ExportedSessionKey, &sealMagic,
  858|     67|	                                 context->ServerSealingKey);
  859|     67|}
ntlm_init_rc4_seal_states:
  867|     67|{
  868|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  869|     67|	if (context->server)
  ------------------
  |  Branch (869:6): [True: 0, False: 67]
  ------------------
  870|      0|	{
  871|      0|		context->SendSigningKey = context->ServerSigningKey;
  872|      0|		context->RecvSigningKey = context->ClientSigningKey;
  873|      0|		context->SendSealingKey = context->ClientSealingKey;
  874|      0|		context->RecvSealingKey = context->ServerSealingKey;
  875|      0|		context->SendRc4Seal =
  876|      0|		    winpr_RC4_New(context->ServerSealingKey, sizeof(context->ServerSealingKey));
  877|      0|		context->RecvRc4Seal =
  878|      0|		    winpr_RC4_New(context->ClientSealingKey, sizeof(context->ClientSealingKey));
  879|      0|	}
  880|     67|	else
  881|     67|	{
  882|     67|		context->SendSigningKey = context->ClientSigningKey;
  883|     67|		context->RecvSigningKey = context->ServerSigningKey;
  884|     67|		context->SendSealingKey = context->ServerSealingKey;
  885|     67|		context->RecvSealingKey = context->ClientSealingKey;
  886|     67|		context->SendRc4Seal =
  887|     67|		    winpr_RC4_New(context->ClientSealingKey, sizeof(context->ClientSealingKey));
  888|     67|		context->RecvRc4Seal =
  889|     67|		    winpr_RC4_New(context->ServerSealingKey, sizeof(context->ServerSealingKey));
  890|     67|	}
  891|     67|	if (!context->SendRc4Seal)
  ------------------
  |  Branch (891:6): [True: 0, False: 67]
  ------------------
  892|      0|	{
  893|      0|		WLog_ERR(TAG, "Failed to allocate context->SendRc4Seal");
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  894|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  895|      0|	}
  896|     67|	if (!context->RecvRc4Seal)
  ------------------
  |  Branch (896:6): [True: 0, False: 67]
  ------------------
  897|      0|	{
  898|      0|		WLog_ERR(TAG, "Failed to allocate context->RecvRc4Seal");
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  899|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  900|      0|	}
  901|     67|	return TRUE;
  ------------------
  |  |  117|     67|#define TRUE true
  ------------------
  902|     67|}
ntlm_compute_message_integrity_check:
  905|    146|{
  906|    146|	BOOL rc = FALSE;
  ------------------
  |  |  113|    146|#define FALSE false
  ------------------
  907|       |	/*
  908|       |	 * Compute the HMAC-MD5 hash of ConcatenationOf(NEGOTIATE_MESSAGE,
  909|       |	 * CHALLENGE_MESSAGE, AUTHENTICATE_MESSAGE) using the ExportedSessionKey
  910|       |	 */
  911|    146|	WINPR_HMAC_CTX* hmac = winpr_HMAC_New();
  912|       |
  913|    146|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    146|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    146|	do                                                                                             \
  |  |  |  |   61|    146|	{                                                                                              \
  |  |  |  |   62|    146|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    146|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    146|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    146|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    146|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    146|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    146|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    146|                                                                                                   \
  |  |  |  |   70|    146|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    146|	do                                                      \
  |  |  |  |  |  |   32|    146|	{                                                       \
  |  |  |  |  |  |   33|    146|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    146|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    146|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    146|                                                                                                   \
  |  |  |  |   72|    146|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    146|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    146|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    146|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 146]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  914|    146|	WINPR_ASSERT(mic);
  ------------------
  |  |   76|    146|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    146|	do                                                                                             \
  |  |  |  |   61|    146|	{                                                                                              \
  |  |  |  |   62|    146|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    146|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    146|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    146|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    146|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    146|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    146|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    146|                                                                                                   \
  |  |  |  |   70|    146|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    146|	do                                                      \
  |  |  |  |  |  |   32|    146|	{                                                       \
  |  |  |  |  |  |   33|    146|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    146|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    146|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    146|                                                                                                   \
  |  |  |  |   72|    146|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    146|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    146|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    146|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 146]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  915|    146|	WINPR_ASSERT(size >= WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |   76|    146|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    146|	do                                                                                             \
  |  |  |  |   61|    146|	{                                                                                              \
  |  |  |  |   62|    146|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    146|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    146|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    146|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    146|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    146|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    146|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    146|                                                                                                   \
  |  |  |  |   70|    146|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    146|	do                                                      \
  |  |  |  |  |  |   32|    146|	{                                                       \
  |  |  |  |  |  |   33|    146|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    146|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    146|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    146|                                                                                                   \
  |  |  |  |   72|    146|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    146|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    146|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    146|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 146]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  916|       |
  917|    146|	memset(mic, 0, size);
  918|    146|	if (!hmac)
  ------------------
  |  Branch (918:6): [True: 0, False: 146]
  ------------------
  919|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  920|       |
  921|    146|	if (!winpr_HMAC_Init(hmac, WINPR_MD_MD5, context->ExportedSessionKey, WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|    146|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  |  Branch (921:6): [True: 0, False: 146]
  ------------------
  922|      0|		goto fail;
  923|       |
  924|    146|	if (!winpr_HMAC_Update(hmac, (BYTE*)context->NegotiateMessage.pvBuffer,
  ------------------
  |  Branch (924:6): [True: 0, False: 146]
  ------------------
  925|    146|	                       context->NegotiateMessage.cbBuffer))
  926|      0|		goto fail;
  927|    146|	if (!winpr_HMAC_Update(hmac, (BYTE*)context->ChallengeMessage.pvBuffer,
  ------------------
  |  Branch (927:6): [True: 0, False: 146]
  ------------------
  928|    146|	                       context->ChallengeMessage.cbBuffer))
  929|      0|		goto fail;
  930|       |
  931|    146|	if (context->MessageIntegrityCheckOffset > 0)
  ------------------
  |  Branch (931:6): [True: 146, False: 0]
  ------------------
  932|    146|	{
  933|    146|		const BYTE* auth = (BYTE*)context->AuthenticateMessage.pvBuffer;
  934|    146|		const BYTE data[WINPR_MD5_DIGEST_LENGTH] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    146|	{                      \
  |  |   85|    146|	} /** @since version 3.24.0 */
  ------------------
  935|    146|		const size_t rest = context->MessageIntegrityCheckOffset + sizeof(data);
  936|       |
  937|    146|		if (rest > context->AuthenticateMessage.cbBuffer)
  ------------------
  |  Branch (937:7): [True: 12, False: 134]
  ------------------
  938|     12|			goto fail;
  939|    134|		if (!winpr_HMAC_Update(hmac, &auth[0], context->MessageIntegrityCheckOffset))
  ------------------
  |  Branch (939:7): [True: 0, False: 134]
  ------------------
  940|      0|			goto fail;
  941|    134|		if (!winpr_HMAC_Update(hmac, data, sizeof(data)))
  ------------------
  |  Branch (941:7): [True: 0, False: 134]
  ------------------
  942|      0|			goto fail;
  943|    134|		if (!winpr_HMAC_Update(hmac, &auth[rest], context->AuthenticateMessage.cbBuffer - rest))
  ------------------
  |  Branch (943:7): [True: 0, False: 134]
  ------------------
  944|      0|			goto fail;
  945|    134|	}
  946|      0|	else
  947|      0|	{
  948|      0|		if (!winpr_HMAC_Update(hmac, (BYTE*)context->AuthenticateMessage.pvBuffer,
  ------------------
  |  Branch (948:7): [True: 0, False: 0]
  ------------------
  949|      0|		                       context->AuthenticateMessage.cbBuffer))
  950|      0|			goto fail;
  951|      0|	}
  952|    134|	rc = winpr_HMAC_Final(hmac, mic, WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |   33|    134|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  953|       |
  954|    146|fail:
  955|    146|	winpr_HMAC_Free(hmac);
  956|    146|	return rc;
  957|    134|}
ntlm_compute.c:ntlm_read_ntlm_v2_client_challenge:
  156|    200|{
  157|    200|	size_t size = 0;
  158|    200|	WINPR_ASSERT(s);
  ------------------
  |  |   76|    200|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    200|	do                                                                                             \
  |  |  |  |   61|    200|	{                                                                                              \
  |  |  |  |   62|    200|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    200|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    200|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    200|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    200|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    200|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    200|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    200|                                                                                                   \
  |  |  |  |   70|    200|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    200|	do                                                      \
  |  |  |  |  |  |   32|    200|	{                                                       \
  |  |  |  |  |  |   33|    200|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 200]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    200|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    200|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 200]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    200|                                                                                                   \
  |  |  |  |   72|    200|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    200|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    200|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    200|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|    200|	WINPR_ASSERT(challenge);
  ------------------
  |  |   76|    200|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    200|	do                                                                                             \
  |  |  |  |   61|    200|	{                                                                                              \
  |  |  |  |   62|    200|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    200|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    200|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    200|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    200|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    200|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    200|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    200|                                                                                                   \
  |  |  |  |   70|    200|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    200|	do                                                      \
  |  |  |  |  |  |   32|    200|	{                                                       \
  |  |  |  |  |  |   33|    200|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 200]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    200|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    200|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 200]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    200|                                                                                                   \
  |  |  |  |   72|    200|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    200|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    200|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    200|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|       |
  161|    200|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 28))
  ------------------
  |  |  128|    200|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|    200|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|    200|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|    200|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (161:6): [True: 3, False: 197]
  ------------------
  162|      3|		return FALSE;
  ------------------
  |  |  113|      3|#define FALSE false
  ------------------
  163|       |
  164|    197|	Stream_Read_UINT8(s, challenge->RespType);
  ------------------
  |  |  648|    197|	do                                 \
  |  |  649|    197|	{                                  \
  |  |  650|    197|		_v = stream_read_u8(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    197|#define TRUE true
  |  |  ------------------
  |  |  651|    197|	} while (0)
  |  |  ------------------
  |  |  |  Branch (651:11): [Folded, False: 197]
  |  |  ------------------
  ------------------
  165|    197|	Stream_Read_UINT8(s, challenge->HiRespType);
  ------------------
  |  |  648|    197|	do                                 \
  |  |  649|    197|	{                                  \
  |  |  650|    197|		_v = stream_read_u8(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    197|#define TRUE true
  |  |  ------------------
  |  |  651|    197|	} while (0)
  |  |  ------------------
  |  |  |  Branch (651:11): [Folded, False: 197]
  |  |  ------------------
  ------------------
  166|    197|	Stream_Read_UINT16(s, challenge->Reserved1);
  ------------------
  |  |  660|    197|	do                                     \
  |  |  661|    197|	{                                      \
  |  |  662|    197|		_v = stream_read_u16_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    197|#define TRUE true
  |  |  ------------------
  |  |  663|    197|	} while (0)
  |  |  ------------------
  |  |  |  Branch (663:11): [Folded, False: 197]
  |  |  ------------------
  ------------------
  167|    197|	Stream_Read_UINT32(s, challenge->Reserved2);
  ------------------
  |  |  684|    197|	do                                     \
  |  |  685|    197|	{                                      \
  |  |  686|    197|		_v = stream_read_u32_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    197|#define TRUE true
  |  |  ------------------
  |  |  687|    197|	} while (0)
  |  |  ------------------
  |  |  |  Branch (687:11): [Folded, False: 197]
  |  |  ------------------
  ------------------
  168|    197|	Stream_Read(s, challenge->Timestamp, 8);
  169|    197|	Stream_Read(s, challenge->ClientChallenge, 8);
  170|    197|	Stream_Read_UINT32(s, challenge->Reserved3);
  ------------------
  |  |  684|    197|	do                                     \
  |  |  685|    197|	{                                      \
  |  |  686|    197|		_v = stream_read_u32_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|    197|#define TRUE true
  |  |  ------------------
  |  |  687|    197|	} while (0)
  |  |  ------------------
  |  |  |  Branch (687:11): [Folded, False: 197]
  |  |  ------------------
  ------------------
  171|    197|	size = Stream_Length(s) - Stream_GetPosition(s);
  172|       |
  173|    197|	if (size > UINT32_MAX)
  ------------------
  |  Branch (173:6): [True: 0, False: 197]
  ------------------
  174|      0|	{
  175|      0|		WLog_ERR(TAG, "NTLMv2_CLIENT_CHALLENGE::cbAvPairs too large, got %" PRIuz "bytes", size);
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  176|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  177|      0|	}
  178|       |
  179|    197|	challenge->cbAvPairs = (UINT32)size;
  180|    197|	challenge->AvPairs = (NTLM_AV_PAIR*)malloc(challenge->cbAvPairs);
  181|       |
  182|    197|	if (!challenge->AvPairs)
  ------------------
  |  Branch (182:6): [True: 0, False: 197]
  ------------------
  183|      0|	{
  184|      0|		WLog_ERR(TAG, "NTLMv2_CLIENT_CHALLENGE::AvPairs failed to allocate %" PRIu32 "bytes",
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  185|      0|		         challenge->cbAvPairs);
  186|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  187|      0|	}
  188|       |
  189|    197|	Stream_Read(s, challenge->AvPairs, size);
  190|    197|	return TRUE;
  ------------------
  |  |  117|    197|#define TRUE true
  ------------------
  191|    197|}
ntlm_compute.c:ntlm_current_time:
  250|    589|{
  251|    589|	FILETIME ft = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    589|	{                      \
  |  |   85|    589|	} /** @since version 3.24.0 */
  ------------------
  252|       |
  253|    589|	WINPR_ASSERT(timestamp);
  ------------------
  |  |   76|    589|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    589|	do                                                                                             \
  |  |  |  |   61|    589|	{                                                                                              \
  |  |  |  |   62|    589|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    589|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    589|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    589|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    589|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    589|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    589|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    589|                                                                                                   \
  |  |  |  |   70|    589|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    589|	do                                                      \
  |  |  |  |  |  |   32|    589|	{                                                       \
  |  |  |  |  |  |   33|    589|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 589]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    589|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    589|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 589]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    589|                                                                                                   \
  |  |  |  |   72|    589|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    589|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    589|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    589|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 589]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|    589|	WINPR_ASSERT(size >= sizeof(ft));
  ------------------
  |  |   76|    589|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    589|	do                                                                                             \
  |  |  |  |   61|    589|	{                                                                                              \
  |  |  |  |   62|    589|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    589|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    589|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    589|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    589|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    589|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    589|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    589|                                                                                                   \
  |  |  |  |   70|    589|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    589|	do                                                      \
  |  |  |  |  |  |   32|    589|	{                                                       \
  |  |  |  |  |  |   33|    589|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 589]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    589|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    589|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 589]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    589|                                                                                                   \
  |  |  |  |   72|    589|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    589|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    589|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    589|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 589]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|       |
  256|    589|	GetSystemTimeAsFileTime(&ft);
  257|    589|	CopyMemory(timestamp, &(ft), sizeof(ft));
  ------------------
  |  |  123|    589|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  258|    589|}
ntlm_compute.c:ntlm_compute_ntlm_v2_hash:
  411|    620|{
  412|    620|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    620|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    620|	do                                                                                             \
  |  |  |  |   61|    620|	{                                                                                              \
  |  |  |  |   62|    620|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    620|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    620|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    620|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    620|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    620|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    620|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    620|                                                                                                   \
  |  |  |  |   70|    620|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    620|	do                                                      \
  |  |  |  |  |  |   32|    620|	{                                                       \
  |  |  |  |  |  |   33|    620|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 620]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    620|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    620|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 620]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    620|                                                                                                   \
  |  |  |  |   72|    620|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    620|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    620|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    620|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 620]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  413|    620|	WINPR_ASSERT(hash);
  ------------------
  |  |   76|    620|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    620|	do                                                                                             \
  |  |  |  |   61|    620|	{                                                                                              \
  |  |  |  |   62|    620|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    620|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    620|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    620|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    620|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    620|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    620|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    620|                                                                                                   \
  |  |  |  |   70|    620|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    620|	do                                                      \
  |  |  |  |  |  |   32|    620|	{                                                       \
  |  |  |  |  |  |   33|    620|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 620]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    620|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    620|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 620]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    620|                                                                                                   \
  |  |  |  |   72|    620|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    620|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    620|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    620|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 620]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  414|       |
  415|    620|	SSPI_CREDENTIALS* credentials = context->credentials;
  416|       |#ifdef WITH_DEBUG_NTLM
  417|       |
  418|       |	if (credentials)
  419|       |	{
  420|       |		WLog_VRB(TAG, "Password (length = %" PRIu32 ")", credentials->identity.PasswordLength * 2);
  421|       |		winpr_HexDump(TAG, WLOG_TRACE, (BYTE*)credentials->identity.Password,
  422|       |		              credentials->identity.PasswordLength * 2);
  423|       |		WLog_VRB(TAG, "Username (length = %" PRIu32 ")", credentials->identity.UserLength * 2);
  424|       |		winpr_HexDump(TAG, WLOG_TRACE, (BYTE*)credentials->identity.User,
  425|       |		              credentials->identity.UserLength * 2);
  426|       |		WLog_VRB(TAG, "Domain (length = %" PRIu32 ")", credentials->identity.DomainLength * 2);
  427|       |		winpr_HexDump(TAG, WLOG_TRACE, (BYTE*)credentials->identity.Domain,
  428|       |		              credentials->identity.DomainLength * 2);
  429|       |	}
  430|       |	else
  431|       |		WLog_VRB(TAG, "Strange, NTLM_CONTEXT is missing valid credentials...");
  432|       |
  433|       |	WLog_VRB(TAG, "Workstation (length = %" PRIu16 ")", context->Workstation.Length);
  434|       |	winpr_HexDump(TAG, WLOG_TRACE, (BYTE*)context->Workstation.Buffer, context->Workstation.Length);
  435|       |	WLog_VRB(TAG, "NTOWFv2, NTLMv2 Hash");
  436|       |	winpr_HexDump(TAG, WLOG_TRACE, context->NtlmV2Hash, WINPR_MD5_DIGEST_LENGTH);
  437|       |#endif
  438|       |
  439|    620|	if (memcmp(context->NtlmV2Hash, NTLM_NULL_BUFFER, 16) != 0)
  ------------------
  |  Branch (439:6): [True: 553, False: 67]
  ------------------
  440|    553|		return TRUE;
  ------------------
  |  |  117|    553|#define TRUE true
  ------------------
  441|       |
  442|     67|	if (!credentials)
  ------------------
  |  Branch (442:6): [True: 0, False: 67]
  ------------------
  443|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  444|     67|	else if (memcmp(context->NtlmHash, NTLM_NULL_BUFFER, 16) != 0)
  ------------------
  |  Branch (444:11): [True: 0, False: 67]
  ------------------
  445|      0|	{
  446|      0|		return NTOWFv2FromHashW(context->NtlmHash, (LPWSTR)credentials->identity.User,
  447|      0|		                        credentials->identity.UserLength * 2,
  448|      0|		                        (LPWSTR)credentials->identity.Domain,
  449|      0|		                        credentials->identity.DomainLength * 2, hash);
  450|      0|	}
  451|     67|	else if (credentials->identity.PasswordLength > SSPI_CREDENTIALS_HASH_LENGTH_OFFSET)
  ------------------
  |  |   29|     67|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  |  Branch (451:11): [True: 0, False: 67]
  ------------------
  452|      0|	{
  453|       |		/* Special case for WinPR: password hash */
  454|      0|		if (ntlm_convert_password_hash(context, context->NtlmHash, sizeof(context->NtlmHash)) < 0)
  ------------------
  |  Branch (454:7): [True: 0, False: 0]
  ------------------
  455|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  456|       |
  457|      0|		return NTOWFv2FromHashW(context->NtlmHash, (LPWSTR)credentials->identity.User,
  458|      0|		                        credentials->identity.UserLength * 2,
  459|      0|		                        (LPWSTR)credentials->identity.Domain,
  460|      0|		                        credentials->identity.DomainLength * 2, hash);
  461|      0|	}
  462|     67|	else if (credentials->identity.Password)
  ------------------
  |  Branch (462:11): [True: 67, False: 0]
  ------------------
  463|     67|	{
  464|     67|		return NTOWFv2W(
  465|     67|		    (LPWSTR)credentials->identity.Password, credentials->identity.PasswordLength * 2,
  466|     67|		    (LPWSTR)credentials->identity.User, credentials->identity.UserLength * 2,
  467|     67|		    (LPWSTR)credentials->identity.Domain, credentials->identity.DomainLength * 2, hash);
  468|     67|	}
  469|      0|	else if (context->HashCallback)
  ------------------
  |  Branch (469:11): [True: 0, False: 0]
  ------------------
  470|      0|	{
  471|      0|		SecBuffer proofValue = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|      0|	{                      \
  |  |   85|      0|	} /** @since version 3.24.0 */
  ------------------
  472|      0|		SecBuffer micValue = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|      0|	{                      \
  |  |   85|      0|	} /** @since version 3.24.0 */
  ------------------
  473|       |
  474|      0|		if (ntlm_computeProofValue(context, &proofValue) != SEC_E_OK)
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (474:7): [True: 0, False: 0]
  ------------------
  475|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  476|       |
  477|      0|		if (ntlm_computeMicValue(context, &micValue) != SEC_E_OK)
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (477:7): [True: 0, False: 0]
  ------------------
  478|      0|		{
  479|      0|			sspi_SecBufferFree(&proofValue);
  480|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  481|      0|		}
  482|       |
  483|      0|		const SECURITY_STATUS ret = context->HashCallback(
  484|      0|		    context->HashCallbackArg, &credentials->identity, &proofValue,
  485|      0|		    context->EncryptedRandomSessionKey, context->AUTHENTICATE_MESSAGE.MessageIntegrityCheck,
  486|      0|		    &micValue, hash);
  487|      0|		sspi_SecBufferFree(&proofValue);
  488|      0|		sspi_SecBufferFree(&micValue);
  489|      0|		return ret == SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  490|      0|	}
  491|      0|	else if (context->UseSamFileDatabase)
  ------------------
  |  Branch (491:11): [True: 0, False: 0]
  ------------------
  492|      0|	{
  493|      0|		return ntlm_fetch_ntlm_v2_hash(context, hash);
  494|      0|	}
  495|       |
  496|      0|	return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  497|     67|}
ntlm_compute.c:ntlm_generate_signing_key:
  773|    268|{
  774|    268|	BOOL rc = FALSE;
  ------------------
  |  |  113|    268|#define FALSE false
  ------------------
  775|       |
  776|    268|	WINPR_ASSERT(exported_session_key);
  ------------------
  |  |   76|    268|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    268|	do                                                                                             \
  |  |  |  |   61|    268|	{                                                                                              \
  |  |  |  |   62|    268|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    268|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    268|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    268|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    268|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    268|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    268|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    268|                                                                                                   \
  |  |  |  |   70|    268|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    268|	do                                                      \
  |  |  |  |  |  |   32|    268|	{                                                       \
  |  |  |  |  |  |   33|    268|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 268]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    268|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    268|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 268]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    268|                                                                                                   \
  |  |  |  |   72|    268|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    268|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    268|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    268|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 268]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  777|    268|	WINPR_ASSERT(sign_magic);
  ------------------
  |  |   76|    268|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    268|	do                                                                                             \
  |  |  |  |   61|    268|	{                                                                                              \
  |  |  |  |   62|    268|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    268|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    268|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    268|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    268|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    268|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    268|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    268|                                                                                                   \
  |  |  |  |   70|    268|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    268|	do                                                      \
  |  |  |  |  |  |   32|    268|	{                                                       \
  |  |  |  |  |  |   33|    268|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 268]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    268|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    268|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 268]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    268|                                                                                                   \
  |  |  |  |   72|    268|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    268|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    268|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    268|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 268]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  778|    268|	WINPR_ASSERT(signing_key);
  ------------------
  |  |   76|    268|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    268|	do                                                                                             \
  |  |  |  |   61|    268|	{                                                                                              \
  |  |  |  |   62|    268|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    268|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    268|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    268|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    268|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    268|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    268|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    268|                                                                                                   \
  |  |  |  |   70|    268|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    268|	do                                                      \
  |  |  |  |  |  |   32|    268|	{                                                       \
  |  |  |  |  |  |   33|    268|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 268]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    268|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    268|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 268]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    268|                                                                                                   \
  |  |  |  |   72|    268|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    268|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    268|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    268|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 268]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  779|       |
  780|    268|	const size_t length = WINPR_MD5_DIGEST_LENGTH + sign_magic->cbBuffer;
  ------------------
  |  |   33|    268|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  781|    268|	BYTE* value = (BYTE*)malloc(length);
  782|       |
  783|    268|	if (!value)
  ------------------
  |  Branch (783:6): [True: 0, False: 268]
  ------------------
  784|      0|		goto out;
  785|       |
  786|       |	/* Concatenate ExportedSessionKey with sign magic */
  787|    268|	CopyMemory(value, exported_session_key, WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |  123|    268|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  788|    268|	CopyMemory(&value[WINPR_MD5_DIGEST_LENGTH], sign_magic->pvBuffer, sign_magic->cbBuffer);
  ------------------
  |  |  123|    268|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  789|       |
  790|    268|	rc = winpr_Digest(WINPR_MD_MD5, value, length, signing_key, WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |   33|    268|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  791|       |
  792|    268|out:
  793|    268|	free(value);
  794|    268|	return rc;
  795|    268|}

ntlm_get_negotiate_string:
   47|  35.6k|{
   48|  35.6k|	if (flag & NTLMSSP_NEGOTIATE_56)
  ------------------
  |  |   35|  35.6k|#define NTLMSSP_NEGOTIATE_56 0x80000000                        /* W   (0) */
  ------------------
  |  Branch (48:6): [True: 0, False: 35.6k]
  ------------------
   49|      0|		return "NTLMSSP_NEGOTIATE_56";
   50|  35.6k|	if (flag & NTLMSSP_NEGOTIATE_KEY_EXCH)
  ------------------
  |  |   36|  35.6k|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
  |  Branch (50:6): [True: 2.14k, False: 33.5k]
  ------------------
   51|  2.14k|		return "NTLMSSP_NEGOTIATE_KEY_EXCH";
   52|  33.5k|	if (flag & NTLMSSP_NEGOTIATE_128)
  ------------------
  |  |   37|  33.5k|#define NTLMSSP_NEGOTIATE_128 0x20000000                       /* U   (2) */
  ------------------
  |  Branch (52:6): [True: 2.28k, False: 31.2k]
  ------------------
   53|  2.28k|		return "NTLMSSP_NEGOTIATE_128";
   54|  31.2k|	if (flag & NTLMSSP_RESERVED1)
  ------------------
  |  |   38|  31.2k|#define NTLMSSP_RESERVED1 0x10000000                           /* r1  (3) */
  ------------------
  |  Branch (54:6): [True: 239, False: 30.9k]
  ------------------
   55|    239|		return "NTLMSSP_RESERVED1";
   56|  30.9k|	if (flag & NTLMSSP_RESERVED2)
  ------------------
  |  |   39|  30.9k|#define NTLMSSP_RESERVED2 0x08000000                           /* r2  (4) */
  ------------------
  |  Branch (56:6): [True: 327, False: 30.6k]
  ------------------
   57|    327|		return "NTLMSSP_RESERVED2";
   58|  30.6k|	if (flag & NTLMSSP_RESERVED3)
  ------------------
  |  |   40|  30.6k|#define NTLMSSP_RESERVED3 0x04000000                           /* r3  (5) */
  ------------------
  |  Branch (58:6): [True: 401, False: 30.2k]
  ------------------
   59|    401|		return "NTLMSSP_RESERVED3";
   60|  30.2k|	if (flag & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|  30.2k|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (60:6): [True: 2.38k, False: 27.8k]
  ------------------
   61|  2.38k|		return "NTLMSSP_NEGOTIATE_VERSION";
   62|  27.8k|	if (flag & NTLMSSP_RESERVED4)
  ------------------
  |  |   42|  27.8k|#define NTLMSSP_RESERVED4 0x01000000                           /* r4  (7) */
  ------------------
  |  Branch (62:6): [True: 281, False: 27.5k]
  ------------------
   63|    281|		return "NTLMSSP_RESERVED4";
   64|  27.5k|	if (flag & NTLMSSP_NEGOTIATE_TARGET_INFO)
  ------------------
  |  |   43|  27.5k|#define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000               /* S   (8) */
  ------------------
  |  Branch (64:6): [True: 773, False: 26.8k]
  ------------------
   65|    773|		return "NTLMSSP_NEGOTIATE_TARGET_INFO";
   66|  26.8k|	if (flag & NTLMSSP_REQUEST_NON_NT_SESSION_KEY)
  ------------------
  |  |   44|  26.8k|#define NTLMSSP_REQUEST_NON_NT_SESSION_KEY 0x00400000          /* R   (9) */
  ------------------
  |  Branch (66:6): [True: 253, False: 26.5k]
  ------------------
   67|    253|		return "NTLMSSP_REQUEST_NON_NT_SESSION_KEY";
   68|  26.5k|	if (flag & NTLMSSP_RESERVED5)
  ------------------
  |  |   45|  26.5k|#define NTLMSSP_RESERVED5 0x00200000                           /* r5  (10) */
  ------------------
  |  Branch (68:6): [True: 383, False: 26.1k]
  ------------------
   69|    383|		return "NTLMSSP_RESERVED5";
   70|  26.1k|	if (flag & NTLMSSP_NEGOTIATE_IDENTIFY)
  ------------------
  |  |   46|  26.1k|#define NTLMSSP_NEGOTIATE_IDENTIFY 0x00100000                  /* Q   (11) */
  ------------------
  |  Branch (70:6): [True: 316, False: 25.8k]
  ------------------
   71|    316|		return "NTLMSSP_NEGOTIATE_IDENTIFY";
   72|  25.8k|	if (flag & NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY)
  ------------------
  |  |   47|  25.8k|#define NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY 0x00080000 /* P   (12) */
  ------------------
  |  Branch (72:6): [True: 2.30k, False: 23.5k]
  ------------------
   73|  2.30k|		return "NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY";
   74|  23.5k|	if (flag & NTLMSSP_RESERVED6)
  ------------------
  |  |   48|  23.5k|#define NTLMSSP_RESERVED6 0x00040000                           /* r6  (13) */
  ------------------
  |  Branch (74:6): [True: 317, False: 23.2k]
  ------------------
   75|    317|		return "NTLMSSP_RESERVED6";
   76|  23.2k|	if (flag & NTLMSSP_TARGET_TYPE_SERVER)
  ------------------
  |  |   49|  23.2k|#define NTLMSSP_TARGET_TYPE_SERVER 0x00020000                  /* O   (14) */
  ------------------
  |  Branch (76:6): [True: 288, False: 22.9k]
  ------------------
   77|    288|		return "NTLMSSP_TARGET_TYPE_SERVER";
   78|  22.9k|	if (flag & NTLMSSP_TARGET_TYPE_DOMAIN)
  ------------------
  |  |   50|  22.9k|#define NTLMSSP_TARGET_TYPE_DOMAIN 0x00010000                  /* N   (15) */
  ------------------
  |  Branch (78:6): [True: 521, False: 22.4k]
  ------------------
   79|    521|		return "NTLMSSP_TARGET_TYPE_DOMAIN";
   80|  22.4k|	if (flag & NTLMSSP_NEGOTIATE_ALWAYS_SIGN)
  ------------------
  |  |   51|  22.4k|#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000               /* M   (16) */
  ------------------
  |  Branch (80:6): [True: 2.25k, False: 20.1k]
  ------------------
   81|  2.25k|		return "NTLMSSP_NEGOTIATE_ALWAYS_SIGN";
   82|  20.1k|	if (flag & NTLMSSP_RESERVED7)
  ------------------
  |  |   52|  20.1k|#define NTLMSSP_RESERVED7 0x00004000                           /* r7  (17) */
  ------------------
  |  Branch (82:6): [True: 456, False: 19.7k]
  ------------------
   83|    456|		return "NTLMSSP_RESERVED7";
   84|  19.7k|	if (flag & NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED)
  ------------------
  |  |   53|  19.7k|#define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000      /* L   (18) */
  ------------------
  |  Branch (84:6): [True: 702, False: 19.0k]
  ------------------
   85|    702|		return "NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED";
   86|  19.0k|	if (flag & NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED)
  ------------------
  |  |   54|  19.0k|#define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x00001000           /* K   (19) */
  ------------------
  |  Branch (86:6): [True: 576, False: 18.4k]
  ------------------
   87|    576|		return "NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED";
   88|  18.4k|	if (flag & NTLMSSP_NEGOTIATE_ANONYMOUS)
  ------------------
  |  |   55|  18.4k|#define NTLMSSP_NEGOTIATE_ANONYMOUS 0x00000800                 /* J   (20) */
  ------------------
  |  Branch (88:6): [True: 477, False: 17.9k]
  ------------------
   89|    477|		return "NTLMSSP_NEGOTIATE_ANONYMOUS";
   90|  17.9k|	if (flag & NTLMSSP_RESERVED8)
  ------------------
  |  |   56|  17.9k|#define NTLMSSP_RESERVED8 0x00000400                           /* r8  (21) */
  ------------------
  |  Branch (90:6): [True: 363, False: 17.6k]
  ------------------
   91|    363|		return "NTLMSSP_RESERVED8";
   92|  17.6k|	if (flag & NTLMSSP_NEGOTIATE_NTLM)
  ------------------
  |  |   57|  17.6k|#define NTLMSSP_NEGOTIATE_NTLM 0x00000200                      /* H   (22) */
  ------------------
  |  Branch (92:6): [True: 2.63k, False: 14.9k]
  ------------------
   93|  2.63k|		return "NTLMSSP_NEGOTIATE_NTLM";
   94|  14.9k|	if (flag & NTLMSSP_RESERVED9)
  ------------------
  |  |   58|  14.9k|#define NTLMSSP_RESERVED9 0x00000100                           /* r9  (23) */
  ------------------
  |  Branch (94:6): [True: 482, False: 14.4k]
  ------------------
   95|    482|		return "NTLMSSP_RESERVED9";
   96|  14.4k|	if (flag & NTLMSSP_NEGOTIATE_LM_KEY)
  ------------------
  |  |   59|  14.4k|#define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080                    /* G   (24) */
  ------------------
  |  Branch (96:6): [True: 2.13k, False: 12.3k]
  ------------------
   97|  2.13k|		return "NTLMSSP_NEGOTIATE_LM_KEY";
   98|  12.3k|	if (flag & NTLMSSP_NEGOTIATE_DATAGRAM)
  ------------------
  |  |   60|  12.3k|#define NTLMSSP_NEGOTIATE_DATAGRAM 0x00000040                  /* F   (25) */
  ------------------
  |  Branch (98:6): [True: 201, False: 12.1k]
  ------------------
   99|    201|		return "NTLMSSP_NEGOTIATE_DATAGRAM";
  100|  12.1k|	if (flag & NTLMSSP_NEGOTIATE_SEAL)
  ------------------
  |  |   61|  12.1k|#define NTLMSSP_NEGOTIATE_SEAL 0x00000020                      /* E   (26) */
  ------------------
  |  Branch (100:6): [True: 2.36k, False: 9.78k]
  ------------------
  101|  2.36k|		return "NTLMSSP_NEGOTIATE_SEAL";
  102|  9.78k|	if (flag & NTLMSSP_NEGOTIATE_SIGN)
  ------------------
  |  |   62|  9.78k|#define NTLMSSP_NEGOTIATE_SIGN 0x00000010                      /* D   (27) */
  ------------------
  |  Branch (102:6): [True: 2.29k, False: 7.48k]
  ------------------
  103|  2.29k|		return "NTLMSSP_NEGOTIATE_SIGN";
  104|  7.48k|	if (flag & NTLMSSP_RESERVED10)
  ------------------
  |  |   63|  7.48k|#define NTLMSSP_RESERVED10 0x00000008                          /* r10 (28) */
  ------------------
  |  Branch (104:6): [True: 317, False: 7.16k]
  ------------------
  105|    317|		return "NTLMSSP_RESERVED10";
  106|  7.16k|	if (flag & NTLMSSP_REQUEST_TARGET)
  ------------------
  |  |   64|  7.16k|#define NTLMSSP_REQUEST_TARGET 0x00000004                      /* C   (29) */
  ------------------
  |  Branch (106:6): [True: 2.43k, False: 4.73k]
  ------------------
  107|  2.43k|		return "NTLMSSP_REQUEST_TARGET";
  108|  4.73k|	if (flag & NTLMSSP_NEGOTIATE_OEM)
  ------------------
  |  |   65|  4.73k|#define NTLMSSP_NEGOTIATE_OEM 0x00000002                       /* B   (30) */
  ------------------
  |  Branch (108:6): [True: 2.27k, False: 2.45k]
  ------------------
  109|  2.27k|		return "NTLMSSP_NEGOTIATE_OEM";
  110|  2.45k|	if (flag & NTLMSSP_NEGOTIATE_UNICODE)
  ------------------
  |  |   66|  2.45k|#define NTLMSSP_NEGOTIATE_UNICODE 0x00000001                   /* A   (31) */
  ------------------
  |  Branch (110:6): [True: 2.45k, False: 0]
  ------------------
  111|  2.45k|		return "NTLMSSP_NEGOTIATE_UNICODE";
  112|      0|	return "NTLMSSP_NEGOTIATE_UNKNOWN";
  113|  2.45k|}
ntlm_read_NegotiateMessage:
  497|    715|{
  498|    715|	wStream sbuffer = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    715|	{                      \
  |  |   85|    715|	} /** @since version 3.24.0 */
  ------------------
  499|    715|	size_t length = 0;
  500|    715|	const NTLM_NEGOTIATE_MESSAGE empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    715|	{                      \
  |  |   85|    715|	} /** @since version 3.24.0 */
  ------------------
  501|       |
  502|    715|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    715|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    715|	do                                                                                             \
  |  |  |  |   61|    715|	{                                                                                              \
  |  |  |  |   62|    715|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    715|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    715|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    715|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    715|                                                                                                   \
  |  |  |  |   70|    715|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    715|	do                                                      \
  |  |  |  |  |  |   32|    715|	{                                                       \
  |  |  |  |  |  |   33|    715|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    715|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    715|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    715|                                                                                                   \
  |  |  |  |   72|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    715|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    715|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    715|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 715]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  503|    715|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|    715|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    715|	do                                                                                             \
  |  |  |  |   61|    715|	{                                                                                              \
  |  |  |  |   62|    715|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    715|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    715|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    715|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    715|                                                                                                   \
  |  |  |  |   70|    715|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    715|	do                                                      \
  |  |  |  |  |  |   32|    715|	{                                                       \
  |  |  |  |  |  |   33|    715|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    715|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    715|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    715|                                                                                                   \
  |  |  |  |   72|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    715|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    715|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    715|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 715]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  504|       |
  505|    715|	NTLM_NEGOTIATE_MESSAGE* message = &context->NEGOTIATE_MESSAGE;
  506|    715|	WINPR_ASSERT(message);
  ------------------
  |  |   76|    715|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    715|	do                                                                                             \
  |  |  |  |   61|    715|	{                                                                                              \
  |  |  |  |   62|    715|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    715|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    715|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    715|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    715|                                                                                                   \
  |  |  |  |   70|    715|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    715|	do                                                      \
  |  |  |  |  |  |   32|    715|	{                                                       \
  |  |  |  |  |  |   33|    715|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    715|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    715|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    715|                                                                                                   \
  |  |  |  |   72|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    715|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    715|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    715|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 715]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  507|       |
  508|    715|	*message = empty;
  509|       |
  510|    715|	wStream* s = Stream_StaticConstInit(&sbuffer, buffer->pvBuffer, buffer->cbBuffer);
  511|       |
  512|    715|	if (!s)
  ------------------
  |  Branch (512:6): [True: 0, False: 715]
  ------------------
  513|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  514|       |
  515|    715|	if (!ntlm_read_message_header(s, &message->header, MESSAGE_TYPE_NEGOTIATE))
  ------------------
  |  |   31|    715|#define MESSAGE_TYPE_NEGOTIATE 1
  ------------------
  |  Branch (515:6): [True: 78, False: 637]
  ------------------
  516|     78|		return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|     78|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|     78|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  517|       |
  518|    637|	if (!ntlm_read_negotiate_flags(s, &message->NegotiateFlags,
  ------------------
  |  Branch (518:6): [True: 7, False: 630]
  ------------------
  519|    637|	                               NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_NTLM |
  ------------------
  |  |   64|    637|#define NTLMSSP_REQUEST_TARGET 0x00000004                      /* C   (29) */
  ------------------
              	                               NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_NTLM |
  ------------------
  |  |   57|    637|#define NTLMSSP_NEGOTIATE_NTLM 0x00000200                      /* H   (22) */
  ------------------
  520|    637|	                                   NTLMSSP_NEGOTIATE_UNICODE,
  ------------------
  |  |   66|    637|#define NTLMSSP_NEGOTIATE_UNICODE 0x00000001                   /* A   (31) */
  ------------------
  521|    637|	                               "NTLM_NEGOTIATE_MESSAGE"))
  522|      7|		return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      7|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      7|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  523|       |
  524|    630|	context->NegotiateFlags = message->NegotiateFlags;
  525|       |
  526|       |	/* only set if NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED is set */
  527|       |	// if (context->NegotiateFlags & NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED)
  528|    630|	{
  529|    630|		if (!ntlm_read_message_fields(s, &(message->DomainName))) /* DomainNameFields (8 bytes) */
  ------------------
  |  Branch (529:7): [True: 16, False: 614]
  ------------------
  530|     16|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|     16|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|     16|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  531|    630|	}
  532|       |
  533|       |	/* only set if NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED is set */
  534|       |	// if (context->NegotiateFlags & NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED)
  535|    614|	{
  536|    614|		if (!ntlm_read_message_fields(s, &(message->Workstation))) /* WorkstationFields (8 bytes) */
  ------------------
  |  Branch (536:7): [True: 2, False: 612]
  ------------------
  537|      2|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      2|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      2|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  538|    614|	}
  539|       |
  540|    612|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|    612|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (540:6): [True: 544, False: 68]
  ------------------
  541|    544|	{
  542|    544|		if (!ntlm_read_version_info(s, &(message->Version))) /* Version (8 bytes) */
  ------------------
  |  Branch (542:7): [True: 2, False: 542]
  ------------------
  543|      2|			return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      2|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      2|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  544|    544|	}
  545|       |
  546|    610|	if (!ntlm_read_message_fields_buffer(s, &message->DomainName))
  ------------------
  |  Branch (546:6): [True: 56, False: 554]
  ------------------
  547|     56|		return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|     56|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|     56|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  548|       |
  549|    554|	if (!ntlm_read_message_fields_buffer(s, &message->Workstation))
  ------------------
  |  Branch (549:6): [True: 25, False: 529]
  ------------------
  550|     25|		return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|     25|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|     25|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  551|       |
  552|    529|	length = Stream_GetPosition(s);
  553|    529|	WINPR_ASSERT(length <= UINT32_MAX);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  554|    529|	buffer->cbBuffer = (ULONG)length;
  555|       |
  556|    529|	if (!sspi_SecBufferAlloc(&context->NegotiateMessage, (ULONG)length))
  ------------------
  |  Branch (556:6): [True: 0, False: 529]
  ------------------
  557|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  558|       |
  559|    529|	CopyMemory(context->NegotiateMessage.pvBuffer, buffer->pvBuffer, buffer->cbBuffer);
  ------------------
  |  |  123|    529|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  560|    529|	context->NegotiateMessage.BufferType = buffer->BufferType;
  561|       |#if defined(WITH_DEBUG_NTLM)
  562|       |	ntlm_print_negotiate_message(&context->NegotiateMessage, message);
  563|       |#endif
  564|    529|	ntlm_change_state(context, NTLM_STATE_CHALLENGE);
  565|    529|	return SEC_I_CONTINUE_NEEDED;
  ------------------
  |  |  208|    529|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|    529|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  566|    529|}
ntlm_write_NegotiateMessage:
  569|  1.00k|{
  570|  1.00k|	wStream sbuffer = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  1.00k|	{                      \
  |  |   85|  1.00k|	} /** @since version 3.24.0 */
  ------------------
  571|  1.00k|	size_t length = 0;
  572|  1.00k|	const NTLM_NEGOTIATE_MESSAGE empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  1.00k|	{                      \
  |  |   85|  1.00k|	} /** @since version 3.24.0 */
  ------------------
  573|       |
  574|  1.00k|	WINPR_ASSERT(context);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  575|  1.00k|	WINPR_ASSERT(buffer);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  576|       |
  577|  1.00k|	NTLM_NEGOTIATE_MESSAGE* message = &context->NEGOTIATE_MESSAGE;
  578|  1.00k|	WINPR_ASSERT(message);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|       |
  580|  1.00k|	*message = empty;
  581|       |
  582|  1.00k|	wStream* s = Stream_StaticInit(&sbuffer, buffer->pvBuffer, buffer->cbBuffer);
  583|       |
  584|  1.00k|	if (!s)
  ------------------
  |  Branch (584:6): [True: 0, False: 1.00k]
  ------------------
  585|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  586|       |
  587|  1.00k|	if (!ntlm_populate_message_header(&message->header, MESSAGE_TYPE_NEGOTIATE))
  ------------------
  |  |   31|  1.00k|#define MESSAGE_TYPE_NEGOTIATE 1
  ------------------
  |  Branch (587:6): [True: 0, False: 1.00k]
  ------------------
  588|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  589|       |
  590|  1.00k|	if (context->NTLMv2)
  ------------------
  |  Branch (590:6): [True: 1.00k, False: 0]
  ------------------
  591|  1.00k|	{
  592|  1.00k|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_56;
  ------------------
  |  |   35|  1.00k|#define NTLMSSP_NEGOTIATE_56 0x80000000                        /* W   (0) */
  ------------------
  593|  1.00k|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_VERSION;
  ------------------
  |  |   41|  1.00k|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  594|  1.00k|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_LM_KEY;
  ------------------
  |  |   59|  1.00k|#define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080                    /* G   (24) */
  ------------------
  595|  1.00k|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_OEM;
  ------------------
  |  |   65|  1.00k|#define NTLMSSP_NEGOTIATE_OEM 0x00000002                       /* B   (30) */
  ------------------
  596|  1.00k|	}
  597|       |
  598|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_KEY_EXCH;
  ------------------
  |  |   36|  1.00k|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
  599|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_128;
  ------------------
  |  |   37|  1.00k|#define NTLMSSP_NEGOTIATE_128 0x20000000                       /* U   (2) */
  ------------------
  600|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY;
  ------------------
  |  |   47|  1.00k|#define NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY 0x00080000 /* P   (12) */
  ------------------
  601|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;
  ------------------
  |  |   51|  1.00k|#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000               /* M   (16) */
  ------------------
  602|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_NTLM;
  ------------------
  |  |   57|  1.00k|#define NTLMSSP_NEGOTIATE_NTLM 0x00000200                      /* H   (22) */
  ------------------
  603|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_SIGN;
  ------------------
  |  |   62|  1.00k|#define NTLMSSP_NEGOTIATE_SIGN 0x00000010                      /* D   (27) */
  ------------------
  604|  1.00k|	message->NegotiateFlags |= NTLMSSP_REQUEST_TARGET;
  ------------------
  |  |   64|  1.00k|#define NTLMSSP_REQUEST_TARGET 0x00000004                      /* C   (29) */
  ------------------
  605|  1.00k|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_UNICODE;
  ------------------
  |  |   66|  1.00k|#define NTLMSSP_NEGOTIATE_UNICODE 0x00000001                   /* A   (31) */
  ------------------
  606|       |
  607|  1.00k|	if (context->confidentiality)
  ------------------
  |  Branch (607:6): [True: 1.00k, False: 0]
  ------------------
  608|  1.00k|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_SEAL;
  ------------------
  |  |   61|  1.00k|#define NTLMSSP_NEGOTIATE_SEAL 0x00000020                      /* E   (26) */
  ------------------
  609|       |
  610|  1.00k|	if (context->SendVersionInfo)
  ------------------
  |  Branch (610:6): [True: 1.00k, False: 0]
  ------------------
  611|  1.00k|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_VERSION;
  ------------------
  |  |   41|  1.00k|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  612|       |
  613|  1.00k|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|  1.00k|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (613:6): [True: 1.00k, False: 0]
  ------------------
  614|  1.00k|	{
  615|  1.00k|		if (!ntlm_get_version_info(&(message->Version)))
  ------------------
  |  Branch (615:7): [True: 0, False: 1.00k]
  ------------------
  616|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  617|  1.00k|	}
  618|       |
  619|  1.00k|	context->NegotiateFlags = message->NegotiateFlags;
  620|       |	/* Message Header (12 bytes) */
  621|  1.00k|	if (!ntlm_write_message_header(s, &message->header))
  ------------------
  |  Branch (621:6): [True: 0, False: 1.00k]
  ------------------
  622|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  623|       |
  624|  1.00k|	if (!ntlm_write_negotiate_flags(s, message->NegotiateFlags, "NTLM_NEGOTIATE_MESSAGE"))
  ------------------
  |  Branch (624:6): [True: 0, False: 1.00k]
  ------------------
  625|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  626|       |
  627|       |	/* only set if NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED is set */
  628|       |	/* DomainNameFields (8 bytes) */
  629|  1.00k|	if (!ntlm_write_message_fields(s, &(message->DomainName)))
  ------------------
  |  Branch (629:6): [True: 0, False: 1.00k]
  ------------------
  630|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  631|       |
  632|       |	/* only set if NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED is set */
  633|       |	/* WorkstationFields (8 bytes) */
  634|  1.00k|	if (!ntlm_write_message_fields(s, &(message->Workstation)))
  ------------------
  |  Branch (634:6): [True: 0, False: 1.00k]
  ------------------
  635|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  636|       |
  637|  1.00k|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|  1.00k|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (637:6): [True: 1.00k, False: 0]
  ------------------
  638|  1.00k|	{
  639|  1.00k|		if (!ntlm_write_version_info(s, &(message->Version)))
  ------------------
  |  Branch (639:7): [True: 0, False: 1.00k]
  ------------------
  640|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  641|  1.00k|	}
  642|       |
  643|  1.00k|	length = Stream_GetPosition(s);
  644|  1.00k|	WINPR_ASSERT(length <= UINT32_MAX);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  645|  1.00k|	buffer->cbBuffer = (ULONG)length;
  646|       |
  647|  1.00k|	if (!sspi_SecBufferAlloc(&context->NegotiateMessage, (ULONG)length))
  ------------------
  |  Branch (647:6): [True: 0, False: 1.00k]
  ------------------
  648|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  649|       |
  650|  1.00k|	CopyMemory(context->NegotiateMessage.pvBuffer, buffer->pvBuffer, buffer->cbBuffer);
  ------------------
  |  |  123|  1.00k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  651|  1.00k|	context->NegotiateMessage.BufferType = buffer->BufferType;
  652|       |#if defined(WITH_DEBUG_NTLM)
  653|       |	ntlm_print_negotiate_message(&context->NegotiateMessage, message);
  654|       |#endif
  655|  1.00k|	ntlm_change_state(context, NTLM_STATE_CHALLENGE);
  656|  1.00k|	return SEC_I_CONTINUE_NEEDED;
  ------------------
  |  |  208|  1.00k|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|  1.00k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  657|  1.00k|}
ntlm_read_ChallengeMessage:
  660|    520|{
  661|    520|	SECURITY_STATUS status = SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|    520|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|    520|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  662|    520|	wStream sbuffer = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    520|	{                      \
  |  |   85|    520|	} /** @since version 3.24.0 */
  ------------------
  663|    520|	size_t length = 0;
  664|    520|	size_t StartOffset = 0;
  665|    520|	size_t PayloadOffset = 0;
  666|    520|	const NTLM_CHALLENGE_MESSAGE empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    520|	{                      \
  |  |   85|    520|	} /** @since version 3.24.0 */
  ------------------
  667|       |
  668|    520|	if (!context || !buffer)
  ------------------
  |  Branch (668:6): [True: 0, False: 520]
  |  Branch (668:18): [True: 0, False: 520]
  ------------------
  669|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  670|       |
  671|    520|	if (!ntlm_generate_client_challenge(context))
  ------------------
  |  Branch (671:6): [True: 0, False: 520]
  ------------------
  672|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  673|       |
  674|    520|	NTLM_CHALLENGE_MESSAGE* message = &context->CHALLENGE_MESSAGE;
  675|    520|	WINPR_ASSERT(message);
  ------------------
  |  |   76|    520|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    520|	do                                                                                             \
  |  |  |  |   61|    520|	{                                                                                              \
  |  |  |  |   62|    520|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    520|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    520|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    520|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    520|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    520|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    520|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    520|                                                                                                   \
  |  |  |  |   70|    520|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    520|	do                                                      \
  |  |  |  |  |  |   32|    520|	{                                                       \
  |  |  |  |  |  |   33|    520|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 520]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    520|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    520|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 520]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    520|                                                                                                   \
  |  |  |  |   72|    520|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    520|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    520|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    520|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 520]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  676|       |
  677|    520|	*message = empty;
  678|       |
  679|    520|	wStream* s = Stream_StaticConstInit(&sbuffer, buffer->pvBuffer, buffer->cbBuffer);
  680|       |
  681|    520|	if (!s)
  ------------------
  |  Branch (681:6): [True: 0, False: 520]
  ------------------
  682|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  683|       |
  684|    520|	StartOffset = Stream_GetPosition(s);
  685|       |
  686|    520|	if (!ntlm_read_message_header(s, &message->header, MESSAGE_TYPE_CHALLENGE))
  ------------------
  |  |   32|    520|#define MESSAGE_TYPE_CHALLENGE 2
  ------------------
  |  Branch (686:6): [True: 69, False: 451]
  ------------------
  687|     69|		goto fail;
  688|       |
  689|    451|	if (!ntlm_read_message_fields(s, &(message->TargetName))) /* TargetNameFields (8 bytes) */
  ------------------
  |  Branch (689:6): [True: 3, False: 448]
  ------------------
  690|      3|		goto fail;
  691|       |
  692|    448|	if (!ntlm_read_negotiate_flags(s, &message->NegotiateFlags, 0, "NTLM_CHALLENGE_MESSAGE"))
  ------------------
  |  Branch (692:6): [True: 4, False: 444]
  ------------------
  693|      4|		goto fail;
  694|       |
  695|    444|	context->NegotiateFlags = message->NegotiateFlags;
  696|       |
  697|    444|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 16))
  ------------------
  |  |  128|    444|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|    444|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|    444|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|    444|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (697:6): [True: 8, False: 436]
  ------------------
  698|      8|		goto fail;
  699|       |
  700|    436|	Stream_Read(s, message->ServerChallenge, 8); /* ServerChallenge (8 bytes) */
  701|    436|	CopyMemory(context->ServerChallenge, message->ServerChallenge, 8);
  ------------------
  |  |  123|    436|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  702|    436|	Stream_Read(s, message->Reserved, 8); /* Reserved (8 bytes), should be ignored */
  703|       |
  704|    436|	if (!ntlm_read_message_fields(s, &(message->TargetInfo))) /* TargetInfoFields (8 bytes) */
  ------------------
  |  Branch (704:6): [True: 6, False: 430]
  ------------------
  705|      6|		goto fail;
  706|       |
  707|    430|	if (context->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|    430|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (707:6): [True: 62, False: 368]
  ------------------
  708|     62|	{
  709|     62|		if (!ntlm_read_version_info(s, &(message->Version))) /* Version (8 bytes) */
  ------------------
  |  Branch (709:7): [True: 2, False: 60]
  ------------------
  710|      2|			goto fail;
  711|     62|	}
  712|       |
  713|       |	/* Payload (variable) */
  714|    428|	PayloadOffset = Stream_GetPosition(s);
  715|       |
  716|    428|	status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|    428|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|    428|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  717|    428|	if (message->TargetName.Len > 0)
  ------------------
  |  Branch (717:6): [True: 333, False: 95]
  ------------------
  718|    333|	{
  719|    333|		if (!ntlm_read_message_fields_buffer(s, &(message->TargetName)))
  ------------------
  |  Branch (719:7): [True: 28, False: 305]
  ------------------
  720|     28|			goto fail;
  721|    333|	}
  722|       |
  723|    400|	if (message->TargetInfo.Len > 0)
  ------------------
  |  Branch (723:6): [True: 395, False: 5]
  ------------------
  724|    395|	{
  725|    395|		size_t cbAvTimestamp = 0;
  726|       |
  727|    395|		if (!ntlm_read_message_fields_buffer(s, &(message->TargetInfo)))
  ------------------
  |  Branch (727:7): [True: 44, False: 351]
  ------------------
  728|     44|			goto fail;
  729|       |
  730|    351|		context->ChallengeTargetInfo.pvBuffer = message->TargetInfo.Buffer;
  731|    351|		context->ChallengeTargetInfo.cbBuffer = message->TargetInfo.Len;
  732|    351|		NTLM_AV_PAIR* AvTimestamp =
  733|    351|		    ntlm_av_pair_get((NTLM_AV_PAIR*)message->TargetInfo.Buffer, message->TargetInfo.Len,
  734|    351|		                     MsvAvTimestamp, &cbAvTimestamp);
  735|       |
  736|    351|		if (AvTimestamp)
  ------------------
  |  Branch (736:7): [True: 79, False: 272]
  ------------------
  737|     79|		{
  738|     79|			PBYTE ptr = ntlm_av_pair_get_value_pointer(AvTimestamp, cbAvTimestamp);
  739|       |
  740|     79|			if (!ptr || (AvTimestamp->AvLen < 8))
  ------------------
  |  Branch (740:8): [True: 0, False: 79]
  |  Branch (740:16): [True: 3, False: 76]
  ------------------
  741|      3|				goto fail;
  742|       |
  743|     76|			if (context->NTLMv2)
  ------------------
  |  Branch (743:8): [True: 76, False: 0]
  ------------------
  744|     76|				context->UseMIC = TRUE;
  ------------------
  |  |  117|     76|#define TRUE true
  ------------------
  745|       |
  746|     76|			CopyMemory(context->ChallengeTimestamp, ptr, 8);
  ------------------
  |  |  123|     76|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  747|     76|		}
  748|    351|	}
  749|       |
  750|    353|	length = (PayloadOffset - StartOffset) + message->TargetName.Len + message->TargetInfo.Len;
  751|    353|	if (length > buffer->cbBuffer)
  ------------------
  |  Branch (751:6): [True: 62, False: 291]
  ------------------
  752|     62|		goto fail;
  753|       |
  754|    291|	if (!sspi_SecBufferAlloc(&context->ChallengeMessage, (ULONG)length))
  ------------------
  |  Branch (754:6): [True: 0, False: 291]
  ------------------
  755|      0|		goto fail;
  756|       |
  757|    291|	if (context->ChallengeMessage.pvBuffer)
  ------------------
  |  Branch (757:6): [True: 291, False: 0]
  ------------------
  758|    291|		CopyMemory(context->ChallengeMessage.pvBuffer, Stream_Buffer(s) + StartOffset, length);
  ------------------
  |  |  123|    291|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  759|       |#if defined(WITH_DEBUG_NTLM)
  760|       |	ntlm_print_challenge_message(&context->ChallengeMessage, message, nullptr);
  761|       |#endif
  762|       |	/* AV_PAIRs */
  763|       |
  764|    291|	if (context->NTLMv2)
  ------------------
  |  Branch (764:6): [True: 291, False: 0]
  ------------------
  765|    291|	{
  766|    291|		if (!ntlm_construct_authenticate_target_info(context))
  ------------------
  |  Branch (766:7): [True: 224, False: 67]
  ------------------
  767|    224|			goto fail;
  768|       |
  769|     67|		sspi_SecBufferFree(&context->ChallengeTargetInfo);
  770|     67|		context->ChallengeTargetInfo.pvBuffer = context->AuthenticateTargetInfo.pvBuffer;
  771|     67|		context->ChallengeTargetInfo.cbBuffer = context->AuthenticateTargetInfo.cbBuffer;
  772|     67|	}
  773|       |
  774|     67|	ntlm_generate_timestamp(context); /* Timestamp */
  775|       |
  776|     67|	{
  777|     67|		const SECURITY_STATUS rc = ntlm_compute_lm_v2_response(context); /* LmChallengeResponse */
  778|     67|		if (rc != SEC_E_OK)
  ------------------
  |  |  133|     67|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|     67|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (778:7): [True: 0, False: 67]
  ------------------
  779|      0|		{
  780|      0|			status = rc;
  781|      0|			goto fail;
  782|      0|		}
  783|     67|	}
  784|       |
  785|     67|	{
  786|     67|		const SECURITY_STATUS rc2 =
  787|     67|		    ntlm_compute_ntlm_v2_response(context); /* NtChallengeResponse */
  788|     67|		if (rc2 != SEC_E_OK)
  ------------------
  |  |  133|     67|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|     67|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (788:7): [True: 0, False: 67]
  ------------------
  789|      0|		{
  790|      0|			status = rc2;
  791|      0|			goto fail;
  792|      0|		}
  793|     67|	}
  794|       |
  795|     67|	if (!ntlm_generate_key_exchange_key(context)) /* KeyExchangeKey */
  ------------------
  |  Branch (795:6): [True: 0, False: 67]
  ------------------
  796|      0|		goto fail;
  797|     67|	if (!ntlm_generate_random_session_key(context)) /* RandomSessionKey */
  ------------------
  |  Branch (797:6): [True: 0, False: 67]
  ------------------
  798|      0|		goto fail;
  799|     67|	if (!ntlm_generate_exported_session_key(context)) /* ExportedSessionKey */
  ------------------
  |  Branch (799:6): [True: 0, False: 67]
  ------------------
  800|      0|		goto fail;
  801|     67|	if (!ntlm_encrypt_random_session_key(context)) /* EncryptedRandomSessionKey */
  ------------------
  |  Branch (801:6): [True: 0, False: 67]
  ------------------
  802|      0|		goto fail;
  803|       |
  804|       |	/* Generate signing keys */
  805|     67|	status = SEC_E_ENCRYPT_FAILURE;
  ------------------
  |  |  163|     67|#define SEC_E_ENCRYPT_FAILURE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090329)
  |  |  ------------------
  |  |  |  |   33|     67|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  806|     67|	if (!ntlm_generate_client_signing_key(context))
  ------------------
  |  Branch (806:6): [True: 0, False: 67]
  ------------------
  807|      0|		goto fail;
  808|     67|	if (!ntlm_generate_server_signing_key(context))
  ------------------
  |  Branch (808:6): [True: 0, False: 67]
  ------------------
  809|      0|		goto fail;
  810|       |	/* Generate sealing keys */
  811|     67|	if (!ntlm_generate_client_sealing_key(context))
  ------------------
  |  Branch (811:6): [True: 0, False: 67]
  ------------------
  812|      0|		goto fail;
  813|     67|	if (!ntlm_generate_server_sealing_key(context))
  ------------------
  |  Branch (813:6): [True: 0, False: 67]
  ------------------
  814|      0|		goto fail;
  815|       |	/* Initialize RC4 seal state using client sealing key */
  816|     67|	if (!ntlm_init_rc4_seal_states(context))
  ------------------
  |  Branch (816:6): [True: 0, False: 67]
  ------------------
  817|      0|		goto fail;
  818|       |#if defined(WITH_DEBUG_NTLM)
  819|       |	ntlm_print_authentication_complete(context);
  820|       |#endif
  821|     67|	ntlm_change_state(context, NTLM_STATE_AUTHENTICATE);
  822|     67|	status = SEC_I_CONTINUE_NEEDED;
  ------------------
  |  |  208|     67|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|     67|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  823|    520|fail:
  824|    520|	ntlm_free_message_fields_buffer(&(message->TargetName));
  825|    520|	return status;
  826|     67|}
ntlm_write_ChallengeMessage:
  829|    529|{
  830|    529|	wStream sbuffer = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  831|    529|	size_t length = 0;
  832|    529|	UINT32 PayloadOffset = 0;
  833|    529|	const NTLM_CHALLENGE_MESSAGE empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  834|       |
  835|    529|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  836|    529|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|       |
  838|    529|	NTLM_CHALLENGE_MESSAGE* message = &context->CHALLENGE_MESSAGE;
  839|    529|	WINPR_ASSERT(message);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  840|       |
  841|    529|	*message = empty;
  842|       |
  843|    529|	wStream* s = Stream_StaticInit(&sbuffer, buffer->pvBuffer, buffer->cbBuffer);
  844|       |
  845|    529|	if (!s)
  ------------------
  |  Branch (845:6): [True: 0, False: 529]
  ------------------
  846|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  847|       |
  848|    529|	if (!ntlm_get_version_info(&(message->Version))) /* Version */
  ------------------
  |  Branch (848:6): [True: 0, False: 529]
  ------------------
  849|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  850|    529|	if (!ntlm_generate_server_challenge(context)) /* Server Challenge */
  ------------------
  |  Branch (850:6): [True: 0, False: 529]
  ------------------
  851|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  852|    529|	ntlm_generate_timestamp(context);           /* Timestamp */
  853|       |
  854|    529|	if (!ntlm_construct_challenge_target_info(context)) /* TargetInfo */
  ------------------
  |  Branch (854:6): [True: 0, False: 529]
  ------------------
  855|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  856|       |
  857|    529|	CopyMemory(message->ServerChallenge, context->ServerChallenge, 8); /* ServerChallenge */
  ------------------
  |  |  123|    529|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  858|    529|	message->NegotiateFlags = context->NegotiateFlags;
  859|    529|	if (!ntlm_populate_message_header(&message->header, MESSAGE_TYPE_CHALLENGE))
  ------------------
  |  |   32|    529|#define MESSAGE_TYPE_CHALLENGE 2
  ------------------
  |  Branch (859:6): [True: 0, False: 529]
  ------------------
  860|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  861|       |
  862|       |	/* Message Header (12 bytes) */
  863|    529|	if (!ntlm_write_message_header(s, &message->header))
  ------------------
  |  Branch (863:6): [True: 0, False: 529]
  ------------------
  864|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  865|       |
  866|    529|	if (message->NegotiateFlags & NTLMSSP_REQUEST_TARGET)
  ------------------
  |  |   64|    529|#define NTLMSSP_REQUEST_TARGET 0x00000004                      /* C   (29) */
  ------------------
  |  Branch (866:6): [True: 529, False: 0]
  ------------------
  867|    529|	{
  868|    529|		message->TargetName.Len = (UINT16)context->TargetName.cbBuffer;
  869|    529|		message->TargetName.Buffer = (PBYTE)context->TargetName.pvBuffer;
  870|    529|	}
  871|       |
  872|    529|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_TARGET_INFO;
  ------------------
  |  |   43|    529|#define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000               /* S   (8) */
  ------------------
  873|       |
  874|    529|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_TARGET_INFO)
  ------------------
  |  |   43|    529|#define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000               /* S   (8) */
  ------------------
  |  Branch (874:6): [True: 529, False: 0]
  ------------------
  875|    529|	{
  876|    529|		message->TargetInfo.Len = (UINT16)context->ChallengeTargetInfo.cbBuffer;
  877|    529|		message->TargetInfo.Buffer = (PBYTE)context->ChallengeTargetInfo.pvBuffer;
  878|    529|	}
  879|       |
  880|    529|	PayloadOffset = 48;
  881|       |
  882|    529|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|    529|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (882:6): [True: 519, False: 10]
  ------------------
  883|    519|		PayloadOffset += 8;
  884|       |
  885|    529|	message->TargetName.BufferOffset = PayloadOffset;
  886|    529|	message->TargetInfo.BufferOffset = message->TargetName.BufferOffset + message->TargetName.Len;
  887|       |	/* TargetNameFields (8 bytes) */
  888|    529|	if (!ntlm_write_message_fields(s, &(message->TargetName)))
  ------------------
  |  Branch (888:6): [True: 0, False: 529]
  ------------------
  889|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  890|       |
  891|    529|	if (!ntlm_write_negotiate_flags(s, message->NegotiateFlags, "NTLM_CHALLENGE_MESSAGE"))
  ------------------
  |  Branch (891:6): [True: 0, False: 529]
  ------------------
  892|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  893|       |
  894|    529|	if (!NTLM_CheckAndLogRequiredCapacity(TAG, s, 16, "NTLM_CHALLENGE_MESSAGE::ServerChallenge"))
  ------------------
  |  |   39|    529|	Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, 1, "%s(%s:%" PRIuz ") " what, \
  |  |  ------------------
  |  |  |  |   45|    529|#define WLOG_WARN 3
  |  |  ------------------
  |  |   40|    529|	                                     __func__, __FILE__, (size_t)__LINE__)
  ------------------
  |  Branch (894:6): [True: 0, False: 529]
  ------------------
  895|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  896|       |
  897|    529|	Stream_Write(s, message->ServerChallenge, 8); /* ServerChallenge (8 bytes) */
  898|    529|	Stream_Write(s, message->Reserved, 8);        /* Reserved (8 bytes), should be ignored */
  899|       |
  900|       |	/* TargetInfoFields (8 bytes) */
  901|    529|	if (!ntlm_write_message_fields(s, &(message->TargetInfo)))
  ------------------
  |  Branch (901:6): [True: 0, False: 529]
  ------------------
  902|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  903|       |
  904|    529|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|    529|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (904:6): [True: 519, False: 10]
  ------------------
  905|    519|	{
  906|    519|		if (!ntlm_write_version_info(s, &(message->Version))) /* Version (8 bytes) */
  ------------------
  |  Branch (906:7): [True: 0, False: 519]
  ------------------
  907|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  908|    519|	}
  909|       |
  910|       |	/* Payload (variable) */
  911|    529|	if (message->NegotiateFlags & NTLMSSP_REQUEST_TARGET)
  ------------------
  |  |   64|    529|#define NTLMSSP_REQUEST_TARGET 0x00000004                      /* C   (29) */
  ------------------
  |  Branch (911:6): [True: 529, False: 0]
  ------------------
  912|    529|	{
  913|    529|		if (!ntlm_write_message_fields_buffer(s, &(message->TargetName)))
  ------------------
  |  Branch (913:7): [True: 0, False: 529]
  ------------------
  914|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  915|    529|	}
  916|       |
  917|    529|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_TARGET_INFO)
  ------------------
  |  |   43|    529|#define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000               /* S   (8) */
  ------------------
  |  Branch (917:6): [True: 529, False: 0]
  ------------------
  918|    529|	{
  919|    529|		if (!ntlm_write_message_fields_buffer(s, &(message->TargetInfo)))
  ------------------
  |  Branch (919:7): [True: 0, False: 529]
  ------------------
  920|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  921|    529|	}
  922|       |
  923|    529|	length = Stream_GetPosition(s);
  924|    529|	WINPR_ASSERT(length <= UINT32_MAX);
  ------------------
  |  |   76|    529|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    529|	do                                                                                             \
  |  |  |  |   61|    529|	{                                                                                              \
  |  |  |  |   62|    529|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    529|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    529|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    529|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    529|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    529|                                                                                                   \
  |  |  |  |   70|    529|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    529|	do                                                      \
  |  |  |  |  |  |   32|    529|	{                                                       \
  |  |  |  |  |  |   33|    529|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    529|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    529|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 529]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    529|                                                                                                   \
  |  |  |  |   72|    529|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    529|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    529|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    529|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  925|    529|	buffer->cbBuffer = (ULONG)length;
  926|       |
  927|    529|	if (!sspi_SecBufferAlloc(&context->ChallengeMessage, (ULONG)length))
  ------------------
  |  Branch (927:6): [True: 0, False: 529]
  ------------------
  928|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  929|       |
  930|    529|	CopyMemory(context->ChallengeMessage.pvBuffer, Stream_Buffer(s), length);
  ------------------
  |  |  123|    529|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  931|       |#if defined(WITH_DEBUG_NTLM)
  932|       |	ntlm_print_challenge_message(&context->ChallengeMessage, message,
  933|       |	                             &context->ChallengeTargetInfo);
  934|       |#endif
  935|    529|	ntlm_change_state(context, NTLM_STATE_AUTHENTICATE);
  936|    529|	return SEC_I_CONTINUE_NEEDED;
  ------------------
  |  |  208|    529|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|    529|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  937|    529|}
ntlm_read_AuthenticateMessage:
  940|    481|{
  941|    481|	SECURITY_STATUS status = SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|    481|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|    481|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  942|    481|	wStream sbuffer = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    481|	{                      \
  |  |   85|    481|	} /** @since version 3.24.0 */
  ------------------
  943|    481|	size_t length = 0;
  944|    481|	UINT32 flags = 0;
  945|    481|	NTLM_AV_PAIR* AvFlags = nullptr;
  946|    481|	size_t PayloadBufferOffset = 0;
  947|    481|	const NTLM_AUTHENTICATE_MESSAGE empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    481|	{                      \
  |  |   85|    481|	} /** @since version 3.24.0 */
  ------------------
  948|       |
  949|    481|	WINPR_ASSERT(context);
  ------------------
  |  |   76|    481|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    481|	do                                                                                             \
  |  |  |  |   61|    481|	{                                                                                              \
  |  |  |  |   62|    481|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    481|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    481|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    481|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    481|                                                                                                   \
  |  |  |  |   70|    481|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    481|	do                                                      \
  |  |  |  |  |  |   32|    481|	{                                                       \
  |  |  |  |  |  |   33|    481|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    481|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    481|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    481|                                                                                                   \
  |  |  |  |   72|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    481|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    481|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    481|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 481]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  950|    481|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|    481|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    481|	do                                                                                             \
  |  |  |  |   61|    481|	{                                                                                              \
  |  |  |  |   62|    481|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    481|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    481|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    481|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    481|                                                                                                   \
  |  |  |  |   70|    481|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    481|	do                                                      \
  |  |  |  |  |  |   32|    481|	{                                                       \
  |  |  |  |  |  |   33|    481|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    481|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    481|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    481|                                                                                                   \
  |  |  |  |   72|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    481|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    481|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    481|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 481]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  951|       |
  952|    481|	SSPI_CREDENTIALS* credentials = context->credentials;
  953|    481|	WINPR_ASSERT(credentials);
  ------------------
  |  |   76|    481|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    481|	do                                                                                             \
  |  |  |  |   61|    481|	{                                                                                              \
  |  |  |  |   62|    481|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    481|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    481|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    481|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    481|                                                                                                   \
  |  |  |  |   70|    481|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    481|	do                                                      \
  |  |  |  |  |  |   32|    481|	{                                                       \
  |  |  |  |  |  |   33|    481|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    481|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    481|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    481|                                                                                                   \
  |  |  |  |   72|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    481|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    481|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    481|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 481]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  954|       |
  955|    481|	NTLM_AUTHENTICATE_MESSAGE* message = &context->AUTHENTICATE_MESSAGE;
  956|    481|	WINPR_ASSERT(message);
  ------------------
  |  |   76|    481|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    481|	do                                                                                             \
  |  |  |  |   61|    481|	{                                                                                              \
  |  |  |  |   62|    481|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    481|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    481|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    481|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    481|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    481|                                                                                                   \
  |  |  |  |   70|    481|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    481|	do                                                      \
  |  |  |  |  |  |   32|    481|	{                                                       \
  |  |  |  |  |  |   33|    481|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    481|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    481|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 481]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    481|                                                                                                   \
  |  |  |  |   72|    481|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    481|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    481|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    481|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 481]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|       |
  958|    481|	*message = empty;
  959|       |
  960|    481|	wStream* s = Stream_StaticConstInit(&sbuffer, buffer->pvBuffer, buffer->cbBuffer);
  961|       |
  962|    481|	if (!s)
  ------------------
  |  Branch (962:6): [True: 0, False: 481]
  ------------------
  963|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  964|       |
  965|    481|	if (!ntlm_read_message_header(s, &message->header, MESSAGE_TYPE_AUTHENTICATE))
  ------------------
  |  |   33|    481|#define MESSAGE_TYPE_AUTHENTICATE 3
  ------------------
  |  Branch (965:6): [True: 110, False: 371]
  ------------------
  966|    110|		goto fail;
  967|       |
  968|    371|	if (!ntlm_read_message_fields(
  ------------------
  |  Branch (968:6): [True: 2, False: 369]
  ------------------
  969|    371|	        s, &(message->LmChallengeResponse))) /* LmChallengeResponseFields (8 bytes) */
  970|      2|		goto fail;
  971|       |
  972|    369|	if (!ntlm_read_message_fields(
  ------------------
  |  Branch (972:6): [True: 2, False: 367]
  ------------------
  973|    369|	        s, &(message->NtChallengeResponse))) /* NtChallengeResponseFields (8 bytes) */
  974|      2|		goto fail;
  975|       |
  976|    367|	if (!ntlm_read_message_fields(s, &(message->DomainName))) /* DomainNameFields (8 bytes) */
  ------------------
  |  Branch (976:6): [True: 2, False: 365]
  ------------------
  977|      2|		goto fail;
  978|       |
  979|    365|	if (!ntlm_read_message_fields(s, &(message->UserName))) /* UserNameFields (8 bytes) */
  ------------------
  |  Branch (979:6): [True: 2, False: 363]
  ------------------
  980|      2|		goto fail;
  981|       |
  982|    363|	if (!ntlm_read_message_fields(s, &(message->Workstation))) /* WorkstationFields (8 bytes) */
  ------------------
  |  Branch (982:6): [True: 2, False: 361]
  ------------------
  983|      2|		goto fail;
  984|       |
  985|    361|	if (!ntlm_read_message_fields(
  ------------------
  |  Branch (985:6): [True: 4, False: 357]
  ------------------
  986|    361|	        s,
  987|    361|	        &(message->EncryptedRandomSessionKey))) /* EncryptedRandomSessionKeyFields (8 bytes) */
  988|      4|		goto fail;
  989|       |
  990|    357|	if (!ntlm_read_negotiate_flags(s, &message->NegotiateFlags, 0, "NTLM_AUTHENTICATE_MESSAGE"))
  ------------------
  |  Branch (990:6): [True: 3, False: 354]
  ------------------
  991|      3|		goto fail;
  992|       |
  993|    354|	context->NegotiateKeyExchange = (message->NegotiateFlags & NTLMSSP_NEGOTIATE_KEY_EXCH) != 0;
  ------------------
  |  |   36|    354|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
  994|       |
  995|    354|	if ((context->NegotiateKeyExchange && !message->EncryptedRandomSessionKey.Len) ||
  ------------------
  |  Branch (995:7): [True: 56, False: 298]
  |  Branch (995:40): [True: 1, False: 55]
  ------------------
  996|    353|	    (!context->NegotiateKeyExchange && message->EncryptedRandomSessionKey.Len))
  ------------------
  |  Branch (996:7): [True: 298, False: 55]
  |  Branch (996:41): [True: 21, False: 277]
  ------------------
  997|     22|		goto fail;
  998|       |
  999|    332|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|    332|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (999:6): [True: 169, False: 163]
  ------------------
 1000|    169|	{
 1001|    169|		if (!ntlm_read_version_info(s, &(message->Version))) /* Version (8 bytes) */
  ------------------
  |  Branch (1001:7): [True: 4, False: 165]
  ------------------
 1002|      4|			goto fail;
 1003|    169|	}
 1004|       |
 1005|    328|	PayloadBufferOffset = Stream_GetPosition(s);
 1006|       |
 1007|    328|	status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|    328|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|    328|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1008|    328|	if (!ntlm_read_message_fields_buffer(s, &(message->DomainName))) /* DomainName */
  ------------------
  |  Branch (1008:6): [True: 9, False: 319]
  ------------------
 1009|      9|		goto fail;
 1010|       |
 1011|    319|	if (!ntlm_read_message_fields_buffer(s, &(message->UserName))) /* UserName */
  ------------------
  |  Branch (1011:6): [True: 5, False: 314]
  ------------------
 1012|      5|		goto fail;
 1013|       |
 1014|    314|	if (!ntlm_read_message_fields_buffer(s, &(message->Workstation))) /* Workstation */
  ------------------
  |  Branch (1014:6): [True: 2, False: 312]
  ------------------
 1015|      2|		goto fail;
 1016|       |
 1017|    312|	if (!ntlm_read_message_fields_buffer(s,
  ------------------
  |  Branch (1017:6): [True: 2, False: 310]
  ------------------
 1018|    312|	                                     &(message->LmChallengeResponse))) /* LmChallengeResponse */
 1019|      2|		goto fail;
 1020|       |
 1021|    310|	if (!ntlm_read_message_fields_buffer(s,
  ------------------
  |  Branch (1021:6): [True: 19, False: 291]
  ------------------
 1022|    310|	                                     &(message->NtChallengeResponse))) /* NtChallengeResponse */
 1023|     19|		goto fail;
 1024|       |
 1025|    291|	if (message->NtChallengeResponse.Len > 0)
  ------------------
  |  Branch (1025:6): [True: 203, False: 88]
  ------------------
 1026|    203|	{
 1027|    203|		size_t cbAvFlags = 0;
 1028|    203|		wStream ssbuffer;
 1029|    203|		wStream* snt = Stream_StaticConstInit(&ssbuffer, message->NtChallengeResponse.Buffer,
 1030|    203|		                                      message->NtChallengeResponse.Len);
 1031|       |
 1032|    203|		if (!snt)
  ------------------
  |  Branch (1032:7): [True: 0, False: 203]
  ------------------
 1033|      0|			goto fail;
 1034|       |
 1035|    203|		status = SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|    203|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|    203|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1036|    203|		if (!ntlm_read_ntlm_v2_response(snt, &(context->NTLMv2Response)))
  ------------------
  |  Branch (1036:7): [True: 6, False: 197]
  ------------------
 1037|      6|			goto fail;
 1038|    197|		status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|    197|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|    197|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1039|       |
 1040|    197|		context->NtChallengeResponse.pvBuffer = message->NtChallengeResponse.Buffer;
 1041|    197|		context->NtChallengeResponse.cbBuffer = message->NtChallengeResponse.Len;
 1042|    197|		sspi_SecBufferFree(&(context->ChallengeTargetInfo));
 1043|    197|		context->ChallengeTargetInfo.pvBuffer = (void*)context->NTLMv2Response.Challenge.AvPairs;
 1044|    197|		context->ChallengeTargetInfo.cbBuffer = message->NtChallengeResponse.Len - (28 + 16);
 1045|    197|		CopyMemory(context->ClientChallenge, context->NTLMv2Response.Challenge.ClientChallenge, 8);
  ------------------
  |  |  123|    197|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1046|    197|		AvFlags =
 1047|    197|		    ntlm_av_pair_get(context->NTLMv2Response.Challenge.AvPairs,
 1048|    197|		                     context->NTLMv2Response.Challenge.cbAvPairs, MsvAvFlags, &cbAvFlags);
 1049|       |
 1050|    197|		if (AvFlags)
  ------------------
  |  Branch (1050:7): [True: 100, False: 97]
  ------------------
 1051|    100|		{
 1052|    100|			const BYTE* ptr = ntlm_av_pair_get_value_pointer(AvFlags, cbAvFlags);
 1053|    100|			if (!ptr || (AvFlags->AvLen < 4))
  ------------------
  |  Branch (1053:8): [True: 0, False: 100]
  |  Branch (1053:16): [True: 3, False: 97]
  ------------------
 1054|      3|				goto fail;
 1055|     97|			flags = winpr_Data_Get_UINT32(ptr);
 1056|     97|		}
 1057|    197|	}
 1058|       |
 1059|    282|	if (!ntlm_read_message_fields_buffer(
  ------------------
  |  Branch (1059:6): [True: 15, False: 267]
  ------------------
 1060|    282|	        s, &(message->EncryptedRandomSessionKey))) /* EncryptedRandomSessionKey */
 1061|     15|		goto fail;
 1062|       |
 1063|    267|	if (message->EncryptedRandomSessionKey.Len > 0)
  ------------------
  |  Branch (1063:6): [True: 26, False: 241]
  ------------------
 1064|     26|	{
 1065|     26|		if (message->EncryptedRandomSessionKey.Len != 16)
  ------------------
  |  Branch (1065:7): [True: 22, False: 4]
  ------------------
 1066|     22|			goto fail;
 1067|       |
 1068|      4|		CopyMemory(context->EncryptedRandomSessionKey, message->EncryptedRandomSessionKey.Buffer,
  ------------------
  |  |  123|      4|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1069|      4|		           16);
 1070|      4|	}
 1071|       |
 1072|    245|	length = Stream_GetPosition(s);
 1073|    245|	WINPR_ASSERT(length <= UINT32_MAX);
  ------------------
  |  |   76|    245|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    245|	do                                                                                             \
  |  |  |  |   61|    245|	{                                                                                              \
  |  |  |  |   62|    245|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    245|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    245|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    245|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    245|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    245|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    245|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    245|                                                                                                   \
  |  |  |  |   70|    245|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    245|	do                                                      \
  |  |  |  |  |  |   32|    245|	{                                                       \
  |  |  |  |  |  |   33|    245|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 245]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    245|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    245|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 245]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    245|                                                                                                   \
  |  |  |  |   72|    245|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    245|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    245|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    245|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 245]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1074|       |
 1075|    245|	if (!sspi_SecBufferAlloc(&context->AuthenticateMessage, (ULONG)length))
  ------------------
  |  Branch (1075:6): [True: 0, False: 245]
  ------------------
 1076|      0|		goto fail;
 1077|       |
 1078|    245|	CopyMemory(context->AuthenticateMessage.pvBuffer, Stream_Buffer(s), length);
  ------------------
  |  |  123|    245|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1079|    245|	buffer->cbBuffer = (ULONG)length;
 1080|    245|	if (!Stream_SetPosition(s, PayloadBufferOffset))
  ------------------
  |  Branch (1080:6): [True: 0, False: 245]
  ------------------
 1081|      0|		goto fail;
 1082|       |
 1083|    245|	if (flags & MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK)
  ------------------
  |  |  119|    245|#define MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK 0x00000002
  ------------------
  |  Branch (1083:6): [True: 95, False: 150]
  ------------------
 1084|     95|	{
 1085|     95|		status = SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|     95|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|     95|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1086|     95|		if (!ntlm_read_message_integrity_check(
  ------------------
  |  Branch (1086:7): [True: 2, False: 93]
  ------------------
 1087|     95|		        s, &context->MessageIntegrityCheckOffset, message->MessageIntegrityCheck,
 1088|     95|		        sizeof(message->MessageIntegrityCheck), "NTLM_AUTHENTICATE_MESSAGE"))
 1089|      2|			goto fail;
 1090|     95|	}
 1091|       |
 1092|    243|	status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|    243|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|    243|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1093|       |
 1094|       |#if defined(WITH_DEBUG_NTLM)
 1095|       |	ntlm_print_authenticate_message(&context->AuthenticateMessage, message, flags, nullptr);
 1096|       |#endif
 1097|       |
 1098|    243|	if (message->UserName.Len > 0)
  ------------------
  |  Branch (1098:6): [True: 41, False: 202]
  ------------------
 1099|     41|	{
 1100|     41|		credentials->identity.User = (UINT16*)calloc(message->UserName.Len + sizeof(WCHAR), 1);
 1101|       |
 1102|     41|		if (!credentials->identity.User)
  ------------------
  |  Branch (1102:7): [True: 0, False: 41]
  ------------------
 1103|      0|			goto fail;
 1104|       |
 1105|     41|		CopyMemory(credentials->identity.User, message->UserName.Buffer, message->UserName.Len);
  ------------------
  |  |  123|     41|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1106|     41|		credentials->identity.UserLength = message->UserName.Len / sizeof(WCHAR);
 1107|     41|	}
 1108|       |
 1109|    243|	if (message->DomainName.Len > 0)
  ------------------
  |  Branch (1109:6): [True: 49, False: 194]
  ------------------
 1110|     49|	{
 1111|     49|		credentials->identity.Domain = (UINT16*)calloc(message->DomainName.Len + sizeof(WCHAR), 1);
 1112|       |
 1113|     49|		if (!credentials->identity.Domain)
  ------------------
  |  Branch (1113:7): [True: 0, False: 49]
  ------------------
 1114|      0|			goto fail;
 1115|       |
 1116|     49|		CopyMemory(credentials->identity.Domain, message->DomainName.Buffer,
  ------------------
  |  |  123|     49|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1117|     49|		           message->DomainName.Len);
 1118|     49|		credentials->identity.DomainLength = message->DomainName.Len / sizeof(WCHAR);
 1119|     49|	}
 1120|       |
 1121|    243|	if (context->NegotiateFlags & NTLMSSP_NEGOTIATE_LM_KEY)
  ------------------
  |  |   59|    243|#define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080                    /* G   (24) */
  ------------------
  |  Branch (1121:6): [True: 243, False: 0]
  ------------------
 1122|    243|	{
 1123|    243|		const SECURITY_STATUS rc = ntlm_compute_lm_v2_response(context); /* LmChallengeResponse */
 1124|    243|		if (rc != SEC_E_OK)
  ------------------
  |  |  133|    243|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    243|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (1124:7): [True: 0, False: 243]
  ------------------
 1125|      0|		{
 1126|      0|			status = rc;
 1127|      0|			goto fail;
 1128|      0|		}
 1129|    243|	}
 1130|       |
 1131|    243|	{
 1132|    243|		const SECURITY_STATUS rc = ntlm_compute_ntlm_v2_response(context); /* NtChallengeResponse */
 1133|    243|		if (rc != SEC_E_OK)
  ------------------
  |  |  133|    243|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    243|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (1133:7): [True: 0, False: 243]
  ------------------
 1134|      0|		{
 1135|      0|			status = rc;
 1136|      0|			goto fail;
 1137|      0|		}
 1138|    243|	}
 1139|       |
 1140|       |	/* KeyExchangeKey */
 1141|    243|	if (!ntlm_generate_key_exchange_key(context))
  ------------------
  |  Branch (1141:6): [True: 0, False: 243]
  ------------------
 1142|      0|		goto fail;
 1143|       |	/* EncryptedRandomSessionKey */
 1144|    243|	if (!ntlm_decrypt_random_session_key(context))
  ------------------
  |  Branch (1144:6): [True: 0, False: 243]
  ------------------
 1145|      0|		goto fail;
 1146|       |	/* ExportedSessionKey */
 1147|    243|	if (!ntlm_generate_exported_session_key(context))
  ------------------
  |  Branch (1147:6): [True: 0, False: 243]
  ------------------
 1148|      0|		goto fail;
 1149|       |
 1150|    243|	if (flags & MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK)
  ------------------
  |  |  119|    243|#define MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK 0x00000002
  ------------------
  |  Branch (1150:6): [True: 93, False: 150]
  ------------------
 1151|     93|	{
 1152|     93|		BYTE messageIntegrityCheck[16] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     93|	{                      \
  |  |   85|     93|	} /** @since version 3.24.0 */
  ------------------
 1153|       |
 1154|     93|		if (!ntlm_compute_message_integrity_check(context, messageIntegrityCheck,
  ------------------
  |  Branch (1154:7): [True: 12, False: 81]
  ------------------
 1155|     93|		                                          sizeof(messageIntegrityCheck)))
 1156|     12|			goto fail;
 1157|     81|		CopyMemory(
  ------------------
  |  |  123|     81|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1158|     81|		    &((PBYTE)context->AuthenticateMessage.pvBuffer)[context->MessageIntegrityCheckOffset],
 1159|     81|		    message->MessageIntegrityCheck, sizeof(message->MessageIntegrityCheck));
 1160|       |
 1161|     81|		if (memcmp(messageIntegrityCheck, message->MessageIntegrityCheck,
  ------------------
  |  Branch (1161:7): [True: 81, False: 0]
  ------------------
 1162|     81|		           sizeof(message->MessageIntegrityCheck)) != 0)
 1163|     81|		{
 1164|     81|			WLog_ERR(TAG, "Message Integrity Check (MIC) verification failed!");
  ------------------
  |  |  338|     81|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|     81|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
 1165|       |#ifdef WITH_DEBUG_NTLM
 1166|       |			WLog_ERR(TAG, "Expected MIC:");
 1167|       |			winpr_HexDump(TAG, WLOG_ERROR, messageIntegrityCheck, sizeof(messageIntegrityCheck));
 1168|       |			WLog_ERR(TAG, "Actual MIC:");
 1169|       |			winpr_HexDump(TAG, WLOG_ERROR, message->MessageIntegrityCheck,
 1170|       |			              sizeof(message->MessageIntegrityCheck));
 1171|       |#endif
 1172|     81|			status = SEC_E_MESSAGE_ALTERED;
  ------------------
  |  |  149|     81|#define SEC_E_MESSAGE_ALTERED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030F)
  |  |  ------------------
  |  |  |  |   33|     81|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1173|     81|			goto fail;
 1174|     81|		}
 1175|     81|	}
 1176|    150|	else
 1177|    150|	{
 1178|       |		/* no mic message was present
 1179|       |
 1180|       |		   https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/f9e6fbc4-a953-4f24-b229-ccdcc213b9ec
 1181|       |		   the mic is optional, as not supported in Windows NT, Windows 2000, Windows XP, and
 1182|       |		   Windows Server 2003 and, as it seems, in the NTLMv2 implementation of Qt5.
 1183|       |
 1184|       |		   now check the NtProofString, to detect if the entered client password matches the
 1185|       |		   expected password.
 1186|       |		   */
 1187|       |
 1188|       |#ifdef WITH_DEBUG_NTLM
 1189|       |		WLog_VRB(TAG, "No MIC present, using NtProofString for verification.");
 1190|       |#endif
 1191|       |
 1192|    150|		if (memcmp(context->NTLMv2Response.Response, context->NtProofString, 16) != 0)
  ------------------
  |  Branch (1192:7): [True: 150, False: 0]
  ------------------
 1193|    150|		{
 1194|    150|			WLog_ERR(TAG, "NtProofString verification failed!");
  ------------------
  |  |  338|    150|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|    150|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
 1195|       |#ifdef WITH_DEBUG_NTLM
 1196|       |			WLog_ERR(TAG, "Expected NtProofString:");
 1197|       |			winpr_HexDump(TAG, WLOG_ERROR, context->NtProofString, sizeof(context->NtProofString));
 1198|       |			WLog_ERR(TAG, "Actual NtProofString:");
 1199|       |			winpr_HexDump(TAG, WLOG_ERROR, context->NTLMv2Response.Response,
 1200|       |			              sizeof(context->NTLMv2Response));
 1201|       |#endif
 1202|    150|			status = SEC_E_LOGON_DENIED;
  ------------------
  |  |  146|    150|#define SEC_E_LOGON_DENIED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030C)
  |  |  ------------------
  |  |  |  |   33|    150|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1203|    150|			goto fail;
 1204|    150|		}
 1205|    150|	}
 1206|       |
 1207|       |	/* Generate signing keys */
 1208|      0|	if (!ntlm_generate_client_signing_key(context))
  ------------------
  |  Branch (1208:6): [True: 0, False: 0]
  ------------------
 1209|      0|		goto fail;
 1210|      0|	if (!ntlm_generate_server_signing_key(context))
  ------------------
  |  Branch (1210:6): [True: 0, False: 0]
  ------------------
 1211|      0|		goto fail;
 1212|       |	/* Generate sealing keys */
 1213|      0|	if (!ntlm_generate_client_sealing_key(context))
  ------------------
  |  Branch (1213:6): [True: 0, False: 0]
  ------------------
 1214|      0|		goto fail;
 1215|      0|	if (!ntlm_generate_server_sealing_key(context))
  ------------------
  |  Branch (1215:6): [True: 0, False: 0]
  ------------------
 1216|      0|		goto fail;
 1217|       |	/* Initialize RC4 seal state */
 1218|      0|	if (!ntlm_init_rc4_seal_states(context))
  ------------------
  |  Branch (1218:6): [True: 0, False: 0]
  ------------------
 1219|      0|		goto fail;
 1220|       |#if defined(WITH_DEBUG_NTLM)
 1221|       |	ntlm_print_authentication_complete(context);
 1222|       |#endif
 1223|      0|	ntlm_change_state(context, NTLM_STATE_FINAL);
 1224|      0|	status = SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1225|       |
 1226|    481|fail:
 1227|    481|	ntlm_free_message_fields_buffer(&(message->DomainName));
 1228|    481|	ntlm_free_message_fields_buffer(&(message->UserName));
 1229|    481|	ntlm_free_message_fields_buffer(&(message->Workstation));
 1230|    481|	ntlm_free_message_fields_buffer(&(message->LmChallengeResponse));
 1231|       |	/* NtChallengeResponse.Buffer is aliased to context->NtChallengeResponse.pvBuffer at
 1232|       |	 * L1048 until ntlm_compute_ntlm_v2_response() reallocates the context buffer. Only
 1233|       |	 * free message->NtChallengeResponse when the alias does not hold, otherwise
 1234|       |	 * ntlm_ContextFree() frees the same pointer via context->NtChallengeResponse. */
 1235|    481|	if (context->NtChallengeResponse.pvBuffer != message->NtChallengeResponse.Buffer)
  ------------------
  |  Branch (1235:6): [True: 249, False: 232]
  ------------------
 1236|    249|		ntlm_free_message_fields_buffer(&(message->NtChallengeResponse));
 1237|    481|	ntlm_free_message_fields_buffer(&(message->EncryptedRandomSessionKey));
 1238|    481|	return status;
 1239|      0|}
ntlm_write_AuthenticateMessage:
 1249|     67|{
 1250|     67|	wStream sbuffer = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     67|	{                      \
  |  |   85|     67|	} /** @since version 3.24.0 */
  ------------------
 1251|     67|	size_t length = 0;
 1252|     67|	UINT32 PayloadBufferOffset = 0;
 1253|     67|	const NTLM_AUTHENTICATE_MESSAGE empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     67|	{                      \
  |  |   85|     67|	} /** @since version 3.24.0 */
  ------------------
 1254|       |
 1255|     67|	WINPR_ASSERT(context);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1256|     67|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1257|       |
 1258|     67|	SSPI_CREDENTIALS* credentials = context->credentials;
 1259|     67|	WINPR_ASSERT(credentials);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1260|       |
 1261|     67|	NTLM_AUTHENTICATE_MESSAGE* message = &context->AUTHENTICATE_MESSAGE;
 1262|     67|	WINPR_ASSERT(message);
  ------------------
  |  |   76|     67|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     67|	do                                                                                             \
  |  |  |  |   61|     67|	{                                                                                              \
  |  |  |  |   62|     67|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     67|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     67|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     67|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     67|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     67|                                                                                                   \
  |  |  |  |   70|     67|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     67|	do                                                      \
  |  |  |  |  |  |   32|     67|	{                                                       \
  |  |  |  |  |  |   33|     67|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     67|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     67|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     67|                                                                                                   \
  |  |  |  |   72|     67|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     67|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     67|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     67|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|       |
 1264|     67|	*message = empty;
 1265|       |
 1266|     67|	wStream* s = Stream_StaticInit(&sbuffer, buffer->pvBuffer, buffer->cbBuffer);
 1267|       |
 1268|     67|	if (!s)
  ------------------
  |  Branch (1268:6): [True: 0, False: 67]
  ------------------
 1269|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1270|       |
 1271|     67|	if (context->NTLMv2)
  ------------------
  |  Branch (1271:6): [True: 67, False: 0]
  ------------------
 1272|     67|	{
 1273|     67|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_56;
  ------------------
  |  |   35|     67|#define NTLMSSP_NEGOTIATE_56 0x80000000                        /* W   (0) */
  ------------------
 1274|       |
 1275|     67|		if (context->SendVersionInfo)
  ------------------
  |  Branch (1275:7): [True: 67, False: 0]
  ------------------
 1276|     67|			message->NegotiateFlags |= NTLMSSP_NEGOTIATE_VERSION;
  ------------------
  |  |   41|     67|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
 1277|     67|	}
 1278|       |
 1279|     67|	if (context->UseMIC)
  ------------------
  |  Branch (1279:6): [True: 67, False: 0]
  ------------------
 1280|     67|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_TARGET_INFO;
  ------------------
  |  |   43|     67|#define NTLMSSP_NEGOTIATE_TARGET_INFO 0x00800000               /* S   (8) */
  ------------------
 1281|       |
 1282|     67|	if (context->SendWorkstationName)
  ------------------
  |  Branch (1282:6): [True: 67, False: 0]
  ------------------
 1283|     67|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED;
  ------------------
  |  |   53|     67|#define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000      /* L   (18) */
  ------------------
 1284|       |
 1285|     67|	if (context->confidentiality)
  ------------------
  |  Branch (1285:6): [True: 67, False: 0]
  ------------------
 1286|     67|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_SEAL;
  ------------------
  |  |   61|     67|#define NTLMSSP_NEGOTIATE_SEAL 0x00000020                      /* E   (26) */
  ------------------
 1287|       |
 1288|     67|	if (context->CHALLENGE_MESSAGE.NegotiateFlags & NTLMSSP_NEGOTIATE_KEY_EXCH)
  ------------------
  |  |   36|     67|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
  |  Branch (1288:6): [True: 10, False: 57]
  ------------------
 1289|     10|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_KEY_EXCH;
  ------------------
  |  |   36|     10|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
 1290|       |
 1291|     67|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_128;
  ------------------
  |  |   37|     67|#define NTLMSSP_NEGOTIATE_128 0x20000000                       /* U   (2) */
  ------------------
 1292|     67|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY;
  ------------------
  |  |   47|     67|#define NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY 0x00080000 /* P   (12) */
  ------------------
 1293|     67|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;
  ------------------
  |  |   51|     67|#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000               /* M   (16) */
  ------------------
 1294|     67|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_NTLM;
  ------------------
  |  |   57|     67|#define NTLMSSP_NEGOTIATE_NTLM 0x00000200                      /* H   (22) */
  ------------------
 1295|     67|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_SIGN;
  ------------------
  |  |   62|     67|#define NTLMSSP_NEGOTIATE_SIGN 0x00000010                      /* D   (27) */
  ------------------
 1296|     67|	message->NegotiateFlags |= NTLMSSP_REQUEST_TARGET;
  ------------------
  |  |   64|     67|#define NTLMSSP_REQUEST_TARGET 0x00000004                      /* C   (29) */
  ------------------
 1297|     67|	message->NegotiateFlags |= NTLMSSP_NEGOTIATE_UNICODE;
  ------------------
  |  |   66|     67|#define NTLMSSP_NEGOTIATE_UNICODE 0x00000001                   /* A   (31) */
  ------------------
 1298|       |
 1299|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|     67|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (1299:6): [True: 67, False: 0]
  ------------------
 1300|     67|	{
 1301|     67|		if (!ntlm_get_version_info(&(message->Version)))
  ------------------
  |  Branch (1301:7): [True: 0, False: 67]
  ------------------
 1302|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1303|     67|	}
 1304|       |
 1305|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED)
  ------------------
  |  |   53|     67|#define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000      /* L   (18) */
  ------------------
  |  Branch (1305:6): [True: 67, False: 0]
  ------------------
 1306|     67|	{
 1307|     67|		message->Workstation.Len = context->Workstation.Length;
 1308|     67|		message->Workstation.Buffer = (BYTE*)context->Workstation.Buffer;
 1309|     67|	}
 1310|       |
 1311|     67|	if (credentials->identity.DomainLength > 0)
  ------------------
  |  Branch (1311:6): [True: 67, False: 0]
  ------------------
 1312|     67|	{
 1313|     67|		message->NegotiateFlags |= NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED;
  ------------------
  |  |   54|     67|#define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x00001000           /* K   (19) */
  ------------------
 1314|     67|		message->DomainName.Len = (UINT16)credentials->identity.DomainLength * sizeof(WCHAR);
 1315|     67|		message->DomainName.Buffer = (BYTE*)credentials->identity.Domain;
 1316|     67|	}
 1317|       |
 1318|     67|	message->UserName.Len = (UINT16)credentials->identity.UserLength * sizeof(WCHAR);
 1319|     67|	message->UserName.Buffer = (BYTE*)credentials->identity.User;
 1320|     67|	message->LmChallengeResponse.Len = (UINT16)context->LmChallengeResponse.cbBuffer;
 1321|     67|	message->LmChallengeResponse.Buffer = (BYTE*)context->LmChallengeResponse.pvBuffer;
 1322|     67|	message->NtChallengeResponse.Len = (UINT16)context->NtChallengeResponse.cbBuffer;
 1323|     67|	message->NtChallengeResponse.Buffer = (BYTE*)context->NtChallengeResponse.pvBuffer;
 1324|       |
 1325|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_KEY_EXCH)
  ------------------
  |  |   36|     67|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
  |  Branch (1325:6): [True: 10, False: 57]
  ------------------
 1326|     10|	{
 1327|     10|		message->EncryptedRandomSessionKey.Len = 16;
 1328|     10|		message->EncryptedRandomSessionKey.Buffer = context->EncryptedRandomSessionKey;
 1329|     10|	}
 1330|       |
 1331|     67|	PayloadBufferOffset = 64;
 1332|       |
 1333|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|     67|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (1333:6): [True: 67, False: 0]
  ------------------
 1334|     67|		PayloadBufferOffset += 8; /* Version (8 bytes) */
 1335|       |
 1336|     67|	if (context->UseMIC)
  ------------------
  |  Branch (1336:6): [True: 67, False: 0]
  ------------------
 1337|     67|		PayloadBufferOffset += 16; /* Message Integrity Check (16 bytes) */
 1338|       |
 1339|     67|	message->DomainName.BufferOffset = PayloadBufferOffset;
 1340|     67|	message->UserName.BufferOffset = message->DomainName.BufferOffset + message->DomainName.Len;
 1341|     67|	message->Workstation.BufferOffset = message->UserName.BufferOffset + message->UserName.Len;
 1342|     67|	message->LmChallengeResponse.BufferOffset =
 1343|     67|	    message->Workstation.BufferOffset + message->Workstation.Len;
 1344|     67|	message->NtChallengeResponse.BufferOffset =
 1345|     67|	    message->LmChallengeResponse.BufferOffset + message->LmChallengeResponse.Len;
 1346|     67|	message->EncryptedRandomSessionKey.BufferOffset =
 1347|     67|	    message->NtChallengeResponse.BufferOffset + message->NtChallengeResponse.Len;
 1348|     67|	if (!ntlm_populate_message_header(&message->header, MESSAGE_TYPE_AUTHENTICATE))
  ------------------
  |  |   33|     67|#define MESSAGE_TYPE_AUTHENTICATE 3
  ------------------
  |  Branch (1348:6): [True: 0, False: 67]
  ------------------
 1349|      0|		return SEC_E_INVALID_TOKEN;
  ------------------
  |  |  142|      0|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1350|     67|	if (!ntlm_write_message_header(s, &message->header)) /* Message Header (12 bytes) */
  ------------------
  |  Branch (1350:6): [True: 0, False: 67]
  ------------------
 1351|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1352|     67|	if (!ntlm_write_message_fields(
  ------------------
  |  Branch (1352:6): [True: 0, False: 67]
  ------------------
 1353|     67|	        s, &(message->LmChallengeResponse))) /* LmChallengeResponseFields (8 bytes) */
 1354|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1355|     67|	if (!ntlm_write_message_fields(
  ------------------
  |  Branch (1355:6): [True: 0, False: 67]
  ------------------
 1356|     67|	        s, &(message->NtChallengeResponse))) /* NtChallengeResponseFields (8 bytes) */
 1357|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1358|     67|	if (!ntlm_write_message_fields(s, &(message->DomainName))) /* DomainNameFields (8 bytes) */
  ------------------
  |  Branch (1358:6): [True: 0, False: 67]
  ------------------
 1359|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1360|     67|	if (!ntlm_write_message_fields(s, &(message->UserName))) /* UserNameFields (8 bytes) */
  ------------------
  |  Branch (1360:6): [True: 0, False: 67]
  ------------------
 1361|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1362|     67|	if (!ntlm_write_message_fields(s, &(message->Workstation))) /* WorkstationFields (8 bytes) */
  ------------------
  |  Branch (1362:6): [True: 0, False: 67]
  ------------------
 1363|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1364|     67|	if (!ntlm_write_message_fields(
  ------------------
  |  Branch (1364:6): [True: 0, False: 67]
  ------------------
 1365|     67|	        s,
 1366|     67|	        &(message->EncryptedRandomSessionKey))) /* EncryptedRandomSessionKeyFields (8 bytes) */
 1367|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1368|     67|	if (!ntlm_write_negotiate_flags(s, message->NegotiateFlags, "NTLM_AUTHENTICATE_MESSAGE"))
  ------------------
  |  Branch (1368:6): [True: 0, False: 67]
  ------------------
 1369|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1370|       |
 1371|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)
  ------------------
  |  |   41|     67|#define NTLMSSP_NEGOTIATE_VERSION 0x02000000                   /* T   (6) */
  ------------------
  |  Branch (1371:6): [True: 67, False: 0]
  ------------------
 1372|     67|	{
 1373|     67|		if (!ntlm_write_version_info(s, &(message->Version))) /* Version (8 bytes) */
  ------------------
  |  Branch (1373:7): [True: 0, False: 67]
  ------------------
 1374|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1375|     67|	}
 1376|       |
 1377|     67|	if (context->UseMIC)
  ------------------
  |  Branch (1377:6): [True: 67, False: 0]
  ------------------
 1378|     67|	{
 1379|     67|		const BYTE data[WINPR_MD5_DIGEST_LENGTH] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     67|	{                      \
  |  |   85|     67|	} /** @since version 3.24.0 */
  ------------------
 1380|       |
 1381|     67|		context->MessageIntegrityCheckOffset = Stream_GetPosition(s);
 1382|     67|		if (!ntlm_write_message_integrity_check(s, Stream_GetPosition(s), data, sizeof(data),
  ------------------
  |  Branch (1382:7): [True: 0, False: 67]
  ------------------
 1383|     67|		                                        "NTLM_AUTHENTICATE_MESSAGE"))
 1384|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1385|     67|	}
 1386|       |
 1387|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED)
  ------------------
  |  |   54|     67|#define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x00001000           /* K   (19) */
  ------------------
  |  Branch (1387:6): [True: 67, False: 0]
  ------------------
 1388|     67|	{
 1389|     67|		if (!ntlm_write_message_fields_buffer(s, &(message->DomainName))) /* DomainName */
  ------------------
  |  Branch (1389:7): [True: 0, False: 67]
  ------------------
 1390|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1391|     67|	}
 1392|       |
 1393|     67|	if (!ntlm_write_message_fields_buffer(s, &(message->UserName))) /* UserName */
  ------------------
  |  Branch (1393:6): [True: 0, False: 67]
  ------------------
 1394|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1395|       |
 1396|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED)
  ------------------
  |  |   53|     67|#define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000      /* L   (18) */
  ------------------
  |  Branch (1396:6): [True: 67, False: 0]
  ------------------
 1397|     67|	{
 1398|     67|		if (!ntlm_write_message_fields_buffer(s, &(message->Workstation))) /* Workstation */
  ------------------
  |  Branch (1398:7): [True: 0, False: 67]
  ------------------
 1399|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1400|     67|	}
 1401|       |
 1402|     67|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_LM_KEY)
  ------------------
  |  |   59|     67|#define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080                    /* G   (24) */
  ------------------
  |  Branch (1402:6): [True: 0, False: 67]
  ------------------
 1403|      0|	{
 1404|      0|		if (!ntlm_write_message_fields_buffer(
  ------------------
  |  Branch (1404:7): [True: 0, False: 0]
  ------------------
 1405|      0|		        s, &(message->LmChallengeResponse))) /* LmChallengeResponse */
 1406|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1407|      0|	}
 1408|     67|	if (!ntlm_write_message_fields_buffer(
  ------------------
  |  Branch (1408:6): [True: 14, False: 53]
  ------------------
 1409|     67|	        s, &(message->NtChallengeResponse))) /* NtChallengeResponse */
 1410|     14|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|     14|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|     14|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1411|       |
 1412|     53|	if (message->NegotiateFlags & NTLMSSP_NEGOTIATE_KEY_EXCH)
  ------------------
  |  |   36|     53|#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000                  /* V   (1) */
  ------------------
  |  Branch (1412:6): [True: 9, False: 44]
  ------------------
 1413|      9|	{
 1414|      9|		if (!ntlm_write_message_fields_buffer(
  ------------------
  |  Branch (1414:7): [True: 0, False: 9]
  ------------------
 1415|      9|		        s, &(message->EncryptedRandomSessionKey))) /* EncryptedRandomSessionKey */
 1416|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1417|      9|	}
 1418|       |
 1419|     53|	length = Stream_GetPosition(s);
 1420|     53|	WINPR_ASSERT(length <= UINT32_MAX);
  ------------------
  |  |   76|     53|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     53|	do                                                                                             \
  |  |  |  |   61|     53|	{                                                                                              \
  |  |  |  |   62|     53|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     53|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     53|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     53|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     53|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     53|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     53|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     53|                                                                                                   \
  |  |  |  |   70|     53|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     53|	do                                                      \
  |  |  |  |  |  |   32|     53|	{                                                       \
  |  |  |  |  |  |   33|     53|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     53|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     53|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     53|                                                                                                   \
  |  |  |  |   72|     53|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     53|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     53|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     53|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 53]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1421|       |
 1422|     53|	if (!sspi_SecBufferAlloc(&context->AuthenticateMessage, (ULONG)length))
  ------------------
  |  Branch (1422:6): [True: 0, False: 53]
  ------------------
 1423|      0|		return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1424|       |
 1425|     53|	CopyMemory(context->AuthenticateMessage.pvBuffer, Stream_Buffer(s), length);
  ------------------
  |  |  123|     53|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
 1426|     53|	buffer->cbBuffer = (ULONG)length;
 1427|       |
 1428|     53|	if (context->UseMIC)
  ------------------
  |  Branch (1428:6): [True: 53, False: 0]
  ------------------
 1429|     53|	{
 1430|       |		/* Message Integrity Check */
 1431|     53|		if (!ntlm_compute_message_integrity_check(context, message->MessageIntegrityCheck,
  ------------------
  |  Branch (1431:7): [True: 0, False: 53]
  ------------------
 1432|     53|		                                          sizeof(message->MessageIntegrityCheck)))
 1433|      0|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      0|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1434|     53|		if (!ntlm_write_message_integrity_check(
  ------------------
  |  Branch (1434:7): [True: 4, False: 49]
  ------------------
 1435|     53|		        s, context->MessageIntegrityCheckOffset, message->MessageIntegrityCheck,
 1436|     53|		        sizeof(message->MessageIntegrityCheck), "NTLM_AUTHENTICATE_MESSAGE"))
 1437|      4|			return SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|      4|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|      4|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1438|     53|	}
 1439|       |
 1440|       |#if defined(WITH_DEBUG_NTLM)
 1441|       |	ntlm_print_authenticate_message(&context->AuthenticateMessage, message,
 1442|       |	                                context->UseMIC ? MSV_AV_FLAGS_MESSAGE_INTEGRITY_CHECK : 0,
 1443|       |	                                &context->AuthenticateTargetInfo);
 1444|       |#endif
 1445|     49|	ntlm_change_state(context, NTLM_STATE_FINAL);
 1446|     49|	return SEC_E_OK;
  ------------------
  |  |  133|     49|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|     49|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1447|     53|}
ntlm_message.c:ntlm_read_message_header:
  245|  1.71k|{
  246|  1.71k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  1.71k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.71k|	do                                                                                             \
  |  |  |  |   61|  1.71k|	{                                                                                              \
  |  |  |  |   62|  1.71k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.71k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.71k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.71k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.71k|                                                                                                   \
  |  |  |  |   70|  1.71k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.71k|	do                                                      \
  |  |  |  |  |  |   32|  1.71k|	{                                                       \
  |  |  |  |  |  |   33|  1.71k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.71k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.71k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.71k|                                                                                                   \
  |  |  |  |   72|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.71k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.71k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.71k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|  1.71k|	WINPR_ASSERT(header);
  ------------------
  |  |   76|  1.71k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.71k|	do                                                                                             \
  |  |  |  |   61|  1.71k|	{                                                                                              \
  |  |  |  |   62|  1.71k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.71k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.71k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.71k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.71k|                                                                                                   \
  |  |  |  |   70|  1.71k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.71k|	do                                                      \
  |  |  |  |  |  |   32|  1.71k|	{                                                       \
  |  |  |  |  |  |   33|  1.71k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.71k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.71k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.71k|                                                                                                   \
  |  |  |  |   72|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.71k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.71k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.71k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|       |
  249|  1.71k|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 12))
  ------------------
  |  |  128|  1.71k|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|  1.71k|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.71k|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|  1.71k|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (249:6): [True: 58, False: 1.65k]
  ------------------
  250|     58|		return FALSE;
  ------------------
  |  |  113|     58|#define FALSE false
  ------------------
  251|       |
  252|  1.65k|	Stream_Read(s, header->Signature, 8);
  253|  1.65k|	Stream_Read_UINT32(s, header->MessageType);
  ------------------
  |  |  684|  1.65k|	do                                     \
  |  |  685|  1.65k|	{                                      \
  |  |  686|  1.65k|		_v = stream_read_u32_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|  1.65k|#define TRUE true
  |  |  ------------------
  |  |  687|  1.65k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (687:11): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  254|       |
  255|  1.65k|	if (strncmp((char*)header->Signature, NTLM_SIGNATURE, 8) != 0)
  ------------------
  |  Branch (255:6): [True: 108, False: 1.55k]
  ------------------
  256|    108|	{
  257|    108|		char Signature[sizeof(header->Signature) * 3 + 1] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    108|	{                      \
  |  |   85|    108|	} /** @since version 3.24.0 */
  ------------------
  258|    108|		winpr_BinToHexStringBuffer(header->Signature, sizeof(header->Signature), Signature,
  259|    108|		                           sizeof(Signature), TRUE);
  ------------------
  |  |  117|    108|#define TRUE true
  ------------------
  260|       |
  261|    108|		WLog_ERR(TAG, "NTLM_MESSAGE_HEADER Invalid signature, got %s, expected %s", Signature,
  ------------------
  |  |  338|    108|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|    108|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  262|    108|		         NTLM_SIGNATURE);
  263|    108|		return FALSE;
  ------------------
  |  |  113|    108|#define FALSE false
  ------------------
  264|    108|	}
  265|       |
  266|  1.55k|	if (header->MessageType != expected)
  ------------------
  |  Branch (266:6): [True: 91, False: 1.45k]
  ------------------
  267|     91|	{
  268|     91|		WLog_ERR(TAG, "NTLM_MESSAGE_HEADER Invalid message type, got %s, expected %s",
  ------------------
  |  |  338|     91|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|     91|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  269|     91|		         ntlm_message_type_string(header->MessageType), ntlm_message_type_string(expected));
  270|     91|		return FALSE;
  ------------------
  |  |  113|     91|#define FALSE false
  ------------------
  271|     91|	}
  272|       |
  273|  1.45k|	return TRUE;
  ------------------
  |  |  117|  1.45k|#define TRUE true
  ------------------
  274|  1.55k|}
ntlm_message.c:ntlm_read_negotiate_flags:
  415|  1.44k|{
  416|  1.44k|	UINT32 NegotiateFlags = 0;
  417|  1.44k|	char buffer[1024] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  1.44k|	{                      \
  |  |   85|  1.44k|	} /** @since version 3.24.0 */
  ------------------
  418|  1.44k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  1.44k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.44k|	do                                                                                             \
  |  |  |  |   61|  1.44k|	{                                                                                              \
  |  |  |  |   62|  1.44k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.44k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.44k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.44k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.44k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.44k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.44k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.44k|                                                                                                   \
  |  |  |  |   70|  1.44k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.44k|	do                                                      \
  |  |  |  |  |  |   32|  1.44k|	{                                                       \
  |  |  |  |  |  |   33|  1.44k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.44k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.44k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.44k|                                                                                                   \
  |  |  |  |   72|  1.44k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.44k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.44k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.44k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  419|  1.44k|	WINPR_ASSERT(flags);
  ------------------
  |  |   76|  1.44k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.44k|	do                                                                                             \
  |  |  |  |   61|  1.44k|	{                                                                                              \
  |  |  |  |   62|  1.44k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.44k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.44k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.44k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.44k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.44k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.44k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.44k|                                                                                                   \
  |  |  |  |   70|  1.44k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.44k|	do                                                      \
  |  |  |  |  |  |   32|  1.44k|	{                                                       \
  |  |  |  |  |  |   33|  1.44k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.44k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.44k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.44k|                                                                                                   \
  |  |  |  |   72|  1.44k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.44k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.44k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.44k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  420|  1.44k|	WINPR_ASSERT(name);
  ------------------
  |  |   76|  1.44k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.44k|	do                                                                                             \
  |  |  |  |   61|  1.44k|	{                                                                                              \
  |  |  |  |   62|  1.44k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.44k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.44k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.44k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.44k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.44k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.44k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.44k|                                                                                                   \
  |  |  |  |   70|  1.44k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.44k|	do                                                      \
  |  |  |  |  |  |   32|  1.44k|	{                                                       \
  |  |  |  |  |  |   33|  1.44k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.44k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.44k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.44k|                                                                                                   \
  |  |  |  |   72|  1.44k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.44k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.44k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.44k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  421|       |
  422|  1.44k|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 4))
  ------------------
  |  |  128|  1.44k|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|  1.44k|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.44k|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|  1.44k|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (422:6): [True: 8, False: 1.43k]
  ------------------
  423|      8|		return FALSE;
  ------------------
  |  |  113|      8|#define FALSE false
  ------------------
  424|       |
  425|  1.43k|	Stream_Read_UINT32(s, NegotiateFlags); /* NegotiateFlags (4 bytes) */
  ------------------
  |  |  684|  1.43k|	do                                     \
  |  |  685|  1.43k|	{                                      \
  |  |  686|  1.43k|		_v = stream_read_u32_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|  1.43k|#define TRUE true
  |  |  ------------------
  |  |  687|  1.43k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (687:11): [Folded, False: 1.43k]
  |  |  ------------------
  ------------------
  426|       |
  427|  1.43k|	if ((NegotiateFlags & required) != required)
  ------------------
  |  Branch (427:6): [True: 6, False: 1.42k]
  ------------------
  428|      6|	{
  429|      6|		WLog_ERR(TAG, "%s::NegotiateFlags invalid flags 0x08%" PRIx32 ", 0x%08" PRIx32 " required",
  ------------------
  |  |  338|      6|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      6|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  430|      6|		         name, NegotiateFlags, required);
  431|      6|		return FALSE;
  ------------------
  |  |  113|      6|#define FALSE false
  ------------------
  432|      6|	}
  433|       |
  434|  1.42k|	WLog_DBG(TAG, "Read flags %s",
  ------------------
  |  |  332|  1.42k|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   43|  1.42k|#define WLOG_DEBUG 1
  |  |  ------------------
  ------------------
  435|  1.42k|	         ntlm_negotiate_flags_string(buffer, ARRAYSIZE(buffer), NegotiateFlags));
  436|  1.42k|	*flags = NegotiateFlags;
  437|  1.42k|	return TRUE;
  ------------------
  |  |  117|  1.42k|#define TRUE true
  ------------------
  438|  1.43k|}
ntlm_message.c:ntlm_read_message_fields:
  301|  4.32k|{
  302|  4.32k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  4.32k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.32k|	do                                                                                             \
  |  |  |  |   61|  4.32k|	{                                                                                              \
  |  |  |  |   62|  4.32k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.32k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.32k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.32k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.32k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.32k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.32k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.32k|                                                                                                   \
  |  |  |  |   70|  4.32k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.32k|	do                                                      \
  |  |  |  |  |  |   32|  4.32k|	{                                                       \
  |  |  |  |  |  |   33|  4.32k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.32k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.32k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.32k|                                                                                                   \
  |  |  |  |   72|  4.32k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.32k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.32k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.32k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  303|  4.32k|	WINPR_ASSERT(fields);
  ------------------
  |  |   76|  4.32k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  4.32k|	do                                                                                             \
  |  |  |  |   61|  4.32k|	{                                                                                              \
  |  |  |  |   62|  4.32k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  4.32k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  4.32k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  4.32k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  4.32k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  4.32k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  4.32k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  4.32k|                                                                                                   \
  |  |  |  |   70|  4.32k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.32k|	do                                                      \
  |  |  |  |  |  |   32|  4.32k|	{                                                       \
  |  |  |  |  |  |   33|  4.32k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.32k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  4.32k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  4.32k|                                                                                                   \
  |  |  |  |   72|  4.32k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  4.32k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  4.32k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  4.32k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  304|       |
  305|  4.32k|	if (!Stream_CheckAndLogRequiredLength(TAG, s, 8))
  ------------------
  |  |  128|  4.32k|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|  4.32k|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  4.32k|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|  4.32k|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (305:6): [True: 41, False: 4.28k]
  ------------------
  306|     41|		return FALSE;
  ------------------
  |  |  113|     41|#define FALSE false
  ------------------
  307|       |
  308|  4.28k|	ntlm_free_message_fields_buffer(fields);
  309|       |
  310|  4.28k|	Stream_Read_UINT16(s, fields->Len);          /* Len (2 bytes) */
  ------------------
  |  |  660|  4.28k|	do                                     \
  |  |  661|  4.28k|	{                                      \
  |  |  662|  4.28k|		_v = stream_read_u16_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|  4.28k|#define TRUE true
  |  |  ------------------
  |  |  663|  4.28k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (663:11): [Folded, False: 4.28k]
  |  |  ------------------
  ------------------
  311|  4.28k|	Stream_Read_UINT16(s, fields->MaxLen);       /* MaxLen (2 bytes) */
  ------------------
  |  |  660|  4.28k|	do                                     \
  |  |  661|  4.28k|	{                                      \
  |  |  662|  4.28k|		_v = stream_read_u16_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|  4.28k|#define TRUE true
  |  |  ------------------
  |  |  663|  4.28k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (663:11): [Folded, False: 4.28k]
  |  |  ------------------
  ------------------
  312|  4.28k|	Stream_Read_UINT32(s, fields->BufferOffset); /* BufferOffset (4 bytes) */
  ------------------
  |  |  684|  4.28k|	do                                     \
  |  |  685|  4.28k|	{                                      \
  |  |  686|  4.28k|		_v = stream_read_u32_le(_s, TRUE); \
  |  |  ------------------
  |  |  |  |  117|  4.28k|#define TRUE true
  |  |  ------------------
  |  |  687|  4.28k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (687:11): [Folded, False: 4.28k]
  |  |  ------------------
  ------------------
  313|  4.28k|	return TRUE;
  ------------------
  |  |  117|  4.28k|#define TRUE true
  ------------------
  314|  4.32k|}
ntlm_message.c:ntlm_read_message_fields_buffer:
  336|  3.75k|{
  337|  3.75k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  3.75k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.75k|	do                                                                                             \
  |  |  |  |   61|  3.75k|	{                                                                                              \
  |  |  |  |   62|  3.75k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.75k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.75k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.75k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.75k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.75k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.75k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.75k|                                                                                                   \
  |  |  |  |   70|  3.75k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.75k|	do                                                      \
  |  |  |  |  |  |   32|  3.75k|	{                                                       \
  |  |  |  |  |  |   33|  3.75k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.75k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.75k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.75k|                                                                                                   \
  |  |  |  |   72|  3.75k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.75k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.75k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.75k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  338|  3.75k|	WINPR_ASSERT(fields);
  ------------------
  |  |   76|  3.75k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.75k|	do                                                                                             \
  |  |  |  |   61|  3.75k|	{                                                                                              \
  |  |  |  |   62|  3.75k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.75k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.75k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.75k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.75k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.75k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.75k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.75k|                                                                                                   \
  |  |  |  |   70|  3.75k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.75k|	do                                                      \
  |  |  |  |  |  |   32|  3.75k|	{                                                       \
  |  |  |  |  |  |   33|  3.75k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.75k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.75k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.75k|                                                                                                   \
  |  |  |  |   72|  3.75k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.75k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.75k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.75k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  339|       |
  340|  3.75k|	ntlm_free_message_fields_buffer(fields);
  341|  3.75k|	if (fields->Len > 0)
  ------------------
  |  Branch (341:6): [True: 1.61k, False: 2.13k]
  ------------------
  342|  1.61k|	{
  343|  1.61k|		const size_t offset = 1ull * fields->BufferOffset + fields->Len;
  344|       |
  345|  1.61k|		if (fields->BufferOffset > UINT32_MAX - fields->Len)
  ------------------
  |  Branch (345:7): [True: 11, False: 1.60k]
  ------------------
  346|     11|		{
  347|     11|			WLog_ERR(TAG,
  ------------------
  |  |  338|     11|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|     11|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  348|     11|			         "NTLM_MESSAGE_FIELDS::BufferOffset %" PRIu32
  349|     11|			         " too large, maximum allowed is %" PRIu32,
  350|     11|			         fields->BufferOffset, UINT32_MAX - fields->Len);
  351|     11|			return FALSE;
  ------------------
  |  |  113|     11|#define FALSE false
  ------------------
  352|     11|		}
  353|       |
  354|  1.60k|		if (offset > Stream_Length(s))
  ------------------
  |  Branch (354:7): [True: 194, False: 1.41k]
  ------------------
  355|    194|		{
  356|    194|			WLog_ERR(TAG,
  ------------------
  |  |  338|    194|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|    194|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  357|    194|			         "NTLM_MESSAGE_FIELDS::Buffer offset %" PRIuz " beyond received data %" PRIuz,
  358|    194|			         offset, Stream_Length(s));
  359|    194|			return FALSE;
  ------------------
  |  |  113|    194|#define FALSE false
  ------------------
  360|    194|		}
  361|       |
  362|  1.41k|		fields->Buffer = (PBYTE)malloc(fields->Len);
  363|       |
  364|  1.41k|		if (!fields->Buffer)
  ------------------
  |  Branch (364:7): [True: 0, False: 1.41k]
  ------------------
  365|      0|		{
  366|      0|			WLog_ERR(TAG, "NTLM_MESSAGE_FIELDS::Buffer allocation of %" PRIu16 "bytes failed",
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  367|      0|			         fields->Len);
  368|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  369|      0|		}
  370|       |
  371|  1.41k|		if (!Stream_SetPosition(s, fields->BufferOffset))
  ------------------
  |  Branch (371:7): [True: 0, False: 1.41k]
  ------------------
  372|      0|		{
  373|      0|			ntlm_free_message_fields_buffer(fields);
  374|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  375|      0|		}
  376|  1.41k|		Stream_Read(s, fields->Buffer, fields->Len);
  377|  1.41k|	}
  378|       |
  379|  3.55k|	return TRUE;
  ------------------
  |  |  117|  3.55k|#define TRUE true
  ------------------
  380|  3.75k|}
ntlm_message.c:ntlm_populate_message_header:
  292|  1.59k|{
  293|  1.59k|	WINPR_ASSERT(header);
  ------------------
  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  294|       |
  295|  1.59k|	CopyMemory(header->Signature, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
  ------------------
  |  |  123|  1.59k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  296|  1.59k|	header->MessageType = MessageType;
  297|  1.59k|	return TRUE;
  ------------------
  |  |  117|  1.59k|#define TRUE true
  ------------------
  298|  1.59k|}
ntlm_message.c:ntlm_write_message_header:
  277|  1.59k|{
  278|  1.59k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|  1.59k|	WINPR_ASSERT(header);
  ------------------
  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|       |
  281|  1.59k|	if (!NTLM_CheckAndLogRequiredCapacity(TAG, s, sizeof(NTLM_SIGNATURE) + 4ull,
  ------------------
  |  |   39|  1.59k|	Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, 1, "%s(%s:%" PRIuz ") " what, \
  |  |  ------------------
  |  |  |  |   45|  1.59k|#define WLOG_WARN 3
  |  |  ------------------
  |  |   40|  1.59k|	                                     __func__, __FILE__, (size_t)__LINE__)
  ------------------
  |  Branch (281:6): [True: 0, False: 1.59k]
  ------------------
  282|  1.59k|	                                      "NTLM_MESSAGE_HEADER::header"))
  283|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  284|       |
  285|  1.59k|	Stream_Write(s, header->Signature, sizeof(NTLM_SIGNATURE));
  286|  1.59k|	Stream_Write_UINT32(s, header->MessageType);
  ------------------
  |  | 1071|  1.59k|	do                                           \
  |  | 1072|  1.59k|	{                                            \
  |  | 1073|  1.59k|		WINPR_ASSERT((v) <= UINT32_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1074|  1.59k|		WINPR_ASSERT((v) >= 0);                  \
  |  |  ------------------
  |  |  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1075|  1.59k|		Stream_Write_UINT32_unchecked((s), (v)); \
  |  | 1076|  1.59k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (1076:11): [Folded, False: 1.59k]
  |  |  ------------------
  ------------------
  287|       |
  288|  1.59k|	return TRUE;
  ------------------
  |  |  117|  1.59k|#define TRUE true
  ------------------
  289|  1.59k|}
ntlm_message.c:ntlm_write_negotiate_flags:
  441|  1.59k|{
  442|  1.59k|	char buffer[1024] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  1.59k|	{                      \
  |  |   85|  1.59k|	} /** @since version 3.24.0 */
  ------------------
  443|  1.59k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  444|  1.59k|	WINPR_ASSERT(name);
  ------------------
  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  445|       |
  446|  1.59k|	if (!Stream_CheckAndLogRequiredCapacityEx(TAG, WLOG_WARN, s, 4ull, 1ull,
  ------------------
  |  |   36|  1.59k|#define TAG WINPR_TAG("sspi.NTLM")
  |  |  ------------------
  |  |  |  |   25|  1.59k|#define WINPR_TAG(tag) "com.winpr." tag
  |  |  ------------------
  ------------------
              	if (!Stream_CheckAndLogRequiredCapacityEx(TAG, WLOG_WARN, s, 4ull, 1ull,
  ------------------
  |  |   45|  1.59k|#define WLOG_WARN 3
  ------------------
  |  Branch (446:6): [True: 0, False: 1.59k]
  ------------------
  447|  1.59k|	                                          "%s(%s:%" PRIuz ") %s::NegotiateFlags", __func__,
  448|  1.59k|	                                          __FILE__, (size_t)__LINE__, name))
  449|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  450|       |
  451|  1.59k|	WLog_DBG(TAG, "Write flags %s", ntlm_negotiate_flags_string(buffer, ARRAYSIZE(buffer), flags));
  ------------------
  |  |  332|  1.59k|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   43|  1.59k|#define WLOG_DEBUG 1
  |  |  ------------------
  ------------------
  452|  1.59k|	Stream_Write_UINT32(s, flags); /* NegotiateFlags (4 bytes) */
  ------------------
  |  | 1071|  1.59k|	do                                           \
  |  | 1072|  1.59k|	{                                            \
  |  | 1073|  1.59k|		WINPR_ASSERT((v) <= UINT32_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1074|  1.59k|		WINPR_ASSERT((v) >= 0);                  \
  |  |  ------------------
  |  |  |  |   76|  1.59k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.59k|	do                                                                                             \
  |  |  |  |  |  |   61|  1.59k|	{                                                                                              \
  |  |  |  |  |  |   62|  1.59k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  1.59k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  1.59k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  1.59k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  1.59k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  1.59k|                                                                                                   \
  |  |  |  |  |  |   70|  1.59k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  1.59k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  1.59k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  1.59k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  1.59k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  1.59k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.59k|                                                                                                   \
  |  |  |  |  |  |   72|  1.59k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  1.59k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  1.59k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  1.59k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 1.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1075|  1.59k|		Stream_Write_UINT32_unchecked((s), (v)); \
  |  | 1076|  1.59k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (1076:11): [Folded, False: 1.59k]
  |  |  ------------------
  ------------------
  453|  1.59k|	return TRUE;
  ------------------
  |  |  117|  1.59k|#define TRUE true
  ------------------
  454|  1.59k|}
ntlm_message.c:ntlm_write_message_fields:
  317|  3.46k|{
  318|  3.46k|	UINT16 MaxLen = 0;
  319|  3.46k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  320|  3.46k|	WINPR_ASSERT(fields);
  ------------------
  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  321|       |
  322|  3.46k|	MaxLen = fields->MaxLen;
  323|  3.46k|	if (fields->MaxLen < 1)
  ------------------
  |  Branch (323:6): [True: 3.46k, False: 0]
  ------------------
  324|  3.46k|		MaxLen = fields->Len;
  325|       |
  326|  3.46k|	if (!NTLM_CheckAndLogRequiredCapacity(TAG, (s), 8, "NTLM_MESSAGE_FIELDS::header"))
  ------------------
  |  |   39|  3.46k|	Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, 1, "%s(%s:%" PRIuz ") " what, \
  |  |  ------------------
  |  |  |  |   45|  3.46k|#define WLOG_WARN 3
  |  |  ------------------
  |  |   40|  3.46k|	                                     __func__, __FILE__, (size_t)__LINE__)
  ------------------
  |  Branch (326:6): [True: 0, False: 3.46k]
  ------------------
  327|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  328|       |
  329|  3.46k|	Stream_Write_UINT16(s, fields->Len);          /* Len (2 bytes) */
  ------------------
  |  |  909|  3.46k|	do                                           \
  |  |  910|  3.46k|	{                                            \
  |  |  911|  3.46k|		WINPR_ASSERT((v) <= UINT16_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  912|  3.46k|		WINPR_ASSERT((v) >= 0);                  \
  |  |  ------------------
  |  |  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  913|  3.46k|		Stream_Write_UINT16_unchecked((s), (v)); \
  |  |  914|  3.46k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (914:11): [Folded, False: 3.46k]
  |  |  ------------------
  ------------------
  330|  3.46k|	Stream_Write_UINT16(s, MaxLen);               /* MaxLen (2 bytes) */
  ------------------
  |  |  909|  3.46k|	do                                           \
  |  |  910|  3.46k|	{                                            \
  |  |  911|  3.46k|		WINPR_ASSERT((v) <= UINT16_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  912|  3.46k|		WINPR_ASSERT((v) >= 0);                  \
  |  |  ------------------
  |  |  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  913|  3.46k|		Stream_Write_UINT16_unchecked((s), (v)); \
  |  |  914|  3.46k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (914:11): [Folded, False: 3.46k]
  |  |  ------------------
  ------------------
  331|  3.46k|	Stream_Write_UINT32(s, fields->BufferOffset); /* BufferOffset (4 bytes) */
  ------------------
  |  | 1071|  3.46k|	do                                           \
  |  | 1072|  3.46k|	{                                            \
  |  | 1073|  3.46k|		WINPR_ASSERT((v) <= UINT32_MAX);         \
  |  |  ------------------
  |  |  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1074|  3.46k|		WINPR_ASSERT((v) >= 0);                  \
  |  |  ------------------
  |  |  |  |   76|  3.46k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.46k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.46k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.46k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.46k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.46k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.46k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.46k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.46k|                                                                                                   \
  |  |  |  |  |  |   70|  3.46k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.46k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.46k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.46k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.46k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.46k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.46k|                                                                                                   \
  |  |  |  |  |  |   72|  3.46k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.46k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.46k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.46k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1075|  3.46k|		Stream_Write_UINT32_unchecked((s), (v)); \
  |  | 1076|  3.46k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (1076:11): [Folded, False: 3.46k]
  |  |  ------------------
  ------------------
  332|  3.46k|	return TRUE;
  ------------------
  |  |  117|  3.46k|#define TRUE true
  ------------------
  333|  3.46k|}
ntlm_message.c:ntlm_free_message_fields_buffer:
  400|  11.2k|{
  401|  11.2k|	if (fields)
  ------------------
  |  Branch (401:6): [True: 11.2k, False: 0]
  ------------------
  402|  11.2k|	{
  403|  11.2k|		if (fields->Buffer)
  ------------------
  |  Branch (403:7): [True: 968, False: 10.2k]
  ------------------
  404|    968|		{
  405|    968|			free(fields->Buffer);
  406|    968|			fields->Len = 0;
  407|    968|			fields->MaxLen = 0;
  408|    968|			fields->Buffer = nullptr;
  409|    968|			fields->BufferOffset = 0;
  410|    968|		}
  411|  11.2k|	}
  412|  11.2k|}
ntlm_message.c:ntlm_write_message_fields_buffer:
  383|  1.33k|{
  384|  1.33k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  1.33k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.33k|	do                                                                                             \
  |  |  |  |   61|  1.33k|	{                                                                                              \
  |  |  |  |   62|  1.33k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.33k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.33k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.33k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.33k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.33k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.33k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.33k|                                                                                                   \
  |  |  |  |   70|  1.33k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.33k|	do                                                      \
  |  |  |  |  |  |   32|  1.33k|	{                                                       \
  |  |  |  |  |  |   33|  1.33k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.33k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.33k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.33k|                                                                                                   \
  |  |  |  |   72|  1.33k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.33k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.33k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.33k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|  1.33k|	WINPR_ASSERT(fields);
  ------------------
  |  |   76|  1.33k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.33k|	do                                                                                             \
  |  |  |  |   61|  1.33k|	{                                                                                              \
  |  |  |  |   62|  1.33k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.33k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.33k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.33k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.33k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.33k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.33k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.33k|                                                                                                   \
  |  |  |  |   70|  1.33k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.33k|	do                                                      \
  |  |  |  |  |  |   32|  1.33k|	{                                                       \
  |  |  |  |  |  |   33|  1.33k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.33k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.33k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.33k|                                                                                                   \
  |  |  |  |   72|  1.33k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.33k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.33k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.33k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  386|       |
  387|  1.33k|	if (fields->Len > 0)
  ------------------
  |  Branch (387:6): [True: 1.33k, False: 0]
  ------------------
  388|  1.33k|	{
  389|  1.33k|		if (!Stream_SetPosition(s, fields->BufferOffset))
  ------------------
  |  Branch (389:7): [True: 0, False: 1.33k]
  ------------------
  390|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  391|  1.33k|		if (!NTLM_CheckAndLogRequiredCapacity(TAG, (s), fields->Len, "NTLM_MESSAGE_FIELDS::Len"))
  ------------------
  |  |   39|  1.33k|	Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, 1, "%s(%s:%" PRIuz ") " what, \
  |  |  ------------------
  |  |  |  |   45|  1.33k|#define WLOG_WARN 3
  |  |  ------------------
  |  |   40|  1.33k|	                                     __func__, __FILE__, (size_t)__LINE__)
  ------------------
  |  Branch (391:7): [True: 14, False: 1.32k]
  ------------------
  392|     14|			return FALSE;
  ------------------
  |  |  113|     14|#define FALSE false
  ------------------
  393|       |
  394|  1.32k|		Stream_Write(s, fields->Buffer, fields->Len);
  395|  1.32k|	}
  396|  1.32k|	return TRUE;
  ------------------
  |  |  117|  1.32k|#define TRUE true
  ------------------
  397|  1.33k|}
ntlm_message.c:ntlm_read_message_integrity_check:
  458|     95|{
  459|     95|	WINPR_ASSERT(s);
  ------------------
  |  |   76|     95|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     95|	do                                                                                             \
  |  |  |  |   61|     95|	{                                                                                              \
  |  |  |  |   62|     95|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     95|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     95|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     95|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     95|                                                                                                   \
  |  |  |  |   70|     95|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     95|	do                                                      \
  |  |  |  |  |  |   32|     95|	{                                                       \
  |  |  |  |  |  |   33|     95|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     95|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     95|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     95|                                                                                                   \
  |  |  |  |   72|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     95|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     95|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     95|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 95]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  460|     95|	WINPR_ASSERT(offset);
  ------------------
  |  |   76|     95|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     95|	do                                                                                             \
  |  |  |  |   61|     95|	{                                                                                              \
  |  |  |  |   62|     95|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     95|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     95|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     95|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     95|                                                                                                   \
  |  |  |  |   70|     95|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     95|	do                                                      \
  |  |  |  |  |  |   32|     95|	{                                                       \
  |  |  |  |  |  |   33|     95|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     95|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     95|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     95|                                                                                                   \
  |  |  |  |   72|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     95|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     95|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     95|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 95]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  461|     95|	WINPR_ASSERT(data);
  ------------------
  |  |   76|     95|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     95|	do                                                                                             \
  |  |  |  |   61|     95|	{                                                                                              \
  |  |  |  |   62|     95|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     95|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     95|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     95|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     95|                                                                                                   \
  |  |  |  |   70|     95|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     95|	do                                                      \
  |  |  |  |  |  |   32|     95|	{                                                       \
  |  |  |  |  |  |   33|     95|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     95|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     95|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     95|                                                                                                   \
  |  |  |  |   72|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     95|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     95|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     95|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 95]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  462|     95|	WINPR_ASSERT(size == WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |   76|     95|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     95|	do                                                                                             \
  |  |  |  |   61|     95|	{                                                                                              \
  |  |  |  |   62|     95|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     95|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     95|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     95|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     95|                                                                                                   \
  |  |  |  |   70|     95|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     95|	do                                                      \
  |  |  |  |  |  |   32|     95|	{                                                       \
  |  |  |  |  |  |   33|     95|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     95|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     95|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     95|                                                                                                   \
  |  |  |  |   72|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     95|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     95|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     95|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 95]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  463|     95|	WINPR_ASSERT(name);
  ------------------
  |  |   76|     95|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     95|	do                                                                                             \
  |  |  |  |   61|     95|	{                                                                                              \
  |  |  |  |   62|     95|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     95|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     95|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     95|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     95|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     95|                                                                                                   \
  |  |  |  |   70|     95|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     95|	do                                                      \
  |  |  |  |  |  |   32|     95|	{                                                       \
  |  |  |  |  |  |   33|     95|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     95|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     95|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 95]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     95|                                                                                                   \
  |  |  |  |   72|     95|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     95|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     95|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     95|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 95]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  464|       |
  465|     95|	*offset = Stream_GetPosition(s);
  466|       |
  467|     95|	if (!Stream_CheckAndLogRequiredLength(TAG, s, size))
  ------------------
  |  |  128|     95|	Stream_CheckAndLogRequiredLengthOfSize(tag, s, len, 1)
  |  |  ------------------
  |  |  |  |  125|     95|	Stream_CheckAndLogRequiredLengthEx(tag, WLOG_WARN, s, nmemb, size, "%s(%s:%" PRIuz ")", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     95|#define WLOG_WARN 3
  |  |  |  |  ------------------
  |  |  |  |  126|     95|	                                   __func__, __FILE__, (size_t)__LINE__)
  |  |  ------------------
  ------------------
  |  Branch (467:6): [True: 2, False: 93]
  ------------------
  468|      2|		return FALSE;
  ------------------
  |  |  113|      2|#define FALSE false
  ------------------
  469|       |
  470|     93|	Stream_Read(s, data, size);
  471|     93|	return TRUE;
  ------------------
  |  |  117|     93|#define TRUE true
  ------------------
  472|     95|}
ntlm_message.c:ntlm_write_message_integrity_check:
  476|    120|{
  477|    120|	WINPR_ASSERT(s);
  ------------------
  |  |   76|    120|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    120|	do                                                                                             \
  |  |  |  |   61|    120|	{                                                                                              \
  |  |  |  |   62|    120|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    120|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    120|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    120|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    120|                                                                                                   \
  |  |  |  |   70|    120|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    120|	do                                                      \
  |  |  |  |  |  |   32|    120|	{                                                       \
  |  |  |  |  |  |   33|    120|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    120|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    120|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    120|                                                                                                   \
  |  |  |  |   72|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    120|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    120|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    120|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 120]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  478|    120|	WINPR_ASSERT(data);
  ------------------
  |  |   76|    120|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    120|	do                                                                                             \
  |  |  |  |   61|    120|	{                                                                                              \
  |  |  |  |   62|    120|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    120|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    120|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    120|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    120|                                                                                                   \
  |  |  |  |   70|    120|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    120|	do                                                      \
  |  |  |  |  |  |   32|    120|	{                                                       \
  |  |  |  |  |  |   33|    120|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    120|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    120|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    120|                                                                                                   \
  |  |  |  |   72|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    120|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    120|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    120|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 120]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  479|    120|	WINPR_ASSERT(size == WINPR_MD5_DIGEST_LENGTH);
  ------------------
  |  |   76|    120|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    120|	do                                                                                             \
  |  |  |  |   61|    120|	{                                                                                              \
  |  |  |  |   62|    120|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    120|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    120|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    120|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    120|                                                                                                   \
  |  |  |  |   70|    120|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    120|	do                                                      \
  |  |  |  |  |  |   32|    120|	{                                                       \
  |  |  |  |  |  |   33|    120|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    120|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    120|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    120|                                                                                                   \
  |  |  |  |   72|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    120|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    120|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    120|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 120]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|    120|	WINPR_ASSERT(name);
  ------------------
  |  |   76|    120|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    120|	do                                                                                             \
  |  |  |  |   61|    120|	{                                                                                              \
  |  |  |  |   62|    120|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    120|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    120|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    120|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    120|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    120|                                                                                                   \
  |  |  |  |   70|    120|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    120|	do                                                      \
  |  |  |  |  |  |   32|    120|	{                                                       \
  |  |  |  |  |  |   33|    120|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    120|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    120|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 120]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    120|                                                                                                   \
  |  |  |  |   72|    120|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    120|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    120|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    120|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 120]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  481|       |
  482|    120|	const size_t pos = Stream_GetPosition(s);
  483|       |
  484|    120|	if (!NTLM_CheckAndLogRequiredCapacity(TAG, s, offset, "MessageIntegrityCheck::offset"))
  ------------------
  |  |   39|    120|	Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, 1, "%s(%s:%" PRIuz ") " what, \
  |  |  ------------------
  |  |  |  |   45|    120|#define WLOG_WARN 3
  |  |  ------------------
  |  |   40|    120|	                                     __func__, __FILE__, (size_t)__LINE__)
  ------------------
  |  Branch (484:6): [True: 4, False: 116]
  ------------------
  485|      4|		return FALSE;
  ------------------
  |  |  113|      4|#define FALSE false
  ------------------
  486|       |
  487|    116|	if (!Stream_SetPosition(s, offset))
  ------------------
  |  Branch (487:6): [True: 0, False: 116]
  ------------------
  488|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  489|    116|	if (!NTLM_CheckAndLogRequiredCapacity(TAG, s, size, "MessageIntegrityCheck::size"))
  ------------------
  |  |   39|    116|	Stream_CheckAndLogRequiredCapacityEx(tag, WLOG_WARN, s, nmemb, 1, "%s(%s:%" PRIuz ") " what, \
  |  |  ------------------
  |  |  |  |   45|    116|#define WLOG_WARN 3
  |  |  ------------------
  |  |   40|    116|	                                     __func__, __FILE__, (size_t)__LINE__)
  ------------------
  |  Branch (489:6): [True: 0, False: 116]
  ------------------
  490|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  491|       |
  492|    116|	Stream_Write(s, data, size);
  493|    116|	return Stream_SetPosition(s, pos);
  494|    116|}

NEGOTIATE_init:
 1767|      1|{
 1768|      1|	InitializeConstWCharFromUtf8(NEGOTIATE_SecPkgInfoA.Name, NEGOTIATE_SecPkgInfoW_NameBuffer,
 1769|      1|	                             ARRAYSIZE(NEGOTIATE_SecPkgInfoW_NameBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1770|      1|	InitializeConstWCharFromUtf8(NEGOTIATE_SecPkgInfoA.Comment, NEGOTIATE_SecPkgInfoW_CommentBuffer,
 1771|      1|	                             ARRAYSIZE(NEGOTIATE_SecPkgInfoW_CommentBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1772|       |
 1773|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
 1774|      1|}

SCHANNEL_init:
  468|      1|{
  469|      1|	InitializeConstWCharFromUtf8(SCHANNEL_SecPkgInfoA.Name, SCHANNEL_SecPkgInfoW_NameBuffer,
  470|      1|	                             ARRAYSIZE(SCHANNEL_SecPkgInfoW_NameBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  471|      1|	InitializeConstWCharFromUtf8(SCHANNEL_SecPkgInfoA.Comment, SCHANNEL_SecPkgInfoW_CommentBuffer,
  472|      1|	                             ARRAYSIZE(SCHANNEL_SecPkgInfoW_CommentBuffer));
  ------------------
  |  |  966|      1|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      1|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      1|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  473|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  474|      1|}

GetSecurityStatusString:
  218|  1.13k|{
  219|  1.13k|	switch (status)
  220|  1.13k|	{
  221|      0|		case SEC_E_OK:
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (221:3): [True: 0, False: 1.13k]
  ------------------
  222|      0|			return "SEC_E_OK";
  223|       |
  224|      0|		case SEC_E_INSUFFICIENT_MEMORY:
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (224:3): [True: 0, False: 1.13k]
  ------------------
  225|      0|			return "SEC_E_INSUFFICIENT_MEMORY";
  226|       |
  227|      0|		case SEC_E_INVALID_HANDLE:
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (227:3): [True: 0, False: 1.13k]
  ------------------
  228|      0|			return "SEC_E_INVALID_HANDLE";
  229|       |
  230|      0|		case SEC_E_UNSUPPORTED_FUNCTION:
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (230:3): [True: 0, False: 1.13k]
  ------------------
  231|      0|			return "SEC_E_UNSUPPORTED_FUNCTION";
  232|       |
  233|      0|		case SEC_E_TARGET_UNKNOWN:
  ------------------
  |  |  137|      0|#define SEC_E_TARGET_UNKNOWN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090303)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (233:3): [True: 0, False: 1.13k]
  ------------------
  234|      0|			return "SEC_E_TARGET_UNKNOWN";
  235|       |
  236|    468|		case SEC_E_INTERNAL_ERROR:
  ------------------
  |  |  138|    468|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|    468|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (236:3): [True: 468, False: 670]
  ------------------
  237|    468|			return "SEC_E_INTERNAL_ERROR";
  238|       |
  239|      0|		case SEC_E_SECPKG_NOT_FOUND:
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (239:3): [True: 0, False: 1.13k]
  ------------------
  240|      0|			return "SEC_E_SECPKG_NOT_FOUND";
  241|       |
  242|      0|		case SEC_E_NOT_OWNER:
  ------------------
  |  |  140|      0|#define SEC_E_NOT_OWNER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090306)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (242:3): [True: 0, False: 1.13k]
  ------------------
  243|      0|			return "SEC_E_NOT_OWNER";
  244|       |
  245|      0|		case SEC_E_CANNOT_INSTALL:
  ------------------
  |  |  141|      0|#define SEC_E_CANNOT_INSTALL WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090307)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (245:3): [True: 0, False: 1.13k]
  ------------------
  246|      0|			return "SEC_E_CANNOT_INSTALL";
  247|       |
  248|    439|		case SEC_E_INVALID_TOKEN:
  ------------------
  |  |  142|    439|#define SEC_E_INVALID_TOKEN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090308)
  |  |  ------------------
  |  |  |  |   33|    439|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (248:3): [True: 439, False: 699]
  ------------------
  249|    439|			return "SEC_E_INVALID_TOKEN";
  250|       |
  251|      0|		case SEC_E_CANNOT_PACK:
  ------------------
  |  |  143|      0|#define SEC_E_CANNOT_PACK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090309)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (251:3): [True: 0, False: 1.13k]
  ------------------
  252|      0|			return "SEC_E_CANNOT_PACK";
  253|       |
  254|      0|		case SEC_E_QOP_NOT_SUPPORTED:
  ------------------
  |  |  144|      0|#define SEC_E_QOP_NOT_SUPPORTED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030A)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (254:3): [True: 0, False: 1.13k]
  ------------------
  255|      0|			return "SEC_E_QOP_NOT_SUPPORTED";
  256|       |
  257|      0|		case SEC_E_NO_IMPERSONATION:
  ------------------
  |  |  145|      0|#define SEC_E_NO_IMPERSONATION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030B)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (257:3): [True: 0, False: 1.13k]
  ------------------
  258|      0|			return "SEC_E_NO_IMPERSONATION";
  259|       |
  260|    150|		case SEC_E_LOGON_DENIED:
  ------------------
  |  |  146|    150|#define SEC_E_LOGON_DENIED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030C)
  |  |  ------------------
  |  |  |  |   33|    150|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (260:3): [True: 150, False: 988]
  ------------------
  261|    150|			return "SEC_E_LOGON_DENIED";
  262|       |
  263|      0|		case SEC_E_UNKNOWN_CREDENTIALS:
  ------------------
  |  |  147|      0|#define SEC_E_UNKNOWN_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (263:3): [True: 0, False: 1.13k]
  ------------------
  264|      0|			return "SEC_E_UNKNOWN_CREDENTIALS";
  265|       |
  266|      0|		case SEC_E_NO_CREDENTIALS:
  ------------------
  |  |  148|      0|#define SEC_E_NO_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030E)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (266:3): [True: 0, False: 1.13k]
  ------------------
  267|      0|			return "SEC_E_NO_CREDENTIALS";
  268|       |
  269|     81|		case SEC_E_MESSAGE_ALTERED:
  ------------------
  |  |  149|     81|#define SEC_E_MESSAGE_ALTERED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009030F)
  |  |  ------------------
  |  |  |  |   33|     81|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (269:3): [True: 81, False: 1.05k]
  ------------------
  270|     81|			return "SEC_E_MESSAGE_ALTERED";
  271|       |
  272|      0|		case SEC_E_OUT_OF_SEQUENCE:
  ------------------
  |  |  150|      0|#define SEC_E_OUT_OF_SEQUENCE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090310)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (272:3): [True: 0, False: 1.13k]
  ------------------
  273|      0|			return "SEC_E_OUT_OF_SEQUENCE";
  274|       |
  275|      0|		case SEC_E_NO_AUTHENTICATING_AUTHORITY:
  ------------------
  |  |  151|      0|#define SEC_E_NO_AUTHENTICATING_AUTHORITY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090311)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (275:3): [True: 0, False: 1.13k]
  ------------------
  276|      0|			return "SEC_E_NO_AUTHENTICATING_AUTHORITY";
  277|       |
  278|      0|		case SEC_E_BAD_PKGID:
  ------------------
  |  |  152|      0|#define SEC_E_BAD_PKGID WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090316)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (278:3): [True: 0, False: 1.13k]
  ------------------
  279|      0|			return "SEC_E_BAD_PKGID";
  280|       |
  281|      0|		case SEC_E_CONTEXT_EXPIRED:
  ------------------
  |  |  153|      0|#define SEC_E_CONTEXT_EXPIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090317)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (281:3): [True: 0, False: 1.13k]
  ------------------
  282|      0|			return "SEC_E_CONTEXT_EXPIRED";
  283|       |
  284|      0|		case SEC_E_INCOMPLETE_MESSAGE:
  ------------------
  |  |  154|      0|#define SEC_E_INCOMPLETE_MESSAGE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090318)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (284:3): [True: 0, False: 1.13k]
  ------------------
  285|      0|			return "SEC_E_INCOMPLETE_MESSAGE";
  286|       |
  287|      0|		case SEC_E_INCOMPLETE_CREDENTIALS:
  ------------------
  |  |  155|      0|#define SEC_E_INCOMPLETE_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090320)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (287:3): [True: 0, False: 1.13k]
  ------------------
  288|      0|			return "SEC_E_INCOMPLETE_CREDENTIALS";
  289|       |
  290|      0|		case SEC_E_BUFFER_TOO_SMALL:
  ------------------
  |  |  156|      0|#define SEC_E_BUFFER_TOO_SMALL WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090321)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (290:3): [True: 0, False: 1.13k]
  ------------------
  291|      0|			return "SEC_E_BUFFER_TOO_SMALL";
  292|       |
  293|      0|		case SEC_E_WRONG_PRINCIPAL:
  ------------------
  |  |  157|      0|#define SEC_E_WRONG_PRINCIPAL WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090322)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (293:3): [True: 0, False: 1.13k]
  ------------------
  294|      0|			return "SEC_E_WRONG_PRINCIPAL";
  295|       |
  296|      0|		case SEC_E_TIME_SKEW:
  ------------------
  |  |  158|      0|#define SEC_E_TIME_SKEW WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090324)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (296:3): [True: 0, False: 1.13k]
  ------------------
  297|      0|			return "SEC_E_TIME_SKEW";
  298|       |
  299|      0|		case SEC_E_UNTRUSTED_ROOT:
  ------------------
  |  |  159|      0|#define SEC_E_UNTRUSTED_ROOT WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090325)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (299:3): [True: 0, False: 1.13k]
  ------------------
  300|      0|			return "SEC_E_UNTRUSTED_ROOT";
  301|       |
  302|      0|		case SEC_E_ILLEGAL_MESSAGE:
  ------------------
  |  |  160|      0|#define SEC_E_ILLEGAL_MESSAGE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090326)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (302:3): [True: 0, False: 1.13k]
  ------------------
  303|      0|			return "SEC_E_ILLEGAL_MESSAGE";
  304|       |
  305|      0|		case SEC_E_CERT_UNKNOWN:
  ------------------
  |  |  161|      0|#define SEC_E_CERT_UNKNOWN WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090327)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (305:3): [True: 0, False: 1.13k]
  ------------------
  306|      0|			return "SEC_E_CERT_UNKNOWN";
  307|       |
  308|      0|		case SEC_E_CERT_EXPIRED:
  ------------------
  |  |  162|      0|#define SEC_E_CERT_EXPIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090328)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (308:3): [True: 0, False: 1.13k]
  ------------------
  309|      0|			return "SEC_E_CERT_EXPIRED";
  310|       |
  311|      0|		case SEC_E_ENCRYPT_FAILURE:
  ------------------
  |  |  163|      0|#define SEC_E_ENCRYPT_FAILURE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090329)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (311:3): [True: 0, False: 1.13k]
  ------------------
  312|      0|			return "SEC_E_ENCRYPT_FAILURE";
  313|       |
  314|      0|		case SEC_E_DECRYPT_FAILURE:
  ------------------
  |  |  164|      0|#define SEC_E_DECRYPT_FAILURE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090330)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (314:3): [True: 0, False: 1.13k]
  ------------------
  315|      0|			return "SEC_E_DECRYPT_FAILURE";
  316|       |
  317|      0|		case SEC_E_ALGORITHM_MISMATCH:
  ------------------
  |  |  165|      0|#define SEC_E_ALGORITHM_MISMATCH WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090331)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (317:3): [True: 0, False: 1.13k]
  ------------------
  318|      0|			return "SEC_E_ALGORITHM_MISMATCH";
  319|       |
  320|      0|		case SEC_E_SECURITY_QOS_FAILED:
  ------------------
  |  |  166|      0|#define SEC_E_SECURITY_QOS_FAILED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090332)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (320:3): [True: 0, False: 1.13k]
  ------------------
  321|      0|			return "SEC_E_SECURITY_QOS_FAILED";
  322|       |
  323|      0|		case SEC_E_UNFINISHED_CONTEXT_DELETED:
  ------------------
  |  |  167|      0|#define SEC_E_UNFINISHED_CONTEXT_DELETED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090333)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (323:3): [True: 0, False: 1.13k]
  ------------------
  324|      0|			return "SEC_E_UNFINISHED_CONTEXT_DELETED";
  325|       |
  326|      0|		case SEC_E_NO_TGT_REPLY:
  ------------------
  |  |  168|      0|#define SEC_E_NO_TGT_REPLY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090334)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (326:3): [True: 0, False: 1.13k]
  ------------------
  327|      0|			return "SEC_E_NO_TGT_REPLY";
  328|       |
  329|      0|		case SEC_E_NO_IP_ADDRESSES:
  ------------------
  |  |  169|      0|#define SEC_E_NO_IP_ADDRESSES WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090335)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (329:3): [True: 0, False: 1.13k]
  ------------------
  330|      0|			return "SEC_E_NO_IP_ADDRESSES";
  331|       |
  332|      0|		case SEC_E_WRONG_CREDENTIAL_HANDLE:
  ------------------
  |  |  170|      0|#define SEC_E_WRONG_CREDENTIAL_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090336)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (332:3): [True: 0, False: 1.13k]
  ------------------
  333|      0|			return "SEC_E_WRONG_CREDENTIAL_HANDLE";
  334|       |
  335|      0|		case SEC_E_CRYPTO_SYSTEM_INVALID:
  ------------------
  |  |  171|      0|#define SEC_E_CRYPTO_SYSTEM_INVALID WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090337)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (335:3): [True: 0, False: 1.13k]
  ------------------
  336|      0|			return "SEC_E_CRYPTO_SYSTEM_INVALID";
  337|       |
  338|      0|		case SEC_E_MAX_REFERRALS_EXCEEDED:
  ------------------
  |  |  172|      0|#define SEC_E_MAX_REFERRALS_EXCEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090338)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (338:3): [True: 0, False: 1.13k]
  ------------------
  339|      0|			return "SEC_E_MAX_REFERRALS_EXCEEDED";
  340|       |
  341|      0|		case SEC_E_MUST_BE_KDC:
  ------------------
  |  |  173|      0|#define SEC_E_MUST_BE_KDC WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090339)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (341:3): [True: 0, False: 1.13k]
  ------------------
  342|      0|			return "SEC_E_MUST_BE_KDC";
  343|       |
  344|      0|		case SEC_E_STRONG_CRYPTO_NOT_SUPPORTED:
  ------------------
  |  |  174|      0|#define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009033A)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (344:3): [True: 0, False: 1.13k]
  ------------------
  345|      0|			return "SEC_E_STRONG_CRYPTO_NOT_SUPPORTED";
  346|       |
  347|      0|		case SEC_E_TOO_MANY_PRINCIPALS:
  ------------------
  |  |  175|      0|#define SEC_E_TOO_MANY_PRINCIPALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009033B)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (347:3): [True: 0, False: 1.13k]
  ------------------
  348|      0|			return "SEC_E_TOO_MANY_PRINCIPALS";
  349|       |
  350|      0|		case SEC_E_NO_PA_DATA:
  ------------------
  |  |  176|      0|#define SEC_E_NO_PA_DATA WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009033C)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (350:3): [True: 0, False: 1.13k]
  ------------------
  351|      0|			return "SEC_E_NO_PA_DATA";
  352|       |
  353|      0|		case SEC_E_PKINIT_NAME_MISMATCH:
  ------------------
  |  |  177|      0|#define SEC_E_PKINIT_NAME_MISMATCH WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009033D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (353:3): [True: 0, False: 1.13k]
  ------------------
  354|      0|			return "SEC_E_PKINIT_NAME_MISMATCH";
  355|       |
  356|      0|		case SEC_E_SMARTCARD_LOGON_REQUIRED:
  ------------------
  |  |  178|      0|#define SEC_E_SMARTCARD_LOGON_REQUIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009033E)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (356:3): [True: 0, False: 1.13k]
  ------------------
  357|      0|			return "SEC_E_SMARTCARD_LOGON_REQUIRED";
  358|       |
  359|      0|		case SEC_E_SHUTDOWN_IN_PROGRESS:
  ------------------
  |  |  179|      0|#define SEC_E_SHUTDOWN_IN_PROGRESS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009033F)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (359:3): [True: 0, False: 1.13k]
  ------------------
  360|      0|			return "SEC_E_SHUTDOWN_IN_PROGRESS";
  361|       |
  362|      0|		case SEC_E_KDC_INVALID_REQUEST:
  ------------------
  |  |  180|      0|#define SEC_E_KDC_INVALID_REQUEST WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090340)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (362:3): [True: 0, False: 1.13k]
  ------------------
  363|      0|			return "SEC_E_KDC_INVALID_REQUEST";
  364|       |
  365|      0|		case SEC_E_KDC_UNABLE_TO_REFER:
  ------------------
  |  |  181|      0|#define SEC_E_KDC_UNABLE_TO_REFER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090341)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (365:3): [True: 0, False: 1.13k]
  ------------------
  366|      0|			return "SEC_E_KDC_UNABLE_TO_REFER";
  367|       |
  368|      0|		case SEC_E_KDC_UNKNOWN_ETYPE:
  ------------------
  |  |  182|      0|#define SEC_E_KDC_UNKNOWN_ETYPE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090342)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (368:3): [True: 0, False: 1.13k]
  ------------------
  369|      0|			return "SEC_E_KDC_UNKNOWN_ETYPE";
  370|       |
  371|      0|		case SEC_E_UNSUPPORTED_PREAUTH:
  ------------------
  |  |  183|      0|#define SEC_E_UNSUPPORTED_PREAUTH WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090343)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (371:3): [True: 0, False: 1.13k]
  ------------------
  372|      0|			return "SEC_E_UNSUPPORTED_PREAUTH";
  373|       |
  374|      0|		case SEC_E_DELEGATION_REQUIRED:
  ------------------
  |  |  184|      0|#define SEC_E_DELEGATION_REQUIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090345)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (374:3): [True: 0, False: 1.13k]
  ------------------
  375|      0|			return "SEC_E_DELEGATION_REQUIRED";
  376|       |
  377|      0|		case SEC_E_BAD_BINDINGS:
  ------------------
  |  |  185|      0|#define SEC_E_BAD_BINDINGS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090346)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (377:3): [True: 0, False: 1.13k]
  ------------------
  378|      0|			return "SEC_E_BAD_BINDINGS";
  379|       |
  380|      0|		case SEC_E_MULTIPLE_ACCOUNTS:
  ------------------
  |  |  186|      0|#define SEC_E_MULTIPLE_ACCOUNTS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090347)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (380:3): [True: 0, False: 1.13k]
  ------------------
  381|      0|			return "SEC_E_MULTIPLE_ACCOUNTS";
  382|       |
  383|      0|		case SEC_E_NO_KERB_KEY:
  ------------------
  |  |  187|      0|#define SEC_E_NO_KERB_KEY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090348)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (383:3): [True: 0, False: 1.13k]
  ------------------
  384|      0|			return "SEC_E_NO_KERB_KEY";
  385|       |
  386|      0|		case SEC_E_CERT_WRONG_USAGE:
  ------------------
  |  |  188|      0|#define SEC_E_CERT_WRONG_USAGE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090349)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (386:3): [True: 0, False: 1.13k]
  ------------------
  387|      0|			return "SEC_E_CERT_WRONG_USAGE";
  388|       |
  389|      0|		case SEC_E_DOWNGRADE_DETECTED:
  ------------------
  |  |  189|      0|#define SEC_E_DOWNGRADE_DETECTED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090350)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (389:3): [True: 0, False: 1.13k]
  ------------------
  390|      0|			return "SEC_E_DOWNGRADE_DETECTED";
  391|       |
  392|      0|		case SEC_E_SMARTCARD_CERT_REVOKED:
  ------------------
  |  |  190|      0|#define SEC_E_SMARTCARD_CERT_REVOKED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090351)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (392:3): [True: 0, False: 1.13k]
  ------------------
  393|      0|			return "SEC_E_SMARTCARD_CERT_REVOKED";
  394|       |
  395|      0|		case SEC_E_ISSUING_CA_UNTRUSTED:
  ------------------
  |  |  191|      0|#define SEC_E_ISSUING_CA_UNTRUSTED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090352)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (395:3): [True: 0, False: 1.13k]
  ------------------
  396|      0|			return "SEC_E_ISSUING_CA_UNTRUSTED";
  397|       |
  398|      0|		case SEC_E_REVOCATION_OFFLINE_C:
  ------------------
  |  |  192|      0|#define SEC_E_REVOCATION_OFFLINE_C WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090353)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (398:3): [True: 0, False: 1.13k]
  ------------------
  399|      0|			return "SEC_E_REVOCATION_OFFLINE_C";
  400|       |
  401|      0|		case SEC_E_PKINIT_CLIENT_FAILURE:
  ------------------
  |  |  193|      0|#define SEC_E_PKINIT_CLIENT_FAILURE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090354)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (401:3): [True: 0, False: 1.13k]
  ------------------
  402|      0|			return "SEC_E_PKINIT_CLIENT_FAILURE";
  403|       |
  404|      0|		case SEC_E_SMARTCARD_CERT_EXPIRED:
  ------------------
  |  |  194|      0|#define SEC_E_SMARTCARD_CERT_EXPIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090355)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (404:3): [True: 0, False: 1.13k]
  ------------------
  405|      0|			return "SEC_E_SMARTCARD_CERT_EXPIRED";
  406|       |
  407|      0|		case SEC_E_NO_S4U_PROT_SUPPORT:
  ------------------
  |  |  195|      0|#define SEC_E_NO_S4U_PROT_SUPPORT WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090356)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (407:3): [True: 0, False: 1.13k]
  ------------------
  408|      0|			return "SEC_E_NO_S4U_PROT_SUPPORT";
  409|       |
  410|      0|		case SEC_E_CROSSREALM_DELEGATION_FAILURE:
  ------------------
  |  |  196|      0|#define SEC_E_CROSSREALM_DELEGATION_FAILURE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090357)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (410:3): [True: 0, False: 1.13k]
  ------------------
  411|      0|			return "SEC_E_CROSSREALM_DELEGATION_FAILURE";
  412|       |
  413|      0|		case SEC_E_REVOCATION_OFFLINE_KDC:
  ------------------
  |  |  197|      0|#define SEC_E_REVOCATION_OFFLINE_KDC WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090358)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (413:3): [True: 0, False: 1.13k]
  ------------------
  414|      0|			return "SEC_E_REVOCATION_OFFLINE_KDC";
  415|       |
  416|      0|		case SEC_E_ISSUING_CA_UNTRUSTED_KDC:
  ------------------
  |  |  198|      0|#define SEC_E_ISSUING_CA_UNTRUSTED_KDC WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090359)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (416:3): [True: 0, False: 1.13k]
  ------------------
  417|      0|			return "SEC_E_ISSUING_CA_UNTRUSTED_KDC";
  418|       |
  419|      0|		case SEC_E_KDC_CERT_EXPIRED:
  ------------------
  |  |  199|      0|#define SEC_E_KDC_CERT_EXPIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035A)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (419:3): [True: 0, False: 1.13k]
  ------------------
  420|      0|			return "SEC_E_KDC_CERT_EXPIRED";
  421|       |
  422|      0|		case SEC_E_KDC_CERT_REVOKED:
  ------------------
  |  |  200|      0|#define SEC_E_KDC_CERT_REVOKED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035B)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (422:3): [True: 0, False: 1.13k]
  ------------------
  423|      0|			return "SEC_E_KDC_CERT_REVOKED";
  424|       |
  425|      0|		case SEC_E_INVALID_PARAMETER:
  ------------------
  |  |  201|      0|#define SEC_E_INVALID_PARAMETER WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035D)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (425:3): [True: 0, False: 1.13k]
  ------------------
  426|      0|			return "SEC_E_INVALID_PARAMETER";
  427|       |
  428|      0|		case SEC_E_DELEGATION_POLICY:
  ------------------
  |  |  202|      0|#define SEC_E_DELEGATION_POLICY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035E)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (428:3): [True: 0, False: 1.13k]
  ------------------
  429|      0|			return "SEC_E_DELEGATION_POLICY";
  430|       |
  431|      0|		case SEC_E_POLICY_NLTM_ONLY:
  ------------------
  |  |  203|      0|#define SEC_E_POLICY_NLTM_ONLY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x8009035F)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (431:3): [True: 0, False: 1.13k]
  ------------------
  432|      0|			return "SEC_E_POLICY_NLTM_ONLY";
  433|       |
  434|      0|		case SEC_E_NO_CONTEXT:
  ------------------
  |  |  204|      0|#define SEC_E_NO_CONTEXT WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090361)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (434:3): [True: 0, False: 1.13k]
  ------------------
  435|      0|			return "SEC_E_NO_CONTEXT";
  436|       |
  437|      0|		case SEC_E_PKU2U_CERT_FAILURE:
  ------------------
  |  |  205|      0|#define SEC_E_PKU2U_CERT_FAILURE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090362)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (437:3): [True: 0, False: 1.13k]
  ------------------
  438|      0|			return "SEC_E_PKU2U_CERT_FAILURE";
  439|       |
  440|      0|		case SEC_E_MUTUAL_AUTH_FAILED:
  ------------------
  |  |  206|      0|#define SEC_E_MUTUAL_AUTH_FAILED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090363)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (440:3): [True: 0, False: 1.13k]
  ------------------
  441|      0|			return "SEC_E_MUTUAL_AUTH_FAILED";
  442|       |
  443|      0|		case SEC_I_CONTINUE_NEEDED:
  ------------------
  |  |  208|      0|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (443:3): [True: 0, False: 1.13k]
  ------------------
  444|      0|			return "SEC_I_CONTINUE_NEEDED";
  445|       |
  446|      0|		case SEC_I_COMPLETE_NEEDED:
  ------------------
  |  |  209|      0|#define SEC_I_COMPLETE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090313)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (446:3): [True: 0, False: 1.13k]
  ------------------
  447|      0|			return "SEC_I_COMPLETE_NEEDED";
  448|       |
  449|      0|		case SEC_I_COMPLETE_AND_CONTINUE:
  ------------------
  |  |  210|      0|#define SEC_I_COMPLETE_AND_CONTINUE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090314)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (449:3): [True: 0, False: 1.13k]
  ------------------
  450|      0|			return "SEC_I_COMPLETE_AND_CONTINUE";
  451|       |
  452|      0|		case SEC_I_LOCAL_LOGON:
  ------------------
  |  |  211|      0|#define SEC_I_LOCAL_LOGON WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090315)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (452:3): [True: 0, False: 1.13k]
  ------------------
  453|      0|			return "SEC_I_LOCAL_LOGON";
  454|       |
  455|      0|		case SEC_I_CONTEXT_EXPIRED:
  ------------------
  |  |  212|      0|#define SEC_I_CONTEXT_EXPIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090317)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (455:3): [True: 0, False: 1.13k]
  ------------------
  456|      0|			return "SEC_I_CONTEXT_EXPIRED";
  457|       |
  458|      0|		case SEC_I_INCOMPLETE_CREDENTIALS:
  ------------------
  |  |  213|      0|#define SEC_I_INCOMPLETE_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090320)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (458:3): [True: 0, False: 1.13k]
  ------------------
  459|      0|			return "SEC_I_INCOMPLETE_CREDENTIALS";
  460|       |
  461|      0|		case SEC_I_RENEGOTIATE:
  ------------------
  |  |  214|      0|#define SEC_I_RENEGOTIATE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090321)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (461:3): [True: 0, False: 1.13k]
  ------------------
  462|      0|			return "SEC_I_RENEGOTIATE";
  463|       |
  464|      0|		case SEC_I_NO_LSA_CONTEXT:
  ------------------
  |  |  215|      0|#define SEC_I_NO_LSA_CONTEXT WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090323)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (464:3): [True: 0, False: 1.13k]
  ------------------
  465|      0|			return "SEC_I_NO_LSA_CONTEXT";
  466|       |
  467|      0|		case SEC_I_SIGNATURE_NEEDED:
  ------------------
  |  |  216|      0|#define SEC_I_SIGNATURE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x0009035C)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (467:3): [True: 0, False: 1.13k]
  ------------------
  468|      0|			return "SEC_I_SIGNATURE_NEEDED";
  469|       |
  470|      0|		case SEC_I_NO_RENEGOTIATION:
  ------------------
  |  |  217|      0|#define SEC_I_NO_RENEGOTIATION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090360)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (470:3): [True: 0, False: 1.13k]
  ------------------
  471|      0|			return "SEC_I_NO_RENEGOTIATION";
  472|      0|		default:
  ------------------
  |  Branch (472:3): [True: 0, False: 1.13k]
  ------------------
  473|      0|			break;
  474|  1.13k|	}
  475|       |
  476|      0|	return NtStatus2Tag(status);
  477|  1.13k|}
IsSecurityStatusError:
  480|  11.6k|{
  481|  11.6k|	BOOL error = TRUE;
  ------------------
  |  |  117|  11.6k|#define TRUE true
  ------------------
  482|       |
  483|  11.6k|	switch (status)
  484|  11.6k|	{
  485|  5.77k|		case SEC_E_OK:
  ------------------
  |  |  133|  5.77k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  5.77k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (485:3): [True: 5.77k, False: 5.85k]
  ------------------
  486|  9.35k|		case SEC_I_CONTINUE_NEEDED:
  ------------------
  |  |  208|  9.35k|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (486:3): [True: 3.58k, False: 8.05k]
  ------------------
  487|  9.35k|		case SEC_I_COMPLETE_NEEDED:
  ------------------
  |  |  209|  9.35k|#define SEC_I_COMPLETE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090313)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (487:3): [True: 0, False: 11.6k]
  ------------------
  488|  9.35k|		case SEC_I_COMPLETE_AND_CONTINUE:
  ------------------
  |  |  210|  9.35k|#define SEC_I_COMPLETE_AND_CONTINUE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090314)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (488:3): [True: 0, False: 11.6k]
  ------------------
  489|  9.35k|		case SEC_I_LOCAL_LOGON:
  ------------------
  |  |  211|  9.35k|#define SEC_I_LOCAL_LOGON WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090315)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (489:3): [True: 0, False: 11.6k]
  ------------------
  490|  9.35k|		case SEC_I_CONTEXT_EXPIRED:
  ------------------
  |  |  212|  9.35k|#define SEC_I_CONTEXT_EXPIRED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090317)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (490:3): [True: 0, False: 11.6k]
  ------------------
  491|  9.35k|		case SEC_I_INCOMPLETE_CREDENTIALS:
  ------------------
  |  |  213|  9.35k|#define SEC_I_INCOMPLETE_CREDENTIALS WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090320)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (491:3): [True: 0, False: 11.6k]
  ------------------
  492|  9.35k|		case SEC_I_RENEGOTIATE:
  ------------------
  |  |  214|  9.35k|#define SEC_I_RENEGOTIATE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090321)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (492:3): [True: 0, False: 11.6k]
  ------------------
  493|  9.35k|		case SEC_I_NO_LSA_CONTEXT:
  ------------------
  |  |  215|  9.35k|#define SEC_I_NO_LSA_CONTEXT WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090323)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (493:3): [True: 0, False: 11.6k]
  ------------------
  494|  9.35k|		case SEC_I_SIGNATURE_NEEDED:
  ------------------
  |  |  216|  9.35k|#define SEC_I_SIGNATURE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x0009035C)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (494:3): [True: 0, False: 11.6k]
  ------------------
  495|  9.35k|		case SEC_I_NO_RENEGOTIATION:
  ------------------
  |  |  217|  9.35k|#define SEC_I_NO_RENEGOTIATION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090360)
  |  |  ------------------
  |  |  |  |   33|  9.35k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (495:3): [True: 0, False: 11.6k]
  ------------------
  496|  9.35k|			error = FALSE;
  ------------------
  |  |  113|  9.35k|#define FALSE false
  ------------------
  497|  9.35k|			break;
  498|  2.27k|		default:
  ------------------
  |  Branch (498:3): [True: 2.27k, False: 9.35k]
  ------------------
  499|  2.27k|			break;
  500|  11.6k|	}
  501|       |
  502|  11.6k|	return error;
  503|  11.6k|}
InitSecurityInterfaceExA:
  514|  1.71k|{
  515|  1.71k|	if (!InitOnceExecuteOnce(&g_Initialized, InitializeSspiModuleInt, &flags, nullptr))
  ------------------
  |  |  424|  1.71k|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
  |  Branch (515:6): [True: 0, False: 1.71k]
  ------------------
  516|      0|		return nullptr;
  517|  1.71k|	WLog_Print(g_Log, WLOG_DEBUG, "InitSecurityInterfaceExA");
  ------------------
  |  |  247|  1.71k|	do                                                           \
  |  |  248|  1.71k|	{                                                            \
  |  |  249|  1.71k|		if (WLog_IsLevelActive(_log, _log_level))                \
  |  |  ------------------
  |  |  |  Branch (249:7): [True: 1.71k, False: 0]
  |  |  ------------------
  |  |  250|  1.71k|		{                                                        \
  |  |  251|  1.71k|			WLog_Print_unchecked(_log, _log_level, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |  241|  1.71k|	do                                                                                      \
  |  |  |  |  242|  1.71k|	{                                                                                       \
  |  |  |  |  243|  1.71k|		WLog_PrintTextMessage(_log, _log_level, __LINE__, __FILE__, __func__, __VA_ARGS__); \
  |  |  |  |  244|  1.71k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:11): [Folded, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  252|  1.71k|		}                                                        \
  |  |  253|  1.71k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (253:11): [Folded, False: 1.71k]
  |  |  ------------------
  ------------------
  518|  1.71k|	return g_SspiA;
  519|  1.71k|}
sspi_FreeAuthIdentity:
  971|  2.00k|{
  972|  2.00k|	if (!identity)
  ------------------
  |  Branch (972:6): [True: 0, False: 2.00k]
  ------------------
  973|      0|		return;
  974|       |
  975|  2.00k|	const BOOL wc = (identity->Flags & SEC_WINNT_AUTH_IDENTITY_UNICODE) != 0;
  ------------------
  |  |  664|  2.00k|#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
  ------------------
  976|  2.00k|	zfree(identity->User, identity->UserLength, wc);
  977|  2.00k|	zfree(identity->Domain, identity->DomainLength, wc);
  978|       |
  979|       |	/* identity->PasswordLength does have a dual use. In Pass The Hash (PTH) mode the maximum
  980|       |	 * password length (512) is added to the real length to mark this as a hash. when we free up
  981|       |	 * this field without removing these additional bytes we would corrupt the stack.
  982|       |	 */
  983|  2.00k|	size_t len = identity->PasswordLength;
  984|  2.00k|	if (len > SSPI_CREDENTIALS_HASH_LENGTH_OFFSET)
  ------------------
  |  |   29|  2.00k|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  |  Branch (984:6): [True: 0, False: 2.00k]
  ------------------
  985|      0|		len -= SSPI_CREDENTIALS_HASH_LENGTH_OFFSET;
  ------------------
  |  |   29|      0|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  986|  2.00k|	zfree(identity->Password, len, wc);
  987|       |
  988|  2.00k|	const SEC_WINNT_AUTH_IDENTITY empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  2.00k|	{                      \
  |  |   85|  2.00k|	} /** @since version 3.24.0 */
  ------------------
  989|  2.00k|	*identity = empty;
  990|  2.00k|}
sspi.c:InitializeSspiModuleInt:
  177|      1|{
  178|      1|	BOOL status = FALSE;
  ------------------
  |  |  113|      1|#define FALSE false
  ------------------
  179|       |#if defined(WITH_NATIVE_SSPI)
  180|       |	DWORD flags = 0;
  181|       |
  182|       |	if (param)
  183|       |		flags = *(DWORD*)param;
  184|       |
  185|       |#endif
  186|      1|	sspi_GlobalInit();
  187|      1|	g_Log = WLog_Get("com.winpr.sspi");
  188|       |#if defined(WITH_NATIVE_SSPI)
  189|       |
  190|       |	if (flags && (flags & SSPI_INTERFACE_NATIVE))
  191|       |	{
  192|       |		status = InitializeSspiModule_Native();
  193|       |	}
  194|       |	else if (flags && (flags & SSPI_INTERFACE_WINPR))
  195|       |	{
  196|       |		g_SspiW = winpr_InitSecurityInterfaceW();
  197|       |		g_SspiA = winpr_InitSecurityInterfaceA();
  198|       |		status = TRUE;
  199|       |	}
  200|       |
  201|       |	if (!status && ShouldUseNativeSspi())
  202|       |	{
  203|       |		status = InitializeSspiModule_Native();
  204|       |	}
  205|       |
  206|       |#endif
  207|       |
  208|      1|	if (!status)
  ------------------
  |  Branch (208:6): [True: 1, False: 0]
  ------------------
  209|      1|	{
  210|      1|		g_SspiW = winpr_InitSecurityInterfaceW();
  211|      1|		g_SspiA = winpr_InitSecurityInterfaceA();
  212|      1|	}
  213|       |
  214|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  215|      1|}
sspi.c:zfree:
  964|  6.00k|{
  965|  6.00k|	if (str)
  ------------------
  |  Branch (965:6): [True: 0, False: 6.00k]
  ------------------
  966|      0|		memset(str, 0, len * (isWCHAR ? sizeof(WCHAR) : sizeof(char)));
  ------------------
  |  Branch (966:25): [True: 0, False: 0]
  ------------------
  967|  6.00k|	free(str);
  968|  6.00k|}

sspi_ContextBufferAlloc:
  152|  1.71k|{
  153|  1.71k|	void* contextBuffer = nullptr;
  154|       |
  155|  2.19k|	for (UINT32 index = 0; index < ContextBufferAllocTable.cMaxEntries; index++)
  ------------------
  |  Branch (155:25): [True: 2.19k, False: 0]
  ------------------
  156|  2.19k|	{
  157|  2.19k|		if (!ContextBufferAllocTable.entries[index].contextBuffer)
  ------------------
  |  Branch (157:7): [True: 1.71k, False: 481]
  ------------------
  158|  1.71k|		{
  159|  1.71k|			contextBuffer = calloc(1, size);
  160|       |
  161|  1.71k|			if (!contextBuffer)
  ------------------
  |  Branch (161:8): [True: 0, False: 1.71k]
  ------------------
  162|      0|				return nullptr;
  163|       |
  164|  1.71k|			ContextBufferAllocTable.cEntries++;
  165|  1.71k|			ContextBufferAllocTable.entries[index].contextBuffer = contextBuffer;
  166|  1.71k|			ContextBufferAllocTable.entries[index].allocatorIndex = allocatorIndex;
  167|  1.71k|			return ContextBufferAllocTable.entries[index].contextBuffer;
  168|  1.71k|		}
  169|  2.19k|	}
  170|       |
  171|       |	/* no available entry was found, the table needs to be grown */
  172|       |
  173|      0|	if (sspi_ContextBufferAllocTableGrow() < 0)
  ------------------
  |  Branch (173:6): [True: 0, False: 0]
  ------------------
  174|      0|		return nullptr;
  175|       |
  176|       |	/* the next call to sspi_ContextBufferAlloc() should now succeed */
  177|      0|	return sspi_ContextBufferAlloc(allocatorIndex, size);
  178|      0|}
sspi_CredentialsNew:
  181|  1.71k|{
  182|  1.71k|	SSPI_CREDENTIALS* credentials = nullptr;
  183|  1.71k|	credentials = (SSPI_CREDENTIALS*)calloc(1, sizeof(SSPI_CREDENTIALS));
  184|  1.71k|	return credentials;
  185|  1.71k|}
sspi_CredentialsFree:
  188|  1.71k|{
  189|  1.71k|	size_t userLength = 0;
  190|  1.71k|	size_t domainLength = 0;
  191|  1.71k|	size_t passwordLength = 0;
  192|       |
  193|  1.71k|	if (!credentials)
  ------------------
  |  Branch (193:6): [True: 0, False: 1.71k]
  ------------------
  194|      0|		return;
  195|       |
  196|  1.71k|	if (credentials->ntlmSettings.samFile)
  ------------------
  |  Branch (196:6): [True: 0, False: 1.71k]
  ------------------
  197|      0|		free(credentials->ntlmSettings.samFile);
  198|       |
  199|  1.71k|	userLength = credentials->identity.UserLength;
  200|  1.71k|	domainLength = credentials->identity.DomainLength;
  201|  1.71k|	passwordLength = credentials->identity.PasswordLength;
  202|       |
  203|  1.71k|	if (passwordLength > SSPI_CREDENTIALS_HASH_LENGTH_OFFSET) /* [pth] */
  ------------------
  |  |   29|  1.71k|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  |  Branch (203:6): [True: 0, False: 1.71k]
  ------------------
  204|      0|		passwordLength -= SSPI_CREDENTIALS_HASH_LENGTH_OFFSET;
  ------------------
  |  |   29|      0|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  205|       |
  206|  1.71k|	if (credentials->identity.Flags & SEC_WINNT_AUTH_IDENTITY_UNICODE)
  ------------------
  |  |  664|  1.71k|#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
  ------------------
  |  Branch (206:6): [True: 1.00k, False: 715]
  ------------------
  207|  1.00k|	{
  208|  1.00k|		userLength *= 2;
  209|  1.00k|		domainLength *= 2;
  210|  1.00k|		passwordLength *= 2;
  211|  1.00k|	}
  212|       |
  213|  1.71k|	if (credentials->identity.User)
  ------------------
  |  Branch (213:6): [True: 1.04k, False: 674]
  ------------------
  214|  1.04k|		memset(credentials->identity.User, 0, userLength);
  215|  1.71k|	if (credentials->identity.Domain)
  ------------------
  |  Branch (215:6): [True: 1.05k, False: 666]
  ------------------
  216|  1.05k|		memset(credentials->identity.Domain, 0, domainLength);
  217|  1.71k|	if (credentials->identity.Password)
  ------------------
  |  Branch (217:6): [True: 1.00k, False: 715]
  ------------------
  218|  1.00k|		memset(credentials->identity.Password, 0, passwordLength);
  219|  1.71k|	free(credentials->identity.User);
  220|  1.71k|	free(credentials->identity.Domain);
  221|  1.71k|	free(credentials->identity.Password);
  222|  1.71k|	free(credentials);
  223|  1.71k|}
sspi_SecBufferAlloc:
  226|  4.70k|{
  227|  4.70k|	if (!SecBuffer)
  ------------------
  |  Branch (227:6): [True: 0, False: 4.70k]
  ------------------
  228|      0|		return nullptr;
  229|       |
  230|  4.70k|	SecBuffer->pvBuffer = calloc(1, size);
  231|       |
  232|  4.70k|	if (!SecBuffer->pvBuffer)
  ------------------
  |  Branch (232:6): [True: 0, False: 4.70k]
  ------------------
  233|      0|		return nullptr;
  234|       |
  235|  4.70k|	SecBuffer->cbBuffer = size;
  236|  4.70k|	return SecBuffer->pvBuffer;
  237|  4.70k|}
sspi_SecBufferFree:
  240|  13.1k|{
  241|  13.1k|	if (!SecBuffer)
  ------------------
  |  Branch (241:6): [True: 0, False: 13.1k]
  ------------------
  242|      0|		return;
  243|       |
  244|  13.1k|	if (SecBuffer->pvBuffer)
  ------------------
  |  Branch (244:6): [True: 6.00k, False: 7.11k]
  ------------------
  245|  6.00k|		memset(SecBuffer->pvBuffer, 0, SecBuffer->cbBuffer);
  246|       |
  247|  13.1k|	free(SecBuffer->pvBuffer);
  248|  13.1k|	SecBuffer->pvBuffer = nullptr;
  249|  13.1k|	SecBuffer->cbBuffer = 0;
  250|  13.1k|}
sspi_SecureHandleGetLowerPointer:
  264|  8.39k|{
  265|  8.39k|	void* pointer = nullptr;
  266|       |
  267|  8.39k|	if (!handle || !SecIsValidHandle(handle) || !handle->dwLower)
  ------------------
  |  |  833|  15.0k|	((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR)-1))) && \
  |  |  ------------------
  |  |  |  Branch (833:3): [True: 6.67k, False: 0]
  |  |  ------------------
  |  |  834|  15.0k|	 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)((INT_PTR)-1))))
  |  |  ------------------
  |  |  |  Branch (834:3): [True: 6.67k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (267:6): [True: 1.71k, False: 6.67k]
  |  Branch (267:46): [True: 0, False: 6.67k]
  ------------------
  268|  1.71k|		return nullptr;
  269|       |
  270|  6.67k|	pointer = (void*)~((size_t)handle->dwLower);
  271|  6.67k|	return pointer;
  272|  8.39k|}
sspi_SecureHandleInvalidate:
  275|  3.43k|{
  276|  3.43k|	if (!handle)
  ------------------
  |  Branch (276:6): [True: 0, False: 3.43k]
  ------------------
  277|      0|		return;
  278|       |
  279|  3.43k|	handle->dwLower = 0;
  280|  3.43k|	handle->dwUpper = 0;
  281|  3.43k|}
sspi_SecureHandleSetLowerPointer:
  284|  3.43k|{
  285|  3.43k|	if (!handle)
  ------------------
  |  Branch (285:6): [True: 0, False: 3.43k]
  ------------------
  286|      0|		return;
  287|       |
  288|  3.43k|	handle->dwLower = (ULONG_PTR)(~((size_t)pointer));
  289|  3.43k|}
sspi_SecureHandleGetUpperPointer:
  292|  6.67k|{
  293|  6.67k|	void* pointer = nullptr;
  294|       |
  295|  6.67k|	if (!handle || !SecIsValidHandle(handle) || !handle->dwUpper)
  ------------------
  |  |  833|  13.3k|	((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR)-1))) && \
  |  |  ------------------
  |  |  |  Branch (833:3): [True: 6.67k, False: 0]
  |  |  ------------------
  |  |  834|  13.3k|	 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)((INT_PTR)-1))))
  |  |  ------------------
  |  |  |  Branch (834:3): [True: 6.67k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (295:6): [True: 0, False: 6.67k]
  |  Branch (295:46): [True: 0, False: 6.67k]
  ------------------
  296|      0|		return nullptr;
  297|       |
  298|  6.67k|	pointer = (void*)~((size_t)handle->dwUpper);
  299|  6.67k|	return pointer;
  300|  6.67k|}
sspi_SecureHandleSetUpperPointer:
  303|  3.43k|{
  304|  3.43k|	if (!handle)
  ------------------
  |  Branch (304:6): [True: 0, False: 3.43k]
  ------------------
  305|      0|		return;
  306|       |
  307|  3.43k|	handle->dwUpper = (ULONG_PTR)(~((size_t)pointer));
  308|  3.43k|}
sspi_SetAuthIdentityWithLengthW:
  352|  1.00k|{
  353|  1.00k|	WINPR_ASSERT(identity);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  354|  1.00k|	sspi_FreeAuthIdentity(identity);
  355|  1.00k|	identity->Flags &= (uint32_t)~SEC_WINNT_AUTH_IDENTITY_ANSI;
  ------------------
  |  |  663|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
  ------------------
  356|  1.00k|	identity->Flags |= SEC_WINNT_AUTH_IDENTITY_UNICODE;
  ------------------
  |  |  664|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
  ------------------
  357|       |
  358|  1.00k|	if (!copy(&identity->User, &identity->UserLength, user, userLen))
  ------------------
  |  Branch (358:6): [True: 0, False: 1.00k]
  ------------------
  359|      0|		return -1;
  360|       |
  361|  1.00k|	if (!copy(&identity->Domain, &identity->DomainLength, domain, domainLen))
  ------------------
  |  Branch (361:6): [True: 0, False: 1.00k]
  ------------------
  362|      0|		return -1;
  363|       |
  364|  1.00k|	if (!copy(&identity->Password, &identity->PasswordLength, password, passwordLen))
  ------------------
  |  Branch (364:6): [True: 0, False: 1.00k]
  ------------------
  365|      0|		return -1;
  366|       |
  367|  1.00k|	return 1;
  368|  1.00k|}
sspi_SetAuthIdentityA:
  379|  1.00k|{
  380|  1.00k|	int rc = 0;
  381|  1.00k|	size_t unicodeUserLenW = 0;
  382|  1.00k|	size_t unicodeDomainLenW = 0;
  383|  1.00k|	size_t unicodePasswordLenW = 0;
  384|  1.00k|	LPWSTR unicodeUser = nullptr;
  385|  1.00k|	LPWSTR unicodeDomain = nullptr;
  386|  1.00k|	LPWSTR unicodePassword = nullptr;
  387|       |
  388|  1.00k|	if (user)
  ------------------
  |  Branch (388:6): [True: 1.00k, False: 0]
  ------------------
  389|  1.00k|		unicodeUser = ConvertUtf8ToWCharAlloc(user, &unicodeUserLenW);
  390|       |
  391|  1.00k|	if (domain)
  ------------------
  |  Branch (391:6): [True: 1.00k, False: 0]
  ------------------
  392|  1.00k|		unicodeDomain = ConvertUtf8ToWCharAlloc(domain, &unicodeDomainLenW);
  393|       |
  394|  1.00k|	if (password)
  ------------------
  |  Branch (394:6): [True: 1.00k, False: 0]
  ------------------
  395|  1.00k|		unicodePassword = ConvertUtf8ToWCharAlloc(password, &unicodePasswordLenW);
  396|       |
  397|  1.00k|	rc = sspi_SetAuthIdentityWithLengthW(identity, unicodeUser, unicodeUserLenW, unicodeDomain,
  398|  1.00k|	                                     unicodeDomainLenW, unicodePassword, unicodePasswordLenW);
  399|       |
  400|  1.00k|	zfree(unicodeUser, unicodeUserLenW);
  401|  1.00k|	zfree(unicodeDomain, unicodeDomainLenW);
  402|  1.00k|	zfree(unicodePassword, unicodePasswordLenW);
  403|  1.00k|	return rc;
  404|  1.00k|}
sspi_GetAuthIdentityVersion:
  407|  4.00k|{
  408|  4.00k|	UINT32 version = 0;
  409|       |
  410|  4.00k|	if (!identity)
  ------------------
  |  Branch (410:6): [True: 0, False: 4.00k]
  ------------------
  411|      0|		return 0;
  412|       |
  413|  4.00k|	version = *((const UINT32*)identity);
  414|       |
  415|  4.00k|	if ((version == SEC_WINNT_AUTH_IDENTITY_VERSION) ||
  ------------------
  |  |  713|  4.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200
  ------------------
  |  Branch (415:6): [True: 0, False: 4.00k]
  ------------------
  416|  4.00k|	    (version == SEC_WINNT_AUTH_IDENTITY_VERSION_2))
  ------------------
  |  |  756|  4.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION_2 0x201
  ------------------
  |  Branch (416:6): [True: 0, False: 4.00k]
  ------------------
  417|      0|	{
  418|      0|		return version;
  419|      0|	}
  420|       |
  421|  4.00k|	return 0; // SEC_WINNT_AUTH_IDENTITY (no version)
  422|  4.00k|}
sspi_GetAuthIdentityFlags:
  425|  2.00k|{
  426|  2.00k|	UINT32 version = 0;
  427|  2.00k|	UINT32 flags = 0;
  428|       |
  429|  2.00k|	if (!identity)
  ------------------
  |  Branch (429:6): [True: 0, False: 2.00k]
  ------------------
  430|      0|		return 0;
  431|       |
  432|  2.00k|	version = sspi_GetAuthIdentityVersion(identity);
  433|       |
  434|  2.00k|	if (version == SEC_WINNT_AUTH_IDENTITY_VERSION)
  ------------------
  |  |  713|  2.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200
  ------------------
  |  Branch (434:6): [True: 0, False: 2.00k]
  ------------------
  435|      0|	{
  436|      0|		flags = ((const SEC_WINNT_AUTH_IDENTITY_EX*)identity)->Flags;
  437|      0|	}
  438|  2.00k|	else if (version == SEC_WINNT_AUTH_IDENTITY_VERSION_2)
  ------------------
  |  |  756|  2.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION_2 0x201
  ------------------
  |  Branch (438:11): [True: 0, False: 2.00k]
  ------------------
  439|      0|	{
  440|      0|		flags = ((const SEC_WINNT_AUTH_IDENTITY_EX2*)identity)->Flags;
  441|      0|	}
  442|  2.00k|	else // SEC_WINNT_AUTH_IDENTITY
  443|  2.00k|	{
  444|  2.00k|		flags = ((const SEC_WINNT_AUTH_IDENTITY*)identity)->Flags;
  445|  2.00k|	}
  446|       |
  447|  2.00k|	return flags;
  448|  2.00k|}
sspi_GetAuthIdentityUserDomainW:
  452|  1.00k|{
  453|  1.00k|	UINT32 version = 0;
  454|       |
  455|  1.00k|	if (!identity)
  ------------------
  |  Branch (455:6): [True: 0, False: 1.00k]
  ------------------
  456|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  457|       |
  458|  1.00k|	version = sspi_GetAuthIdentityVersion(identity);
  459|       |
  460|  1.00k|	if (version == SEC_WINNT_AUTH_IDENTITY_VERSION)
  ------------------
  |  |  713|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200
  ------------------
  |  Branch (460:6): [True: 0, False: 1.00k]
  ------------------
  461|      0|	{
  462|      0|		const SEC_WINNT_AUTH_IDENTITY_EXW* id = (const SEC_WINNT_AUTH_IDENTITY_EXW*)identity;
  463|      0|		*pUser = (const WCHAR*)id->User;
  464|      0|		*pUserLength = id->UserLength;
  465|      0|		*pDomain = (const WCHAR*)id->Domain;
  466|      0|		*pDomainLength = id->DomainLength;
  467|      0|	}
  468|  1.00k|	else if (version == SEC_WINNT_AUTH_IDENTITY_VERSION_2)
  ------------------
  |  |  756|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION_2 0x201
  ------------------
  |  Branch (468:11): [True: 0, False: 1.00k]
  ------------------
  469|      0|	{
  470|      0|		const SEC_WINNT_AUTH_IDENTITY_EX2* id = (const SEC_WINNT_AUTH_IDENTITY_EX2*)identity;
  471|      0|		UINT32 UserOffset = id->UserOffset;
  472|      0|		UINT32 DomainOffset = id->DomainOffset;
  473|      0|		*pUser = (const WCHAR*)&((const uint8_t*)identity)[UserOffset];
  474|      0|		*pUserLength = id->UserLength / 2;
  475|      0|		*pDomain = (const WCHAR*)&((const uint8_t*)identity)[DomainOffset];
  476|      0|		*pDomainLength = id->DomainLength / 2;
  477|      0|	}
  478|  1.00k|	else // SEC_WINNT_AUTH_IDENTITY
  479|  1.00k|	{
  480|  1.00k|		const SEC_WINNT_AUTH_IDENTITY_W* id = (const SEC_WINNT_AUTH_IDENTITY_W*)identity;
  481|  1.00k|		*pUser = (const WCHAR*)id->User;
  482|  1.00k|		*pUserLength = id->UserLength;
  483|  1.00k|		*pDomain = (const WCHAR*)id->Domain;
  484|  1.00k|		*pDomainLength = id->DomainLength;
  485|  1.00k|	}
  486|       |
  487|  1.00k|	return TRUE;
  ------------------
  |  |  117|  1.00k|#define TRUE true
  ------------------
  488|  1.00k|}
sspi_GetAuthIdentityPasswordW:
  532|  1.00k|{
  533|  1.00k|	UINT32 version = 0;
  534|       |
  535|  1.00k|	if (!identity)
  ------------------
  |  Branch (535:6): [True: 0, False: 1.00k]
  ------------------
  536|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  537|       |
  538|  1.00k|	version = sspi_GetAuthIdentityVersion(identity);
  539|       |
  540|  1.00k|	if (version == SEC_WINNT_AUTH_IDENTITY_VERSION)
  ------------------
  |  |  713|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200
  ------------------
  |  Branch (540:6): [True: 0, False: 1.00k]
  ------------------
  541|      0|	{
  542|      0|		const SEC_WINNT_AUTH_IDENTITY_EXW* id = (const SEC_WINNT_AUTH_IDENTITY_EXW*)identity;
  543|      0|		*pPassword = (const WCHAR*)id->Password;
  544|      0|		*pPasswordLength = id->PasswordLength;
  545|      0|	}
  546|  1.00k|	else if (version == SEC_WINNT_AUTH_IDENTITY_VERSION_2)
  ------------------
  |  |  756|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_VERSION_2 0x201
  ------------------
  |  Branch (546:11): [True: 0, False: 1.00k]
  ------------------
  547|      0|	{
  548|      0|		return FALSE; // TODO: packed credentials
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  549|      0|	}
  550|  1.00k|	else // SEC_WINNT_AUTH_IDENTITY
  551|  1.00k|	{
  552|  1.00k|		const SEC_WINNT_AUTH_IDENTITY_W* id = (const SEC_WINNT_AUTH_IDENTITY_W*)identity;
  553|  1.00k|		*pPassword = (const WCHAR*)id->Password;
  554|  1.00k|		*pPasswordLength = id->PasswordLength;
  555|  1.00k|	}
  556|       |
  557|  1.00k|	return TRUE;
  ------------------
  |  |  117|  1.00k|#define TRUE true
  ------------------
  558|  1.00k|}
sspi_CopyAuthIdentity:
  843|  1.00k|{
  844|  1.00k|	int status = 0;
  845|  1.00k|	UINT32 identityFlags = 0;
  846|  1.00k|	const char* UserA = nullptr;
  847|  1.00k|	const char* DomainA = nullptr;
  848|  1.00k|	const char* PasswordA = nullptr;
  849|  1.00k|	const WCHAR* UserW = nullptr;
  850|  1.00k|	const WCHAR* DomainW = nullptr;
  851|  1.00k|	const WCHAR* PasswordW = nullptr;
  852|  1.00k|	UINT32 UserLength = 0;
  853|  1.00k|	UINT32 DomainLength = 0;
  854|  1.00k|	UINT32 PasswordLength = 0;
  855|       |
  856|  1.00k|	sspi_FreeAuthIdentity(identity);
  857|       |
  858|  1.00k|	identityFlags = sspi_GetAuthIdentityFlags(srcIdentity);
  859|       |
  860|  1.00k|	identity->Flags = identityFlags;
  861|       |
  862|  1.00k|	if (identityFlags & SEC_WINNT_AUTH_IDENTITY_ANSI)
  ------------------
  |  |  663|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
  ------------------
  |  Branch (862:6): [True: 0, False: 1.00k]
  ------------------
  863|      0|	{
  864|      0|		if (!sspi_GetAuthIdentityUserDomainA(srcIdentity, &UserA, &UserLength, &DomainA,
  ------------------
  |  Branch (864:7): [True: 0, False: 0]
  ------------------
  865|      0|		                                     &DomainLength))
  866|      0|		{
  867|      0|			return -1;
  868|      0|		}
  869|       |
  870|      0|		if (!sspi_GetAuthIdentityPasswordA(srcIdentity, &PasswordA, &PasswordLength))
  ------------------
  |  Branch (870:7): [True: 0, False: 0]
  ------------------
  871|      0|		{
  872|      0|			return -1;
  873|      0|		}
  874|       |
  875|      0|		status = sspi_SetAuthIdentity(identity, UserA, DomainA, PasswordA);
  ------------------
  |  | 1462|      0|#define sspi_SetAuthIdentity sspi_SetAuthIdentityA
  ------------------
  876|       |
  877|      0|		if (status <= 0)
  ------------------
  |  Branch (877:7): [True: 0, False: 0]
  ------------------
  878|      0|			return -1;
  879|       |
  880|      0|		identity->Flags &= (uint32_t)~SEC_WINNT_AUTH_IDENTITY_ANSI;
  ------------------
  |  |  663|      0|#define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
  ------------------
  881|      0|		identity->Flags |= SEC_WINNT_AUTH_IDENTITY_UNICODE;
  ------------------
  |  |  664|      0|#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
  ------------------
  882|      0|		return 1;
  883|      0|	}
  884|       |
  885|  1.00k|	identity->Flags |= SEC_WINNT_AUTH_IDENTITY_UNICODE;
  ------------------
  |  |  664|  1.00k|#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
  ------------------
  886|       |
  887|  1.00k|	if (!sspi_GetAuthIdentityUserDomainW(srcIdentity, &UserW, &UserLength, &DomainW, &DomainLength))
  ------------------
  |  Branch (887:6): [True: 0, False: 1.00k]
  ------------------
  888|      0|	{
  889|      0|		return -1;
  890|      0|	}
  891|       |
  892|  1.00k|	if (!sspi_GetAuthIdentityPasswordW(srcIdentity, &PasswordW, &PasswordLength))
  ------------------
  |  Branch (892:6): [True: 0, False: 1.00k]
  ------------------
  893|      0|	{
  894|      0|		return -1;
  895|      0|	}
  896|       |
  897|       |	/* login/password authentication */
  898|  1.00k|	identity->UserLength = UserLength;
  899|       |
  900|  1.00k|	if (identity->UserLength > 0)
  ------------------
  |  Branch (900:6): [True: 1.00k, False: 0]
  ------------------
  901|  1.00k|	{
  902|  1.00k|		identity->User = (UINT16*)calloc((identity->UserLength + 1), sizeof(WCHAR));
  903|       |
  904|  1.00k|		if (!identity->User)
  ------------------
  |  Branch (904:7): [True: 0, False: 1.00k]
  ------------------
  905|      0|			return -1;
  906|       |
  907|  1.00k|		CopyMemory(identity->User, UserW, identity->UserLength * sizeof(WCHAR));
  ------------------
  |  |  123|  1.00k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  908|  1.00k|		identity->User[identity->UserLength] = 0;
  909|  1.00k|	}
  910|       |
  911|  1.00k|	identity->DomainLength = DomainLength;
  912|       |
  913|  1.00k|	if (identity->DomainLength > 0)
  ------------------
  |  Branch (913:6): [True: 1.00k, False: 0]
  ------------------
  914|  1.00k|	{
  915|  1.00k|		identity->Domain = (UINT16*)calloc((identity->DomainLength + 1), sizeof(WCHAR));
  916|       |
  917|  1.00k|		if (!identity->Domain)
  ------------------
  |  Branch (917:7): [True: 0, False: 1.00k]
  ------------------
  918|      0|			return -1;
  919|       |
  920|  1.00k|		CopyMemory(identity->Domain, DomainW, identity->DomainLength * sizeof(WCHAR));
  ------------------
  |  |  123|  1.00k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  921|  1.00k|		identity->Domain[identity->DomainLength] = 0;
  922|  1.00k|	}
  923|       |
  924|  1.00k|	identity->PasswordLength = PasswordLength;
  925|       |
  926|  1.00k|	if (identity->PasswordLength > SSPI_CREDENTIALS_HASH_LENGTH_OFFSET)
  ------------------
  |  |   29|  1.00k|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  |  Branch (926:6): [True: 0, False: 1.00k]
  ------------------
  927|      0|		identity->PasswordLength -= SSPI_CREDENTIALS_HASH_LENGTH_OFFSET;
  ------------------
  |  |   29|      0|#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
  ------------------
  928|       |
  929|  1.00k|	if (PasswordW)
  ------------------
  |  Branch (929:6): [True: 1.00k, False: 0]
  ------------------
  930|  1.00k|	{
  931|  1.00k|		identity->Password = (UINT16*)calloc((identity->PasswordLength + 1), sizeof(WCHAR));
  932|       |
  933|  1.00k|		if (!identity->Password)
  ------------------
  |  Branch (933:7): [True: 0, False: 1.00k]
  ------------------
  934|      0|			return -1;
  935|       |
  936|  1.00k|		CopyMemory(identity->Password, PasswordW, identity->PasswordLength * sizeof(WCHAR));
  ------------------
  |  |  123|  1.00k|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  937|  1.00k|		identity->Password[identity->PasswordLength] = 0;
  938|  1.00k|	}
  939|       |
  940|  1.00k|	identity->PasswordLength = PasswordLength;
  941|       |	/* End of login/password authentication */
  942|  1.00k|	return 1;
  943|  1.00k|}
sspi_FindSecBuffer:
  946|  3.83k|{
  947|  3.83k|	PSecBuffer pSecBuffer = nullptr;
  948|       |
  949|  4.35k|	for (UINT32 index = 0; index < pMessage->cBuffers; index++)
  ------------------
  |  Branch (949:25): [True: 3.83k, False: 520]
  ------------------
  950|  3.83k|	{
  951|  3.83k|		if (pMessage->pBuffers[index].BufferType == BufferType)
  ------------------
  |  Branch (951:7): [True: 3.31k, False: 520]
  ------------------
  952|  3.31k|		{
  953|  3.31k|			pSecBuffer = &pMessage->pBuffers[index];
  954|  3.31k|			break;
  955|  3.31k|		}
  956|  3.83k|	}
  957|       |
  958|  3.83k|	return pSecBuffer;
  959|  3.83k|}
sspi_GlobalInit:
  993|      1|{
  994|      1|	static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
  ------------------
  |  |  402|      1|#define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
  |  |  ------------------
  |  |  |  |  377|      1|	{                     \
  |  |  |  |  378|      1|		0                 \
  |  |  |  |  379|      1|	}
  |  |  ------------------
  ------------------
  995|      1|	DWORD flags = 0;
  996|      1|	if (!InitOnceExecuteOnce(&once, sspi_init, &flags, nullptr))
  ------------------
  |  |  424|      1|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
  |  Branch (996:6): [True: 0, False: 1]
  ------------------
  997|      0|		WLog_ERR(TAG, "InitOnceExecuteOnce failed");
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  998|      1|}
sspi_ContextBufferFree:
 1057|  1.71k|{
 1058|  1.71k|	UINT32 allocatorIndex = 0;
 1059|       |
 1060|  8.58k|	for (size_t index = 0; index < ContextBufferAllocTable.cMaxEntries; index++)
  ------------------
  |  Branch (1060:25): [True: 6.86k, False: 1.71k]
  ------------------
 1061|  6.86k|	{
 1062|  6.86k|		if (contextBuffer == ContextBufferAllocTable.entries[index].contextBuffer)
  ------------------
  |  Branch (1062:7): [True: 1.71k, False: 5.14k]
  ------------------
 1063|  1.71k|		{
 1064|  1.71k|			contextBuffer = ContextBufferAllocTable.entries[index].contextBuffer;
 1065|  1.71k|			allocatorIndex = ContextBufferAllocTable.entries[index].allocatorIndex;
 1066|  1.71k|			ContextBufferAllocTable.cEntries--;
 1067|  1.71k|			ContextBufferAllocTable.entries[index].allocatorIndex = 0;
 1068|  1.71k|			ContextBufferAllocTable.entries[index].contextBuffer = nullptr;
 1069|       |
 1070|  1.71k|			switch (allocatorIndex)
 1071|  1.71k|			{
 1072|      0|				case EnumerateSecurityPackagesIndex:
  ------------------
  |  Branch (1072:5): [True: 0, False: 1.71k]
  ------------------
 1073|      0|					FreeContextBuffer_EnumerateSecurityPackages(contextBuffer);
 1074|      0|					break;
 1075|       |
 1076|  1.71k|				case QuerySecurityPackageInfoIndex:
  ------------------
  |  Branch (1076:5): [True: 1.71k, False: 0]
  ------------------
 1077|  1.71k|					FreeContextBuffer_QuerySecurityPackageInfo(contextBuffer);
 1078|  1.71k|					break;
 1079|      0|				default:
  ------------------
  |  Branch (1079:5): [True: 0, False: 1.71k]
  ------------------
 1080|      0|					break;
 1081|  1.71k|			}
 1082|  1.71k|		}
 1083|  6.86k|	}
 1084|  1.71k|}
winpr_InitSecurityInterfaceW:
 2064|      1|{
 2065|      1|	return &winpr_SecurityFunctionTableW;
 2066|      1|}
winpr_InitSecurityInterfaceA:
 2069|      1|{
 2070|      1|	return &winpr_SecurityFunctionTableA;
 2071|      1|}
sspi_winpr.c:copy:
  324|  3.00k|{
  325|  3.00k|	WINPR_ASSERT(dst);
  ------------------
  |  |   76|  3.00k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.00k|	do                                                                                             \
  |  |  |  |   61|  3.00k|	{                                                                                              \
  |  |  |  |   62|  3.00k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.00k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.00k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.00k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.00k|                                                                                                   \
  |  |  |  |   70|  3.00k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.00k|	do                                                      \
  |  |  |  |  |  |   32|  3.00k|	{                                                       \
  |  |  |  |  |  |   33|  3.00k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.00k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.00k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.00k|                                                                                                   \
  |  |  |  |   72|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.00k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.00k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.00k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  326|  3.00k|	WINPR_ASSERT(dstLen);
  ------------------
  |  |   76|  3.00k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.00k|	do                                                                                             \
  |  |  |  |   61|  3.00k|	{                                                                                              \
  |  |  |  |   62|  3.00k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.00k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.00k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.00k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.00k|                                                                                                   \
  |  |  |  |   70|  3.00k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.00k|	do                                                      \
  |  |  |  |  |  |   32|  3.00k|	{                                                       \
  |  |  |  |  |  |   33|  3.00k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.00k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.00k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.00k|                                                                                                   \
  |  |  |  |   72|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.00k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.00k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.00k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  327|       |
  328|  3.00k|	*dst = nullptr;
  329|  3.00k|	*dstLen = 0;
  330|       |
  331|  3.00k|	if (len > UINT32_MAX)
  ------------------
  |  Branch (331:6): [True: 0, False: 3.00k]
  ------------------
  332|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  333|       |
  334|       |	/* Case what="" and len=0 should allocate an empty string */
  335|  3.00k|	if (!what && (len != 0))
  ------------------
  |  Branch (335:6): [True: 0, False: 3.00k]
  |  Branch (335:15): [True: 0, False: 0]
  ------------------
  336|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  337|  3.00k|	if (!what && (len == 0))
  ------------------
  |  Branch (337:6): [True: 0, False: 3.00k]
  |  Branch (337:15): [True: 0, False: 0]
  ------------------
  338|      0|		return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  339|       |
  340|  3.00k|	*dst = calloc(sizeof(WCHAR), len + 1);
  341|  3.00k|	if (!*dst)
  ------------------
  |  Branch (341:6): [True: 0, False: 3.00k]
  ------------------
  342|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  343|       |
  344|  3.00k|	memcpy(*dst, what, len * sizeof(WCHAR));
  345|  3.00k|	*dstLen = WINPR_ASSERTING_INT_CAST(UINT32, len);
  ------------------
  |  |  112|  3.00k|	__extension__({                                                                             \
  |  |  113|  3.00k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  3.00k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  3.00k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.00k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.00k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.00k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.00k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.00k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.00k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.00k|                                                                                                   \
  |  |  |  |  |  |   70|  3.00k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.00k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.00k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  3.00k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.00k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.00k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.00k|                                                                                                   \
  |  |  |  |  |  |   72|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.00k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.00k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.00k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  3.00k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  3.00k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  3.00k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.00k|	do                                                                                             \
  |  |  |  |  |  |   61|  3.00k|	{                                                                                              \
  |  |  |  |  |  |   62|  3.00k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  3.00k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  3.00k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  3.00k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  3.00k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  3.00k|                                                                                                   \
  |  |  |  |  |  |   70|  3.00k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  3.00k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  3.00k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  9.00k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 3.00k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 3.00k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  3.00k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  3.00k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.00k|                                                                                                   \
  |  |  |  |  |  |   72|  3.00k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  3.00k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  3.00k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  3.00k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 3.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  3.00k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  3.00k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  3.00k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  3.00k|	})
  ------------------
  346|  3.00k|	return TRUE;
  ------------------
  |  |  117|  3.00k|#define TRUE true
  ------------------
  347|  3.00k|}
sspi_winpr.c:zfree:
  371|  3.00k|{
  372|  3.00k|	if (str)
  ------------------
  |  Branch (372:6): [True: 3.00k, False: 0]
  ------------------
  373|  3.00k|		memset(str, 0, len * sizeof(WCHAR));
  374|  3.00k|	free(str);
  375|  3.00k|}
sspi_winpr.c:sspi_init:
  975|      1|{
  976|      1|	if (!winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT))
  ------------------
  |  |   27|      1|#define WINPR_SSL_INIT_DEFAULT 0x00
  ------------------
  |  Branch (976:6): [True: 0, False: 1]
  ------------------
  977|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  978|      1|	sspi_ContextBufferAllocTableNew();
  979|      1|	if (!SCHANNEL_init())
  ------------------
  |  Branch (979:6): [True: 0, False: 1]
  ------------------
  980|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  981|      1|	if (!KERBEROS_init())
  ------------------
  |  Branch (981:6): [True: 0, False: 1]
  ------------------
  982|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  983|      1|	if (!NTLM_init())
  ------------------
  |  Branch (983:6): [True: 0, False: 1]
  ------------------
  984|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  985|      1|	if (!CREDSSP_init())
  ------------------
  |  Branch (985:6): [True: 0, False: 1]
  ------------------
  986|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  987|      1|	if (!NEGOTIATE_init())
  ------------------
  |  Branch (987:6): [True: 0, False: 1]
  ------------------
  988|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  989|      1|	return WINPR_init();
  990|      1|}
sspi_winpr.c:sspi_ContextBufferAllocTableNew:
  101|      1|{
  102|      1|	size_t size = 0;
  103|      1|	ContextBufferAllocTable.entries = nullptr;
  104|      1|	ContextBufferAllocTable.cEntries = 0;
  105|      1|	ContextBufferAllocTable.cMaxEntries = 4;
  106|      1|	size = sizeof(CONTEXT_BUFFER_ALLOC_ENTRY) * ContextBufferAllocTable.cMaxEntries;
  107|      1|	ContextBufferAllocTable.entries = (CONTEXT_BUFFER_ALLOC_ENTRY*)calloc(1, size);
  108|       |
  109|      1|	if (!ContextBufferAllocTable.entries)
  ------------------
  |  Branch (109:6): [True: 0, False: 1]
  ------------------
  110|      0|		return -1;
  111|       |
  112|      1|	return 1;
  113|      1|}
sspi_winpr.c:WINPR_init:
  962|      1|{
  963|       |
  964|      6|	for (size_t x = 0; x < ARRAYSIZE(SecurityFunctionTableA_NAME_LIST); x++)
  ------------------
  |  |  966|      6|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      6|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      6|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (964:21): [True: 5, False: 1]
  ------------------
  965|      5|	{
  966|      5|		const SecurityFunctionTableA_NAME* cur = &SecurityFunctionTableA_NAME_LIST[x];
  967|      5|		InitializeConstWCharFromUtf8(cur->Name, BUFFER_NAME_LIST_W[x],
  968|      5|		                             ARRAYSIZE(BUFFER_NAME_LIST_W[x]));
  ------------------
  |  |  966|      5|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|      5|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|      5|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  969|      5|	}
  970|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  971|      1|}
sspi_winpr.c:FreeContextBuffer_QuerySecurityPackageInfo:
 1241|  1.71k|{
 1242|  1.71k|	SecPkgInfo* pPackageInfo = (SecPkgInfo*)contextBuffer;
  ------------------
  |  |   96|  1.71k|#define SecPkgInfo SecPkgInfoA
  ------------------
 1243|       |
 1244|  1.71k|	if (!pPackageInfo)
  ------------------
  |  Branch (1244:6): [True: 0, False: 1.71k]
  ------------------
 1245|      0|		return;
 1246|       |
 1247|  1.71k|	free(pPackageInfo->Name);
 1248|  1.71k|	free(pPackageInfo->Comment);
 1249|  1.71k|	free(pPackageInfo);
 1250|  1.71k|}
sspi_winpr.c:log_status_:
 1255|  8.39k|{
 1256|  8.39k|	if (IsSecurityStatusError(status))
  ------------------
  |  Branch (1256:6): [True: 1.13k, False: 7.25k]
  ------------------
 1257|  1.13k|	{
 1258|  1.13k|		const DWORD level = WLOG_WARN;
  ------------------
  |  |   45|  1.13k|#define WLOG_WARN 3
  ------------------
 1259|  1.13k|		static wLog* log = nullptr;
 1260|  1.13k|		if (!log)
  ------------------
  |  Branch (1260:7): [True: 1, False: 1.13k]
  ------------------
 1261|      1|			log = WLog_Get(TAG);
  ------------------
  |  |   36|      1|#define TAG WINPR_TAG("sspi")
  |  |  ------------------
  |  |  |  |   25|      1|#define WINPR_TAG(tag) "com.winpr." tag
  |  |  ------------------
  ------------------
 1262|       |
 1263|  1.13k|		if (WLog_IsLevelActive(log, level))
  ------------------
  |  Branch (1263:7): [True: 1.13k, False: 0]
  ------------------
 1264|  1.13k|		{
 1265|  1.13k|			WLog_PrintTextMessage(log, level, line, file, fkt, "%s status %s [0x%08" PRIx32 "]",
 1266|  1.13k|			                      what, GetSecurityStatusString(status),
 1267|  1.13k|			                      WINPR_CXX_COMPAT_CAST(uint32_t, status));
  ------------------
  |  |   33|  1.13k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  ------------------
 1268|  1.13k|		}
 1269|  1.13k|	}
 1270|  8.39k|	return status;
 1271|  8.39k|}
sspi_winpr.c:winpr_FreeCredentialsHandle:
 1349|  1.71k|{
 1350|  1.71k|	char* Name = nullptr;
 1351|  1.71k|	SECURITY_STATUS status = 0;
 1352|  1.71k|	const SecurityFunctionTableA* table = nullptr;
 1353|  1.71k|	Name = (char*)sspi_SecureHandleGetUpperPointer(phCredential);
 1354|       |
 1355|  1.71k|	if (!Name)
  ------------------
  |  Branch (1355:6): [True: 0, False: 1.71k]
  ------------------
 1356|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1357|       |
 1358|  1.71k|	table = sspi_GetSecurityFunctionTableAByNameA(Name);
 1359|       |
 1360|  1.71k|	if (!table)
  ------------------
  |  Branch (1360:6): [True: 0, False: 1.71k]
  ------------------
 1361|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1362|       |
 1363|  1.71k|	if (!table->FreeCredentialsHandle)
  ------------------
  |  Branch (1363:6): [True: 0, False: 1.71k]
  ------------------
 1364|      0|	{
 1365|      0|		WLog_WARN(TAG, "Security module does not provide an implementation");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
 1366|      0|		return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1367|      0|	}
 1368|       |
 1369|  1.71k|	status = table->FreeCredentialsHandle(phCredential);
 1370|  1.71k|	return log_status("FreeCredentialsHandle", status);
  ------------------
  |  | 1252|  1.71k|#define log_status(what, status) log_status_((what), (status), __FILE__, __func__, __LINE__)
  ------------------
 1371|  1.71k|}
sspi_winpr.c:sspi_GetSecurityFunctionTableAByNameA:
 1006|  8.39k|{
 1007|  8.39k|	size_t cPackages = ARRAYSIZE(SecPkgInfoA_LIST);
  ------------------
  |  |  966|  8.39k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  8.39k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  8.39k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1008|       |
 1009|  8.39k|	for (size_t index = 0; index < cPackages; index++)
  ------------------
  |  Branch (1009:25): [True: 8.39k, False: 0]
  ------------------
 1010|  8.39k|	{
 1011|  8.39k|		if (strcmp(Name, SecurityFunctionTableA_NAME_LIST[index].Name) == 0)
  ------------------
  |  Branch (1011:7): [True: 8.39k, False: 0]
  ------------------
 1012|  8.39k|		{
 1013|  8.39k|			return SecurityFunctionTableA_NAME_LIST[index].SecurityFunctionTable;
  ------------------
  |  | 1224|  8.39k|#define SecurityFunctionTable SecurityFunctionTableA
  ------------------
 1014|  8.39k|		}
 1015|  8.39k|	}
 1016|       |
 1017|      0|	return nullptr;
 1018|  8.39k|}
sspi_winpr.c:winpr_AcceptSecurityContext:
 1539|  1.19k|{
 1540|  1.19k|	char* Name = nullptr;
 1541|  1.19k|	SECURITY_STATUS status = 0;
 1542|  1.19k|	const SecurityFunctionTableA* table = nullptr;
 1543|  1.19k|	Name = (char*)sspi_SecureHandleGetUpperPointer(phCredential);
 1544|       |
 1545|  1.19k|	if (!Name)
  ------------------
  |  Branch (1545:6): [True: 0, False: 1.19k]
  ------------------
 1546|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1547|       |
 1548|  1.19k|	table = sspi_GetSecurityFunctionTableAByNameA(Name);
 1549|       |
 1550|  1.19k|	if (!table)
  ------------------
  |  Branch (1550:6): [True: 0, False: 1.19k]
  ------------------
 1551|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1552|       |
 1553|  1.19k|	if (!table->AcceptSecurityContext)
  ------------------
  |  Branch (1553:6): [True: 0, False: 1.19k]
  ------------------
 1554|      0|	{
 1555|      0|		WLog_WARN(TAG, "Security module does not provide an implementation");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
 1556|      0|		return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1557|      0|	}
 1558|       |
 1559|  1.19k|	status =
 1560|  1.19k|	    table->AcceptSecurityContext(phCredential, phContext, pInput, fContextReq, TargetDataRep,
 1561|  1.19k|	                                 phNewContext, pOutput, pfContextAttr, ptsTimeStamp);
 1562|  1.19k|	return log_status("AcceptSecurityContext", status);
  ------------------
  |  | 1252|  1.19k|#define log_status(what, status) log_status_((what), (status), __FILE__, __func__, __LINE__)
  ------------------
 1563|  1.19k|}
sspi_winpr.c:winpr_DeleteSecurityContext:
 1618|  1.71k|{
 1619|  1.71k|	const char* Name = (char*)sspi_SecureHandleGetUpperPointer(phContext);
 1620|       |
 1621|  1.71k|	if (!Name)
  ------------------
  |  Branch (1621:6): [True: 0, False: 1.71k]
  ------------------
 1622|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1623|       |
 1624|  1.71k|	const SecurityFunctionTableA* table = sspi_GetSecurityFunctionTableAByNameA(Name);
 1625|       |
 1626|  1.71k|	if (!table)
  ------------------
  |  Branch (1626:6): [True: 0, False: 1.71k]
  ------------------
 1627|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1628|       |
 1629|  1.71k|	if (!table->DeleteSecurityContext)
  ------------------
  |  Branch (1629:6): [True: 0, False: 1.71k]
  ------------------
 1630|      0|	{
 1631|      0|		WLog_WARN(TAG, "Security module does not provide an implementation");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
 1632|      0|		return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1633|      0|	}
 1634|       |
 1635|  1.71k|	const SECURITY_STATUS status = table->DeleteSecurityContext(phContext);
 1636|  1.71k|	return log_status("DeleteSecurityContext", status);
  ------------------
  |  | 1252|  1.71k|#define log_status(what, status) log_status_((what), (status), __FILE__, __func__, __LINE__)
  ------------------
 1637|  1.71k|}
sspi_winpr.c:winpr_FreeContextBuffer:
 1640|  1.71k|{
 1641|  1.71k|	if (!pvContextBuffer)
  ------------------
  |  Branch (1641:6): [True: 0, False: 1.71k]
  ------------------
 1642|      0|		return SEC_E_INVALID_HANDLE;
  ------------------
  |  |  135|      0|#define SEC_E_INVALID_HANDLE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090301)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1643|       |
 1644|  1.71k|	sspi_ContextBufferFree(pvContextBuffer);
 1645|  1.71k|	return SEC_E_OK;
  ------------------
  |  |  133|  1.71k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.71k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1646|  1.71k|}
sspi_winpr.c:winpr_AcquireCredentialsHandleA:
 1302|  1.71k|{
 1303|  1.71k|	SECURITY_STATUS status = 0;
 1304|  1.71k|	const SecurityFunctionTableA* table = sspi_GetSecurityFunctionTableAByNameA(pszPackage);
 1305|       |
 1306|  1.71k|	if (!table)
  ------------------
  |  Branch (1306:6): [True: 0, False: 1.71k]
  ------------------
 1307|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1308|       |
 1309|  1.71k|	if (!table->AcquireCredentialsHandleA)
  ------------------
  |  Branch (1309:6): [True: 0, False: 1.71k]
  ------------------
 1310|      0|	{
 1311|      0|		WLog_WARN(TAG, "Security module does not provide an implementation");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
 1312|      0|		return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1313|      0|	}
 1314|       |
 1315|  1.71k|	status = table->AcquireCredentialsHandleA(pszPrincipal, pszPackage, fCredentialUse, pvLogonID,
 1316|  1.71k|	                                          pAuthData, pGetKeyFn, pvGetKeyArgument, phCredential,
 1317|  1.71k|	                                          ptsExpiry);
 1318|  1.71k|	return log_status("AcquireCredentialsHandleA", status);
  ------------------
  |  | 1252|  1.71k|#define log_status(what, status) log_status_((what), (status), __FILE__, __func__, __LINE__)
  ------------------
 1319|  1.71k|}
sspi_winpr.c:winpr_InitializeSecurityContextA:
 1707|  1.52k|{
 1708|  1.52k|	SEC_CHAR* Name = nullptr;
 1709|  1.52k|	SECURITY_STATUS status = 0;
 1710|  1.52k|	const SecurityFunctionTableA* table = nullptr;
 1711|  1.52k|	Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phCredential);
 1712|       |
 1713|  1.52k|	if (!Name)
  ------------------
  |  Branch (1713:6): [True: 0, False: 1.52k]
  ------------------
 1714|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1715|       |
 1716|  1.52k|	table = sspi_GetSecurityFunctionTableAByNameA(Name);
 1717|       |
 1718|  1.52k|	if (!table)
  ------------------
  |  Branch (1718:6): [True: 0, False: 1.52k]
  ------------------
 1719|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1720|       |
 1721|  1.52k|	if (!table->InitializeSecurityContextA)
  ------------------
  |  Branch (1721:6): [True: 0, False: 1.52k]
  ------------------
 1722|      0|	{
 1723|      0|		WLog_WARN(TAG, "Security module does not provide an implementation");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
 1724|      0|		return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1725|      0|	}
 1726|       |
 1727|  1.52k|	status = table->InitializeSecurityContextA(phCredential, phContext, pszTargetName, fContextReq,
 1728|  1.52k|	                                           Reserved1, TargetDataRep, pInput, Reserved2,
 1729|  1.52k|	                                           phNewContext, pOutput, pfContextAttr, ptsExpiry);
 1730|       |
 1731|  1.52k|	return log_status("InitializeSecurityContextA", status);
  ------------------
  |  | 1252|  1.52k|#define log_status(what, status) log_status_((what), (status), __FILE__, __func__, __LINE__)
  ------------------
 1732|  1.52k|}
sspi_winpr.c:winpr_QuerySecurityPackageInfoA:
 1204|  1.71k|{
 1205|  1.71k|	size_t cPackages = ARRAYSIZE(SecPkgInfoA_LIST);
  ------------------
  |  |  966|  1.71k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  1.71k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  1.71k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1206|       |
 1207|  1.71k|	for (size_t index = 0; index < cPackages; index++)
  ------------------
  |  Branch (1207:25): [True: 1.71k, False: 0]
  ------------------
 1208|  1.71k|	{
 1209|  1.71k|		if (strcmp(pszPackageName, SecPkgInfoA_LIST[index]->Name) == 0)
  ------------------
  |  Branch (1209:7): [True: 1.71k, False: 0]
  ------------------
 1210|  1.71k|		{
 1211|  1.71k|			size_t size = sizeof(SecPkgInfoA);
 1212|  1.71k|			SecPkgInfoA* pPackageInfo =
 1213|  1.71k|			    (SecPkgInfoA*)sspi_ContextBufferAlloc(QuerySecurityPackageInfoIndex, size);
 1214|       |
 1215|  1.71k|			if (!pPackageInfo)
  ------------------
  |  Branch (1215:8): [True: 0, False: 1.71k]
  ------------------
 1216|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1217|       |
 1218|  1.71k|			pPackageInfo->fCapabilities = SecPkgInfoA_LIST[index]->fCapabilities;
 1219|  1.71k|			pPackageInfo->wVersion = SecPkgInfoA_LIST[index]->wVersion;
 1220|  1.71k|			pPackageInfo->wRPCID = SecPkgInfoA_LIST[index]->wRPCID;
 1221|  1.71k|			pPackageInfo->cbMaxToken = SecPkgInfoA_LIST[index]->cbMaxToken;
 1222|  1.71k|			pPackageInfo->Name = _strdup(SecPkgInfoA_LIST[index]->Name);
 1223|  1.71k|			pPackageInfo->Comment = _strdup(SecPkgInfoA_LIST[index]->Comment);
 1224|       |
 1225|  1.71k|			if (!pPackageInfo->Name || !pPackageInfo->Comment)
  ------------------
  |  Branch (1225:8): [True: 0, False: 1.71k]
  |  Branch (1225:31): [True: 0, False: 1.71k]
  ------------------
 1226|      0|			{
 1227|      0|				sspi_ContextBufferFree(pPackageInfo);
 1228|      0|				return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1229|      0|			}
 1230|       |
 1231|  1.71k|			*(ppPackageInfo) = pPackageInfo;
 1232|  1.71k|			return SEC_E_OK;
  ------------------
  |  |  133|  1.71k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.71k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1233|  1.71k|		}
 1234|  1.71k|	}
 1235|       |
 1236|      0|	*(ppPackageInfo) = nullptr;
 1237|      0|	return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1238|  1.71k|}
sspi_winpr.c:winpr_SetContextAttributesA:
 1842|    529|{
 1843|    529|	char* Name = nullptr;
 1844|    529|	SECURITY_STATUS status = 0;
 1845|    529|	const SecurityFunctionTableA* table = nullptr;
 1846|    529|	Name = (char*)sspi_SecureHandleGetUpperPointer(phContext);
 1847|       |
 1848|    529|	if (!Name)
  ------------------
  |  Branch (1848:6): [True: 0, False: 529]
  ------------------
 1849|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1850|       |
 1851|    529|	table = sspi_GetSecurityFunctionTableAByNameA(Name);
 1852|       |
 1853|    529|	if (!table)
  ------------------
  |  Branch (1853:6): [True: 0, False: 529]
  ------------------
 1854|      0|		return SEC_E_SECPKG_NOT_FOUND;
  ------------------
  |  |  139|      0|#define SEC_E_SECPKG_NOT_FOUND WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090305)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1855|       |
 1856|    529|	if (!table->SetContextAttributesA)
  ------------------
  |  Branch (1856:6): [True: 0, False: 529]
  ------------------
 1857|      0|	{
 1858|      0|		WLog_WARN(TAG, "Security module does not provide an implementation");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
 1859|      0|		return SEC_E_UNSUPPORTED_FUNCTION;
  ------------------
  |  |  136|      0|#define SEC_E_UNSUPPORTED_FUNCTION WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090302)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
 1860|      0|	}
 1861|       |
 1862|    529|	status = table->SetContextAttributesA(phContext, ulAttribute, pBuffer, cbBuffer);
 1863|    529|	return log_status("SetContextAttributesA", status);
  ------------------
  |  | 1252|    529|#define log_status(what, status) log_status_((what), (status), __FILE__, __func__, __LINE__)
  ------------------
 1864|    529|}

LLVMFuzzerTestOneInput:
  329|  1.23k|{
  330|  1.23k|	static BOOL loggingInitialized = FALSE;
  ------------------
  |  |  113|  1.23k|#define FALSE false
  ------------------
  331|       |
  332|  1.23k|	if (!loggingInitialized)
  ------------------
  |  Branch (332:6): [True: 1, False: 1.23k]
  ------------------
  333|      1|	{
  334|      1|		(void)WLog_SetLogLevel(WLog_GetRoot(), WLOG_TRACE);
  ------------------
  |  |   42|      1|#define WLOG_TRACE 0
  ------------------
  335|      1|		loggingInitialized = TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  336|      1|	}
  337|       |
  338|  1.23k|	if (size < 2)
  ------------------
  |  Branch (338:6): [True: 2, False: 1.23k]
  ------------------
  339|      2|		return 0;
  340|  1.23k|	if (size > (1u << 20))
  ------------------
  |  Branch (340:6): [True: 0, False: 1.23k]
  ------------------
  341|      0|		return 0;
  342|       |
  343|  1.23k|	switch (data[0] % 3)
  344|  1.23k|	{
  345|    234|		case 0:
  ------------------
  |  Branch (345:3): [True: 234, False: 1.00k]
  ------------------
  346|    234|			fuzz_ntlm_negotiate(data + 1, size - 1);
  347|    234|			break;
  348|    520|		case 1:
  ------------------
  |  Branch (348:3): [True: 520, False: 715]
  ------------------
  349|    520|			fuzz_ntlm_challenge(data + 1, size - 1);
  350|    520|			break;
  351|    481|		case 2:
  ------------------
  |  Branch (351:3): [True: 481, False: 754]
  ------------------
  352|    481|			fuzz_ntlm_authenticate(data + 1, size - 1);
  353|    481|			break;
  354|      0|		default:
  ------------------
  |  Branch (354:3): [True: 0, False: 1.23k]
  ------------------
  355|      0|			break;
  356|  1.23k|	}
  357|       |
  358|  1.23k|	return 0;
  359|  1.23k|}
TestFuzzNTLMMessage.c:fuzz_ntlm_negotiate:
  272|    234|{
  273|    234|	FUZZ_NTLM_SERVER server = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    234|	{                      \
  |  |   85|    234|	} /** @since version 3.24.0 */
  ------------------
  274|       |
  275|    234|	if (!fuzz_ntlm_server_init(&server))
  ------------------
  |  Branch (275:6): [True: 0, False: 234]
  ------------------
  276|      0|		goto fail;
  277|       |
  278|    234|	fuzz_ntlm_set_input(server.inputBuffer, &server.haveInputBuffer, data, size);
  279|    234|	(void)fuzz_ntlm_server_step(&server);
  280|       |
  281|    234|fail:
  282|    234|	fuzz_ntlm_server_uninit(&server);
  283|    234|}
TestFuzzNTLMMessage.c:fuzz_ntlm_server_init:
  186|    715|{
  187|    715|	SECURITY_STATUS status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|    715|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|    715|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  188|       |
  189|    715|	WINPR_ASSERT(server);
  ------------------
  |  |   76|    715|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    715|	do                                                                                             \
  |  |  |  |   61|    715|	{                                                                                              \
  |  |  |  |   62|    715|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    715|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    715|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    715|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    715|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    715|                                                                                                   \
  |  |  |  |   70|    715|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    715|	do                                                      \
  |  |  |  |  |  |   32|    715|	{                                                       \
  |  |  |  |  |  |   33|    715|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    715|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    715|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    715|                                                                                                   \
  |  |  |  |   72|    715|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    715|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    715|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    715|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 715]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|       |
  191|    715|	ZeroMemory(server, sizeof(*server));
  ------------------
  |  |  126|    715|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  192|    715|	SecInvalidateHandle(&server->context);
  ------------------
  |  |  830|    715|	((PSecHandle)(x))->dwLower = ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1))
  ------------------
  193|    715|	SecInvalidateHandle(&server->credentials);
  ------------------
  |  |  830|    715|	((PSecHandle)(x))->dwLower = ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1))
  ------------------
  194|       |
  195|    715|	server->table = InitSecurityInterfaceEx(TEST_SSPI_INTERFACE);
  ------------------
  |  | 1532|    715|#define InitSecurityInterfaceEx InitSecurityInterfaceExA
  ------------------
              	server->table = InitSecurityInterfaceEx(TEST_SSPI_INTERFACE);
  ------------------
  |  |   15|    715|#define TEST_SSPI_INTERFACE SSPI_INTERFACE_WINPR
  |  |  ------------------
  |  |  |  | 1449|    715|#define SSPI_INTERFACE_WINPR 0x00000001
  |  |  ------------------
  ------------------
  196|    715|	if (!server->table)
  ------------------
  |  Branch (196:6): [True: 0, False: 715]
  ------------------
  197|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  198|       |
  199|    715|	status = server->table->QuerySecurityPackageInfo(NTLM_PACKAGE_NAME, &server->pPackageInfo);
  ------------------
  |  | 1056|    715|#define QuerySecurityPackageInfo QuerySecurityPackageInfoA
  ------------------
              	status = server->table->QuerySecurityPackageInfo(NTLM_PACKAGE_NAME, &server->pPackageInfo);
  ------------------
  |  |   16|    715|#define NTLM_PACKAGE_NAME NTLM_SSP_NAME
  |  |  ------------------
  |  |  |  |  102|    715|#define NTLM_SSP_NAME _T("NTLM")
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|    715|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|    715|	if (status != SEC_E_OK)
  ------------------
  |  |  133|    715|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    715|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (200:6): [True: 0, False: 715]
  ------------------
  201|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  202|       |
  203|    715|	server->cbMaxToken = server->pPackageInfo->cbMaxToken;
  204|    715|	status = server->table->AcquireCredentialsHandle(
  ------------------
  |  |  985|    715|#define AcquireCredentialsHandle AcquireCredentialsHandleA
  ------------------
  205|    715|	    nullptr, NTLM_PACKAGE_NAME, SECPKG_CRED_INBOUND, nullptr, nullptr, nullptr, nullptr,
  ------------------
  |  |   16|    715|#define NTLM_PACKAGE_NAME NTLM_SSP_NAME
  |  |  ------------------
  |  |  |  |  102|    715|#define NTLM_SSP_NAME _T("NTLM")
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|    715|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              	    nullptr, NTLM_PACKAGE_NAME, SECPKG_CRED_INBOUND, nullptr, nullptr, nullptr, nullptr,
  ------------------
  |  |  259|    715|#define SECPKG_CRED_INBOUND 0x00000001
  ------------------
  206|    715|	    &server->credentials, &server->expiration);
  207|    715|	if (status != SEC_E_OK)
  ------------------
  |  |  133|    715|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|    715|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (207:6): [True: 0, False: 715]
  ------------------
  208|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  209|       |
  210|    715|	server->fContextReq = ASC_REQ_MUTUAL_AUTH | ASC_REQ_CONFIDENTIALITY | ASC_REQ_CONNECTION |
  ------------------
  |  |  615|    715|#define ASC_REQ_MUTUAL_AUTH 0x00000002
  ------------------
              	server->fContextReq = ASC_REQ_MUTUAL_AUTH | ASC_REQ_CONFIDENTIALITY | ASC_REQ_CONNECTION |
  ------------------
  |  |  618|    715|#define ASC_REQ_CONFIDENTIALITY 0x00000010
  ------------------
              	server->fContextReq = ASC_REQ_MUTUAL_AUTH | ASC_REQ_CONFIDENTIALITY | ASC_REQ_CONNECTION |
  ------------------
  |  |  623|    715|#define ASC_REQ_CONNECTION 0x00000800
  ------------------
  211|    715|	                      ASC_REQ_USE_SESSION_KEY | ASC_REQ_REPLAY_DETECT |
  ------------------
  |  |  619|    715|#define ASC_REQ_USE_SESSION_KEY 0x00000020
  ------------------
              	                      ASC_REQ_USE_SESSION_KEY | ASC_REQ_REPLAY_DETECT |
  ------------------
  |  |  616|    715|#define ASC_REQ_REPLAY_DETECT 0x00000004
  ------------------
  212|    715|	                      ASC_REQ_SEQUENCE_DETECT | ASC_REQ_EXTENDED_ERROR;
  ------------------
  |  |  617|    715|#define ASC_REQ_SEQUENCE_DETECT 0x00000008
  ------------------
              	                      ASC_REQ_SEQUENCE_DETECT | ASC_REQ_EXTENDED_ERROR;
  ------------------
  |  |  625|    715|#define ASC_REQ_EXTENDED_ERROR 0x00008000
  ------------------
  213|    715|	return TRUE;
  ------------------
  |  |  117|    715|#define TRUE true
  ------------------
  214|    715|}
TestFuzzNTLMMessage.c:fuzz_ntlm_set_input:
  261|  1.71k|{
  262|  1.71k|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|  1.71k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.71k|	do                                                                                             \
  |  |  |  |   61|  1.71k|	{                                                                                              \
  |  |  |  |   62|  1.71k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.71k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.71k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.71k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.71k|                                                                                                   \
  |  |  |  |   70|  1.71k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.71k|	do                                                      \
  |  |  |  |  |  |   32|  1.71k|	{                                                       \
  |  |  |  |  |  |   33|  1.71k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.71k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.71k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.71k|                                                                                                   \
  |  |  |  |   72|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.71k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.71k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.71k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  263|  1.71k|	WINPR_ASSERT(haveInputBuffer);
  ------------------
  |  |   76|  1.71k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.71k|	do                                                                                             \
  |  |  |  |   61|  1.71k|	{                                                                                              \
  |  |  |  |   62|  1.71k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.71k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.71k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.71k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.71k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.71k|                                                                                                   \
  |  |  |  |   70|  1.71k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.71k|	do                                                      \
  |  |  |  |  |  |   32|  1.71k|	{                                                       \
  |  |  |  |  |  |   33|  1.71k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.71k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.71k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.71k|                                                                                                   \
  |  |  |  |   72|  1.71k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.71k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.71k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.71k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  264|       |
  265|  1.71k|	buffer[0].BufferType = SECBUFFER_TOKEN;
  ------------------
  |  |  916|  1.71k|#define SECBUFFER_TOKEN 2
  ------------------
  266|  1.71k|	buffer[0].pvBuffer = (void*)data;
  267|  1.71k|	buffer[0].cbBuffer = (ULONG)size;
  268|  1.71k|	*haveInputBuffer = TRUE;
  ------------------
  |  |  117|  1.71k|#define TRUE true
  ------------------
  269|  1.71k|}
TestFuzzNTLMMessage.c:fuzz_ntlm_server_step:
  217|  1.19k|{
  218|  1.19k|	SECURITY_STATUS status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|  1.19k|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|  1.19k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  219|       |
  220|  1.19k|	WINPR_ASSERT(server);
  ------------------
  |  |   76|  1.19k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.19k|	do                                                                                             \
  |  |  |  |   61|  1.19k|	{                                                                                              \
  |  |  |  |   62|  1.19k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.19k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.19k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.19k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.19k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.19k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.19k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.19k|                                                                                                   \
  |  |  |  |   70|  1.19k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.19k|	do                                                      \
  |  |  |  |  |  |   32|  1.19k|	{                                                       \
  |  |  |  |  |  |   33|  1.19k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.19k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.19k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.19k|                                                                                                   \
  |  |  |  |   72|  1.19k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.19k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.19k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.19k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|       |
  222|  1.19k|	free(server->outputBuffer[0].pvBuffer);
  223|  1.19k|	server->outputBuffer[0].pvBuffer = nullptr;
  224|       |
  225|  1.19k|	server->inputBufferDesc.ulVersion = SECBUFFER_VERSION;
  ------------------
  |  |  911|  1.19k|#define SECBUFFER_VERSION 0
  ------------------
  226|  1.19k|	server->inputBufferDesc.cBuffers = ARRAYSIZE(server->inputBuffer);
  ------------------
  |  |  966|  1.19k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  1.19k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  1.19k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  227|  1.19k|	server->inputBufferDesc.pBuffers = server->inputBuffer;
  228|  1.19k|	server->inputBuffer[0].BufferType = SECBUFFER_TOKEN;
  ------------------
  |  |  916|  1.19k|#define SECBUFFER_TOKEN 2
  ------------------
  229|       |
  230|  1.19k|	server->outputBufferDesc.ulVersion = SECBUFFER_VERSION;
  ------------------
  |  |  911|  1.19k|#define SECBUFFER_VERSION 0
  ------------------
  231|  1.19k|	server->outputBufferDesc.cBuffers = ARRAYSIZE(server->outputBuffer);
  ------------------
  |  |  966|  1.19k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  1.19k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  1.19k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  232|  1.19k|	server->outputBufferDesc.pBuffers = server->outputBuffer;
  233|  1.19k|	server->outputBuffer[0].BufferType = SECBUFFER_TOKEN;
  ------------------
  |  |  916|  1.19k|#define SECBUFFER_TOKEN 2
  ------------------
  234|  1.19k|	server->outputBuffer[0].cbBuffer = server->cbMaxToken;
  235|  1.19k|	server->outputBuffer[0].pvBuffer = calloc(1, server->outputBuffer[0].cbBuffer);
  236|  1.19k|	if (!server->outputBuffer[0].pvBuffer)
  ------------------
  |  Branch (236:6): [True: 0, False: 1.19k]
  ------------------
  237|      0|		return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  238|       |
  239|  1.19k|	status = server->table->AcceptSecurityContext(
  240|  1.19k|	    &server->credentials, server->haveContext ? &server->context : nullptr,
  ------------------
  |  Branch (240:28): [True: 481, False: 715]
  ------------------
  241|  1.19k|	    &server->inputBufferDesc, server->fContextReq, SECURITY_NATIVE_DREP, &server->context,
  ------------------
  |  |  256|  1.19k|#define SECURITY_NATIVE_DREP 0x00000010
  ------------------
  242|  1.19k|	    &server->outputBufferDesc, &server->pfContextAttr, &server->expiration);
  243|       |
  244|  1.19k|	if (!IsSecurityStatusError(status))
  ------------------
  |  Branch (244:6): [True: 529, False: 667]
  ------------------
  245|    529|		server->haveContext = TRUE;
  ------------------
  |  |  117|    529|#define TRUE true
  ------------------
  246|       |
  247|  1.19k|	if (status == SEC_I_CONTINUE_NEEDED)
  ------------------
  |  |  208|  1.19k|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|  1.19k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (247:6): [True: 529, False: 667]
  ------------------
  248|    529|	{
  249|    529|		SecPkgContext_AuthNtlmHash hash = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    529|	{                      \
  |  |   85|    529|	} /** @since version 3.24.0 */
  ------------------
  250|    529|		hash.Version = 2;
  251|    529|		CopyMemory(hash.NtlmHash, TEST_NTLM_V2_HASH, sizeof(TEST_NTLM_V2_HASH));
  ------------------
  |  |  123|    529|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  252|    529|		(void)server->table->SetContextAttributes(&server->context, SECPKG_ATTR_AUTH_NTLM_HASH,
  ------------------
  |  | 1117|    529|#define SetContextAttributes SetContextAttributesA
  ------------------
              		(void)server->table->SetContextAttributes(&server->context, SECPKG_ATTR_AUTH_NTLM_HASH,
  ------------------
  |  | 1397|    529|#define SECPKG_ATTR_AUTH_NTLM_HASH 1003
  ------------------
  253|    529|		                                          &hash, sizeof(hash));
  254|    529|	}
  255|       |
  256|  1.19k|	return status;
  257|  1.19k|}
TestFuzzNTLMMessage.c:fuzz_ntlm_server_uninit:
  167|    715|{
  168|    715|	if (!server)
  ------------------
  |  Branch (168:6): [True: 0, False: 715]
  ------------------
  169|      0|		return;
  170|       |
  171|    715|	free(server->outputBuffer[0].pvBuffer);
  172|    715|	server->outputBuffer[0].pvBuffer = nullptr;
  173|       |
  174|    715|	if (server->table)
  ------------------
  |  Branch (174:6): [True: 715, False: 0]
  ------------------
  175|    715|	{
  176|    715|		if (SecIsValidHandle(&server->credentials))
  ------------------
  |  |  833|    715|	((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR)-1))) && \
  |  |  ------------------
  |  |  |  Branch (833:3): [True: 715, False: 0]
  |  |  ------------------
  |  |  834|    715|	 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)((INT_PTR)-1))))
  |  |  ------------------
  |  |  |  Branch (834:3): [True: 715, False: 0]
  |  |  ------------------
  ------------------
  177|    715|			(void)server->table->FreeCredentialsHandle(&server->credentials);
  178|    715|		if (server->pPackageInfo)
  ------------------
  |  Branch (178:7): [True: 715, False: 0]
  ------------------
  179|    715|			(void)server->table->FreeContextBuffer(server->pPackageInfo);
  180|    715|		if (SecIsValidHandle(&server->context))
  ------------------
  |  |  833|    715|	((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR)-1))) && \
  |  |  ------------------
  |  |  |  Branch (833:3): [True: 715, False: 0]
  |  |  ------------------
  |  |  834|    715|	 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)((INT_PTR)-1))))
  |  |  ------------------
  |  |  |  Branch (834:3): [True: 715, False: 0]
  |  |  ------------------
  ------------------
  181|    715|			(void)server->table->DeleteSecurityContext(&server->context);
  182|    715|	}
  183|    715|}
TestFuzzNTLMMessage.c:fuzz_ntlm_challenge:
  286|    520|{
  287|    520|	FUZZ_NTLM_CLIENT client = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    520|	{                      \
  |  |   85|    520|	} /** @since version 3.24.0 */
  ------------------
  288|       |
  289|    520|	if (!fuzz_ntlm_client_init(&client))
  ------------------
  |  Branch (289:6): [True: 0, False: 520]
  ------------------
  290|      0|		goto fail;
  291|       |
  292|    520|	if (IsSecurityStatusError(fuzz_ntlm_client_step(&client)))
  ------------------
  |  Branch (292:6): [True: 0, False: 520]
  ------------------
  293|      0|		goto fail;
  294|       |
  295|    520|	fuzz_ntlm_set_input(client.inputBuffer, &client.haveInputBuffer, data, size);
  296|    520|	(void)fuzz_ntlm_client_step(&client);
  297|       |
  298|    520|fail:
  299|    520|	fuzz_ntlm_client_uninit(&client);
  300|    520|}
TestFuzzNTLMMessage.c:fuzz_ntlm_client_init:
   85|  1.00k|{
   86|  1.00k|	SECURITY_STATUS status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|  1.00k|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|  1.00k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
   87|       |
   88|  1.00k|	WINPR_ASSERT(client);
  ------------------
  |  |   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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   89|       |
   90|  1.00k|	ZeroMemory(client, sizeof(*client));
  ------------------
  |  |  126|  1.00k|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
   91|  1.00k|	SecInvalidateHandle(&client->context);
  ------------------
  |  |  830|  1.00k|	((PSecHandle)(x))->dwLower = ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1))
  ------------------
   92|  1.00k|	SecInvalidateHandle(&client->credentials);
  ------------------
  |  |  830|  1.00k|	((PSecHandle)(x))->dwLower = ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1))
  ------------------
   93|       |
   94|  1.00k|	client->table = InitSecurityInterfaceEx(TEST_SSPI_INTERFACE);
  ------------------
  |  | 1532|  1.00k|#define InitSecurityInterfaceEx InitSecurityInterfaceExA
  ------------------
              	client->table = InitSecurityInterfaceEx(TEST_SSPI_INTERFACE);
  ------------------
  |  |   15|  1.00k|#define TEST_SSPI_INTERFACE SSPI_INTERFACE_WINPR
  |  |  ------------------
  |  |  |  | 1449|  1.00k|#define SSPI_INTERFACE_WINPR 0x00000001
  |  |  ------------------
  ------------------
   95|  1.00k|	if (!client->table)
  ------------------
  |  Branch (95:6): [True: 0, False: 1.00k]
  ------------------
   96|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   97|       |
   98|  1.00k|	if (sspi_SetAuthIdentity(&client->identity, TEST_NTLM_USER, TEST_NTLM_DOMAIN,
  ------------------
  |  | 1462|  1.00k|#define sspi_SetAuthIdentity sspi_SetAuthIdentityA
  ------------------
  |  Branch (98:6): [True: 0, False: 1.00k]
  ------------------
   99|  1.00k|	                         TEST_NTLM_PASSWORD) < 0)
  100|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  101|       |
  102|  1.00k|	status = client->table->QuerySecurityPackageInfo(NTLM_PACKAGE_NAME, &client->pPackageInfo);
  ------------------
  |  | 1056|  1.00k|#define QuerySecurityPackageInfo QuerySecurityPackageInfoA
  ------------------
              	status = client->table->QuerySecurityPackageInfo(NTLM_PACKAGE_NAME, &client->pPackageInfo);
  ------------------
  |  |   16|  1.00k|#define NTLM_PACKAGE_NAME NTLM_SSP_NAME
  |  |  ------------------
  |  |  |  |  102|  1.00k|#define NTLM_SSP_NAME _T("NTLM")
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  1.00k|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|  1.00k|	if (status != SEC_E_OK)
  ------------------
  |  |  133|  1.00k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.00k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (103:6): [True: 0, False: 1.00k]
  ------------------
  104|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  105|       |
  106|  1.00k|	client->cbMaxToken = client->pPackageInfo->cbMaxToken;
  107|  1.00k|	status = client->table->AcquireCredentialsHandle(
  ------------------
  |  |  985|  1.00k|#define AcquireCredentialsHandle AcquireCredentialsHandleA
  ------------------
  108|  1.00k|	    nullptr, NTLM_PACKAGE_NAME, SECPKG_CRED_OUTBOUND, nullptr, &client->identity, nullptr,
  ------------------
  |  |   16|  1.00k|#define NTLM_PACKAGE_NAME NTLM_SSP_NAME
  |  |  ------------------
  |  |  |  |  102|  1.00k|#define NTLM_SSP_NAME _T("NTLM")
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  1.00k|#define _T(x) x // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
              	    nullptr, NTLM_PACKAGE_NAME, SECPKG_CRED_OUTBOUND, nullptr, &client->identity, nullptr,
  ------------------
  |  |  260|  1.00k|#define SECPKG_CRED_OUTBOUND 0x00000002
  ------------------
  109|  1.00k|	    nullptr, &client->credentials, &client->expiration);
  110|  1.00k|	if (status != SEC_E_OK)
  ------------------
  |  |  133|  1.00k|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|  1.00k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (110:6): [True: 0, False: 1.00k]
  ------------------
  111|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  112|       |
  113|  1.00k|	client->fContextReq = ISC_REQ_MUTUAL_AUTH | ISC_REQ_CONFIDENTIALITY | ISC_REQ_USE_SESSION_KEY;
  ------------------
  |  |  562|  1.00k|#define ISC_REQ_MUTUAL_AUTH 0x00000002
  ------------------
              	client->fContextReq = ISC_REQ_MUTUAL_AUTH | ISC_REQ_CONFIDENTIALITY | ISC_REQ_USE_SESSION_KEY;
  ------------------
  |  |  565|  1.00k|#define ISC_REQ_CONFIDENTIALITY 0x00000010
  ------------------
              	client->fContextReq = ISC_REQ_MUTUAL_AUTH | ISC_REQ_CONFIDENTIALITY | ISC_REQ_USE_SESSION_KEY;
  ------------------
  |  |  566|  1.00k|#define ISC_REQ_USE_SESSION_KEY 0x00000020
  ------------------
  114|  1.00k|	return TRUE;
  ------------------
  |  |  117|  1.00k|#define TRUE true
  ------------------
  115|  1.00k|}
TestFuzzNTLMMessage.c:fuzz_ntlm_client_step:
  118|  1.52k|{
  119|  1.52k|	SECURITY_STATUS status = SEC_E_INTERNAL_ERROR;
  ------------------
  |  |  138|  1.52k|#define SEC_E_INTERNAL_ERROR WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090304)
  |  |  ------------------
  |  |  |  |   33|  1.52k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  120|       |
  121|  1.52k|	WINPR_ASSERT(client);
  ------------------
  |  |   76|  1.52k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  1.52k|	do                                                                                             \
  |  |  |  |   61|  1.52k|	{                                                                                              \
  |  |  |  |   62|  1.52k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  1.52k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  1.52k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  1.52k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  1.52k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  1.52k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  1.52k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  1.52k|                                                                                                   \
  |  |  |  |   70|  1.52k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  1.52k|	do                                                      \
  |  |  |  |  |  |   32|  1.52k|	{                                                       \
  |  |  |  |  |  |   33|  1.52k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.52k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  1.52k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  1.52k|                                                                                                   \
  |  |  |  |   72|  1.52k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  1.52k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  1.52k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  1.52k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 1.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  122|       |
  123|  1.52k|	free(client->outputBuffer[0].pvBuffer);
  124|  1.52k|	client->outputBuffer[0].pvBuffer = nullptr;
  125|       |
  126|  1.52k|	client->outputBufferDesc.ulVersion = SECBUFFER_VERSION;
  ------------------
  |  |  911|  1.52k|#define SECBUFFER_VERSION 0
  ------------------
  127|  1.52k|	client->outputBufferDesc.cBuffers = ARRAYSIZE(client->outputBuffer);
  ------------------
  |  |  966|  1.52k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  1.52k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  1.52k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|  1.52k|	client->outputBufferDesc.pBuffers = client->outputBuffer;
  129|  1.52k|	client->outputBuffer[0].BufferType = SECBUFFER_TOKEN;
  ------------------
  |  |  916|  1.52k|#define SECBUFFER_TOKEN 2
  ------------------
  130|  1.52k|	client->outputBuffer[0].cbBuffer = client->cbMaxToken;
  131|  1.52k|	client->outputBuffer[0].pvBuffer = calloc(1, client->outputBuffer[0].cbBuffer);
  132|  1.52k|	if (!client->outputBuffer[0].pvBuffer)
  ------------------
  |  Branch (132:6): [True: 0, False: 1.52k]
  ------------------
  133|      0|		return SEC_E_INSUFFICIENT_MEMORY;
  ------------------
  |  |  134|      0|#define SEC_E_INSUFFICIENT_MEMORY WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x80090300)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  134|       |
  135|  1.52k|	if (client->haveInputBuffer)
  ------------------
  |  Branch (135:6): [True: 520, False: 1.00k]
  ------------------
  136|    520|	{
  137|    520|		client->inputBufferDesc.ulVersion = SECBUFFER_VERSION;
  ------------------
  |  |  911|    520|#define SECBUFFER_VERSION 0
  ------------------
  138|    520|		client->inputBufferDesc.cBuffers = ARRAYSIZE(client->inputBuffer);
  ------------------
  |  |  966|    520|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|    520|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|    520|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|    520|		client->inputBufferDesc.pBuffers = client->inputBuffer;
  140|    520|		client->inputBuffer[0].BufferType = SECBUFFER_TOKEN;
  ------------------
  |  |  916|    520|#define SECBUFFER_TOKEN 2
  ------------------
  141|    520|	}
  142|       |
  143|  1.52k|	status = client->table->InitializeSecurityContext(
  ------------------
  |  | 1004|  1.52k|#define InitializeSecurityContext InitializeSecurityContextA
  ------------------
  144|  1.52k|	    &client->credentials, client->haveContext ? &client->context : nullptr, nullptr,
  ------------------
  |  Branch (144:28): [True: 520, False: 1.00k]
  ------------------
  145|  1.52k|	    client->fContextReq, 0, SECURITY_NATIVE_DREP,
  ------------------
  |  |  256|  1.52k|#define SECURITY_NATIVE_DREP 0x00000010
  ------------------
  146|  1.52k|	    client->haveInputBuffer ? &client->inputBufferDesc : nullptr, 0, &client->context,
  ------------------
  |  Branch (146:6): [True: 520, False: 1.00k]
  ------------------
  147|  1.52k|	    &client->outputBufferDesc, &client->pfContextAttr, &client->expiration);
  148|       |
  149|  1.52k|	if ((status == SEC_I_COMPLETE_AND_CONTINUE) || (status == SEC_I_COMPLETE_NEEDED))
  ------------------
  |  |  210|  1.52k|#define SEC_I_COMPLETE_AND_CONTINUE WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090314)
  |  |  ------------------
  |  |  |  |   33|  1.52k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
              	if ((status == SEC_I_COMPLETE_AND_CONTINUE) || (status == SEC_I_COMPLETE_NEEDED))
  ------------------
  |  |  209|  1.52k|#define SEC_I_COMPLETE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090313)
  |  |  ------------------
  |  |  |  |   33|  1.52k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (149:6): [True: 0, False: 1.52k]
  |  Branch (149:49): [True: 0, False: 1.52k]
  ------------------
  150|      0|	{
  151|      0|		if (client->table->CompleteAuthToken)
  ------------------
  |  Branch (151:7): [True: 0, False: 0]
  ------------------
  152|      0|			(void)client->table->CompleteAuthToken(&client->context, &client->outputBufferDesc);
  153|       |
  154|      0|		if (status == SEC_I_COMPLETE_NEEDED)
  ------------------
  |  |  209|      0|#define SEC_I_COMPLETE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090313)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (154:7): [True: 0, False: 0]
  ------------------
  155|      0|			status = SEC_E_OK;
  ------------------
  |  |  133|      0|#define SEC_E_OK WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00000000)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  156|      0|		else
  157|      0|			status = SEC_I_CONTINUE_NEEDED;
  ------------------
  |  |  208|      0|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|      0|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  158|      0|	}
  159|       |
  160|  1.52k|	if (!IsSecurityStatusError(status))
  ------------------
  |  Branch (160:6): [True: 1.05k, False: 471]
  ------------------
  161|  1.05k|		client->haveContext = TRUE;
  ------------------
  |  |  117|  1.05k|#define TRUE true
  ------------------
  162|       |
  163|  1.52k|	return status;
  164|  1.52k|}
TestFuzzNTLMMessage.c:fuzz_ntlm_client_uninit:
   62|  1.00k|{
   63|  1.00k|	if (!client)
  ------------------
  |  Branch (63:6): [True: 0, False: 1.00k]
  ------------------
   64|      0|		return;
   65|       |
   66|  1.00k|	free(client->outputBuffer[0].pvBuffer);
   67|  1.00k|	client->outputBuffer[0].pvBuffer = nullptr;
   68|       |
   69|  1.00k|	free(client->identity.User);
   70|  1.00k|	free(client->identity.Domain);
   71|  1.00k|	free(client->identity.Password);
   72|       |
   73|  1.00k|	if (client->table)
  ------------------
  |  Branch (73:6): [True: 1.00k, False: 0]
  ------------------
   74|  1.00k|	{
   75|  1.00k|		if (SecIsValidHandle(&client->credentials))
  ------------------
  |  |  833|  1.00k|	((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR)-1))) && \
  |  |  ------------------
  |  |  |  Branch (833:3): [True: 1.00k, False: 0]
  |  |  ------------------
  |  |  834|  1.00k|	 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)((INT_PTR)-1))))
  |  |  ------------------
  |  |  |  Branch (834:3): [True: 1.00k, False: 0]
  |  |  ------------------
  ------------------
   76|  1.00k|			(void)client->table->FreeCredentialsHandle(&client->credentials);
   77|  1.00k|		if (client->pPackageInfo)
  ------------------
  |  Branch (77:7): [True: 1.00k, False: 0]
  ------------------
   78|  1.00k|			(void)client->table->FreeContextBuffer(client->pPackageInfo);
   79|  1.00k|		if (client->haveContext && SecIsValidHandle(&client->context))
  ------------------
  |  |  833|  1.00k|	((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR)-1))) && \
  |  |  ------------------
  |  |  |  Branch (833:3): [True: 1.00k, False: 0]
  |  |  ------------------
  |  |  834|  1.00k|	 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)((INT_PTR)-1))))
  |  |  ------------------
  |  |  |  Branch (834:3): [True: 1.00k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (79:7): [True: 1.00k, False: 0]
  ------------------
   80|  1.00k|			(void)client->table->DeleteSecurityContext(&client->context);
   81|  1.00k|	}
   82|  1.00k|}
TestFuzzNTLMMessage.c:fuzz_ntlm_authenticate:
  303|    481|{
  304|    481|	FUZZ_NTLM_CLIENT client = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    481|	{                      \
  |  |   85|    481|	} /** @since version 3.24.0 */
  ------------------
  305|    481|	FUZZ_NTLM_SERVER server = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    481|	{                      \
  |  |   85|    481|	} /** @since version 3.24.0 */
  ------------------
  306|       |
  307|    481|	if (!fuzz_ntlm_client_init(&client))
  ------------------
  |  Branch (307:6): [True: 0, False: 481]
  ------------------
  308|      0|		goto fail;
  309|    481|	if (!fuzz_ntlm_server_init(&server))
  ------------------
  |  Branch (309:6): [True: 0, False: 481]
  ------------------
  310|      0|		goto fail;
  311|       |
  312|    481|	if (fuzz_ntlm_client_step(&client) != SEC_I_CONTINUE_NEEDED)
  ------------------
  |  |  208|    481|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|    481|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (312:6): [True: 0, False: 481]
  ------------------
  313|      0|		goto fail;
  314|       |
  315|    481|	fuzz_ntlm_set_input(server.inputBuffer, &server.haveInputBuffer,
  316|    481|	                    client.outputBuffer[0].pvBuffer, client.outputBuffer[0].cbBuffer);
  317|    481|	if (fuzz_ntlm_server_step(&server) != SEC_I_CONTINUE_NEEDED)
  ------------------
  |  |  208|    481|#define SEC_I_CONTINUE_NEEDED WINPR_CXX_COMPAT_CAST(SECURITY_STATUS, 0x00090312)
  |  |  ------------------
  |  |  |  |   33|    481|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  ------------------
  |  Branch (317:6): [True: 0, False: 481]
  ------------------
  318|      0|		goto fail;
  319|       |
  320|    481|	fuzz_ntlm_set_input(server.inputBuffer, &server.haveInputBuffer, data, size);
  321|    481|	(void)fuzz_ntlm_server_step(&server);
  322|       |
  323|    481|fail:
  324|    481|	fuzz_ntlm_client_uninit(&client);
  325|    481|	fuzz_ntlm_server_uninit(&server);
  326|    481|}

InitializeCriticalSectionEx:
   55|      4|{
   56|      4|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|      4|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      4|	do                                                                                             \
  |  |  |  |   61|      4|	{                                                                                              \
  |  |  |  |   62|      4|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      4|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      4|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      4|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      4|                                                                                                   \
  |  |  |  |   70|      4|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      4|	do                                                      \
  |  |  |  |  |  |   32|      4|	{                                                       \
  |  |  |  |  |  |   33|      4|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      4|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      4|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      4|                                                                                                   \
  |  |  |  |   72|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      4|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      4|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      4|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   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|      4|	if (Flags != 0)
  ------------------
  |  Branch (67:6): [True: 0, False: 4]
  ------------------
   68|      0|	{
   69|      0|		WLog_WARN(TAG, "Flags unimplemented");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
   70|      0|	}
   71|       |
   72|      4|	lpCriticalSection->DebugInfo = nullptr;
   73|      4|	lpCriticalSection->LockCount = -1;
   74|      4|	lpCriticalSection->SpinCount = 0;
   75|      4|	lpCriticalSection->RecursionCount = 0;
   76|      4|	lpCriticalSection->OwningThread = nullptr;
   77|      4|	lpCriticalSection->LockSemaphore = (winpr_sem_t*)malloc(sizeof(winpr_sem_t));
   78|       |
   79|      4|	if (!lpCriticalSection->LockSemaphore)
  ------------------
  |  Branch (79:6): [True: 0, False: 4]
  ------------------
   80|      0|		return FALSE;
  ------------------
  |  |  113|      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|      4|	if (sem_init(lpCriticalSection->LockSemaphore, 0, 0) != 0)
  ------------------
  |  Branch (90:6): [True: 0, False: 4]
  ------------------
   91|      0|		goto out_fail;
   92|       |
   93|      4|#endif
   94|      4|	SetCriticalSectionSpinCount(lpCriticalSection, dwSpinCount);
   95|      4|	return TRUE;
  ------------------
  |  |  117|      4|#define TRUE true
  ------------------
   96|      0|out_fail:
   97|      0|	free(lpCriticalSection->LockSemaphore);
   98|      0|	return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   99|      4|}
InitializeCriticalSectionAndSpinCount:
  102|      4|{
  103|      4|	return InitializeCriticalSectionEx(lpCriticalSection, dwSpinCount, 0);
  104|      4|}
SetCriticalSectionSpinCount:
  108|      4|{
  109|      4|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|      4|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      4|	do                                                                                             \
  |  |  |  |   61|      4|	{                                                                                              \
  |  |  |  |   62|      4|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      4|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      4|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      4|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      4|                                                                                                   \
  |  |  |  |   70|      4|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      4|	do                                                      \
  |  |  |  |  |  |   32|      4|	{                                                       \
  |  |  |  |  |  |   33|      4|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      4|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      4|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      4|                                                                                                   \
  |  |  |  |   72|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      4|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      4|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      4|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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|      4|	return 0;
  128|      4|#endif
  129|      4|}
EnterCriticalSection:
  155|  15.0k|{
  156|  15.0k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|  15.0k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  15.0k|	do                                                                                             \
  |  |  |  |   61|  15.0k|	{                                                                                              \
  |  |  |  |   62|  15.0k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  15.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  15.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  15.0k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  15.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  15.0k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  15.0k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  15.0k|                                                                                                   \
  |  |  |  |   70|  15.0k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  15.0k|	do                                                      \
  |  |  |  |  |  |   32|  15.0k|	{                                                       \
  |  |  |  |  |  |   33|  15.0k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 15.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  15.0k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  15.0k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  15.0k|                                                                                                   \
  |  |  |  |   72|  15.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  15.0k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  15.0k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  15.0k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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|  15.0k|	if (InterlockedIncrement(&lpCriticalSection->LockCount))
  ------------------
  |  Branch (190:6): [True: 0, False: 15.0k]
  ------------------
  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|  15.0k|	lpCriticalSection->RecursionCount = 1;
  206|  15.0k|	lpCriticalSection->OwningThread = (HANDLE)(ULONG_PTR)GetCurrentThreadId();
  207|  15.0k|}
LeaveCriticalSection:
  236|  15.0k|{
  237|  15.0k|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|  15.0k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  15.0k|	do                                                                                             \
  |  |  |  |   61|  15.0k|	{                                                                                              \
  |  |  |  |   62|  15.0k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  15.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  15.0k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  15.0k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  15.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  15.0k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  15.0k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  15.0k|                                                                                                   \
  |  |  |  |   70|  15.0k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  15.0k|	do                                                      \
  |  |  |  |  |  |   32|  15.0k|	{                                                       \
  |  |  |  |  |  |   33|  15.0k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 15.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  15.0k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  15.0k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  15.0k|                                                                                                   \
  |  |  |  |   72|  15.0k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  15.0k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  15.0k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  15.0k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 15.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|       |
  239|       |	/* Decrement RecursionCount and check if this is the last LeaveCriticalSection call ...*/
  240|  15.0k|	if (--lpCriticalSection->RecursionCount < 1)
  ------------------
  |  Branch (240:6): [True: 15.0k, False: 0]
  ------------------
  241|  15.0k|	{
  242|       |		/* Last recursion, clear owner, unlock and if there are other waiting threads ... */
  243|  15.0k|		lpCriticalSection->OwningThread = nullptr;
  244|       |
  245|  15.0k|		if (InterlockedDecrement(&lpCriticalSection->LockCount) >= 0)
  ------------------
  |  Branch (245:7): [True: 0, False: 15.0k]
  ------------------
  246|      0|		{
  247|       |			/* ...signal the semaphore to unblock the next waiting thread */
  248|      0|			UnWaitCriticalSection(lpCriticalSection);
  249|      0|		}
  250|  15.0k|	}
  251|      0|	else
  252|      0|	{
  253|      0|		(void)InterlockedDecrement(&lpCriticalSection->LockCount);
  254|      0|	}
  255|  15.0k|}
DeleteCriticalSection:
  258|      4|{
  259|      4|	WINPR_ASSERT(lpCriticalSection);
  ------------------
  |  |   76|      4|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|      4|	do                                                                                             \
  |  |  |  |   61|      4|	{                                                                                              \
  |  |  |  |   62|      4|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|      4|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|      4|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|      4|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|      4|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|      4|                                                                                                   \
  |  |  |  |   70|      4|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      4|	do                                                      \
  |  |  |  |  |  |   32|      4|	{                                                       \
  |  |  |  |  |  |   33|      4|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      4|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|      4|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|      4|                                                                                                   \
  |  |  |  |   72|      4|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|      4|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|      4|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|      4|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|       |
  261|      4|	lpCriticalSection->LockCount = -1;
  262|      4|	lpCriticalSection->SpinCount = 0;
  263|      4|	lpCriticalSection->RecursionCount = 0;
  264|      4|	lpCriticalSection->OwningThread = nullptr;
  265|       |
  266|      4|	if (lpCriticalSection->LockSemaphore != nullptr)
  ------------------
  |  Branch (266:6): [True: 4, False: 0]
  ------------------
  267|      4|	{
  268|       |#if defined __APPLE__
  269|       |		semaphore_destroy(mach_task_self(), *((winpr_sem_t*)lpCriticalSection->LockSemaphore));
  270|       |#else
  271|      4|		sem_destroy((winpr_sem_t*)lpCriticalSection->LockSemaphore);
  272|      4|#endif
  273|      4|		free(lpCriticalSection->LockSemaphore);
  274|      4|		lpCriticalSection->LockSemaphore = nullptr;
  275|      4|	}
  276|      4|}

winpr_InitOnceExecuteOnce:
   55|  17.3k|{
   56|  17.3k|	for (;;)
   57|  17.3k|	{
   58|  17.3k|		switch ((ULONG_PTR)InitOnce->Ptr & 3)
   59|  17.3k|		{
   60|  17.3k|			case 2:
  ------------------
  |  Branch (60:4): [True: 17.3k, False: 5]
  ------------------
   61|       |				/* already completed successfully */
   62|  17.3k|				return TRUE;
  ------------------
  |  |  117|  17.3k|#define TRUE true
  ------------------
   63|       |
   64|      5|			case 0:
  ------------------
  |  Branch (64:4): [True: 5, False: 17.3k]
  ------------------
   65|       |
   66|       |				/* first time */
   67|      5|				if (InterlockedCompareExchangePointer(&InitOnce->Ptr, (PVOID)1, (PVOID)0) !=
  ------------------
  |  Branch (67:9): [True: 0, False: 5]
  ------------------
   68|      5|				    (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|      5|				if (InitFn(InitOnce, Parameter, Context))
  ------------------
  |  Branch (75:9): [True: 5, False: 0]
  ------------------
   76|      5|				{
   77|       |					/* success */
   78|      5|					InitOnce->Ptr = (PVOID)2;
   79|      5|					return TRUE;
  ------------------
  |  |  117|      5|#define TRUE true
  ------------------
   80|      5|				}
   81|       |
   82|       |				/* the init function returned an error,  reset the status */
   83|      0|				InitOnce->Ptr = (PVOID)0;
   84|      0|				return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   85|       |
   86|      0|			case 1:
  ------------------
  |  Branch (86:4): [True: 0, False: 17.3k]
  ------------------
   87|       |				/* in progress */
   88|      0|				break;
   89|       |
   90|      0|			default:
  ------------------
  |  Branch (90:4): [True: 0, False: 17.3k]
  ------------------
   91|      0|				WLog_ERR(TAG, "internal error");
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
   92|      0|				return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   93|  17.3k|		}
   94|       |
   95|      0|		Sleep(5);
   96|      0|	}
   97|  17.3k|}

GetLocalTime:
  278|  14.8k|{
  279|  14.8k|	time_t ct = 0;
  280|  14.8k|	struct tm tres;
  281|  14.8k|	struct tm* ltm = nullptr;
  282|  14.8k|	WORD wMilliseconds = 0;
  283|  14.8k|	UINT64 now = winpr_GetUnixTimeNS();
  284|  14.8k|	ct = WINPR_TIME_NS_TO_S(now);
  ------------------
  |  |  357|  14.8k|#define WINPR_TIME_NS_TO_S(ns) ((ns) / 1000000000ull) /** @since version 3.4.0 */
  ------------------
  285|  14.8k|	wMilliseconds = (WORD)(WINPR_TIME_NS_REM_MS(now));
  ------------------
  |  |  363|  14.8k|#define WINPR_TIME_NS_REM_MS(ns) (WINPR_TIME_NS_REM_US(ns) / 1000ull) /** @since version 3.4.0 */
  |  |  ------------------
  |  |  |  |  362|  14.8k|#define WINPR_TIME_NS_REM_US(ns) (WINPR_TIME_NS_REM_NS(ns) / 1000ull) /** @since version 3.4.0 */
  |  |  |  |  ------------------
  |  |  |  |  |  |  361|  14.8k|#define WINPR_TIME_NS_REM_NS(ns) ((ns) % 1000000000ull)               /** @since version 3.4.0 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|  14.8k|	ltm = localtime_r(&ct, &tres);
  287|  14.8k|	ZeroMemory(lpSystemTime, sizeof(SYSTEMTIME));
  ------------------
  |  |  126|  14.8k|#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length))
  ------------------
  288|       |
  289|  14.8k|	if (ltm)
  ------------------
  |  Branch (289:6): [True: 14.8k, False: 0]
  ------------------
  290|  14.8k|	{
  291|  14.8k|		lpSystemTime->wYear = (WORD)(ltm->tm_year + 1900);
  292|  14.8k|		lpSystemTime->wMonth = (WORD)(ltm->tm_mon + 1);
  293|  14.8k|		lpSystemTime->wDayOfWeek = (WORD)ltm->tm_wday;
  294|  14.8k|		lpSystemTime->wDay = (WORD)ltm->tm_mday;
  295|  14.8k|		lpSystemTime->wHour = (WORD)ltm->tm_hour;
  296|  14.8k|		lpSystemTime->wMinute = (WORD)ltm->tm_min;
  297|  14.8k|		lpSystemTime->wSecond = (WORD)ltm->tm_sec;
  298|  14.8k|		lpSystemTime->wMilliseconds = wMilliseconds;
  299|  14.8k|	}
  300|  14.8k|}
GetSystemTimeAsFileTime:
  310|    589|{
  311|    589|	union
  312|    589|	{
  313|    589|		UINT64 u64;
  314|    589|		FILETIME ft;
  315|    589|	} t;
  316|       |
  317|    589|	t.u64 = (winpr_GetUnixTimeNS() / 100ull) + FILETIME_TO_UNIX_OFFSET_S * 10000000ull;
  ------------------
  |  |   49|    589|#define FILETIME_TO_UNIX_OFFSET_S 11644473600UL
  ------------------
  318|    589|	*lpSystemTimeAsFileTime = t.ft;
  319|    589|}
GetComputerNameA:
  442|  7.66k|{
  443|  7.66k|	if (!lpnSize)
  ------------------
  |  Branch (443:6): [True: 0, False: 7.66k]
  ------------------
  444|      0|	{
  445|      0|		SetLastError(ERROR_BAD_ARGUMENTS);
  ------------------
  |  |  313|      0|#define ERROR_BAD_ARGUMENTS 0x000000A0
  ------------------
  446|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  447|      0|	}
  448|       |
  449|  7.66k|	char hostname[256 + 1] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  7.66k|	{                      \
  |  |   85|  7.66k|	} /** @since version 3.24.0 */
  ------------------
  450|  7.66k|	if (gethostname(hostname, ARRAYSIZE(hostname) - 1) == -1)
  ------------------
  |  |  966|  7.66k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  7.66k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  7.66k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (450:6): [True: 0, False: 7.66k]
  ------------------
  451|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  452|       |
  453|  7.66k|	size_t length = strnlen(hostname, MAX_COMPUTERNAME_LENGTH);
  ------------------
  |  |  323|  7.66k|#define MAX_COMPUTERNAME_LENGTH 31
  ------------------
  454|  7.66k|	const char* dot = strchr(hostname, '.');
  455|  7.66k|	if (dot)
  ------------------
  |  Branch (455:6): [True: 0, False: 7.66k]
  ------------------
  456|      0|	{
  457|      0|		const size_t dotlen = WINPR_ASSERTING_INT_CAST(size_t, (dot - hostname));
  ------------------
  |  |  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|	})
  ------------------
  458|      0|		if (dotlen < length)
  ------------------
  |  Branch (458:7): [True: 0, False: 0]
  ------------------
  459|      0|			length = dotlen;
  460|      0|	}
  461|       |
  462|  7.66k|	if ((*lpnSize <= (DWORD)length) || !lpBuffer)
  ------------------
  |  Branch (462:6): [True: 3.83k, False: 3.83k]
  |  Branch (462:37): [True: 0, False: 3.83k]
  ------------------
  463|  3.83k|	{
  464|  3.83k|		SetLastError(ERROR_BUFFER_OVERFLOW);
  ------------------
  |  |  266|  3.83k|#define ERROR_BUFFER_OVERFLOW 0x0000006F
  ------------------
  465|  3.83k|		*lpnSize = (DWORD)(length + 1);
  466|  3.83k|		return FALSE;
  ------------------
  |  |  113|  3.83k|#define FALSE false
  ------------------
  467|  3.83k|	}
  468|       |
  469|  3.83k|	strncpy(lpBuffer, hostname, length);
  470|  3.83k|	lpBuffer[length] = '\0';
  471|  3.83k|	*lpnSize = (DWORD)length;
  472|  3.83k|	return TRUE;
  ------------------
  |  |  117|  3.83k|#define TRUE true
  ------------------
  473|  7.66k|}
GetComputerNameExA:
  476|  7.66k|{
  477|  7.66k|	size_t length = 0;
  478|  7.66k|	char hostname[256] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  7.66k|	{                      \
  |  |   85|  7.66k|	} /** @since version 3.24.0 */
  ------------------
  479|       |
  480|  7.66k|	if (!lpnSize)
  ------------------
  |  Branch (480:6): [True: 0, False: 7.66k]
  ------------------
  481|      0|	{
  482|      0|		SetLastError(ERROR_BAD_ARGUMENTS);
  ------------------
  |  |  313|      0|#define ERROR_BAD_ARGUMENTS 0x000000A0
  ------------------
  483|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  484|      0|	}
  485|       |
  486|  7.66k|	if ((NameType == ComputerNameNetBIOS) || (NameType == ComputerNamePhysicalNetBIOS))
  ------------------
  |  Branch (486:6): [True: 7.66k, False: 0]
  |  Branch (486:43): [True: 0, False: 0]
  ------------------
  487|  7.66k|	{
  488|  7.66k|		BOOL rc = GetComputerNameA(lpBuffer, lpnSize);
  489|       |
  490|  7.66k|		if (!rc)
  ------------------
  |  Branch (490:7): [True: 3.83k, False: 3.83k]
  ------------------
  491|  3.83k|		{
  492|  3.83k|			if (GetLastError() == ERROR_BUFFER_OVERFLOW)
  ------------------
  |  |  266|  3.83k|#define ERROR_BUFFER_OVERFLOW 0x0000006F
  ------------------
  |  Branch (492:8): [True: 3.83k, False: 0]
  ------------------
  493|  3.83k|				SetLastError(ERROR_MORE_DATA);
  ------------------
  |  |  367|  3.83k|#define ERROR_MORE_DATA 0x000000EA
  ------------------
  494|  3.83k|		}
  495|       |
  496|  7.66k|		return rc;
  497|  7.66k|	}
  498|       |
  499|      0|	if (gethostname(hostname, sizeof(hostname)) == -1)
  ------------------
  |  Branch (499:6): [True: 0, False: 0]
  ------------------
  500|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  501|       |
  502|      0|	length = strnlen(hostname, sizeof(hostname));
  503|       |
  504|      0|	switch (NameType)
  505|      0|	{
  506|      0|		case ComputerNameDnsHostname:
  ------------------
  |  Branch (506:3): [True: 0, False: 0]
  ------------------
  507|      0|		case ComputerNameDnsDomain:
  ------------------
  |  Branch (507:3): [True: 0, False: 0]
  ------------------
  508|      0|		case ComputerNameDnsFullyQualified:
  ------------------
  |  Branch (508:3): [True: 0, False: 0]
  ------------------
  509|      0|		case ComputerNamePhysicalDnsHostname:
  ------------------
  |  Branch (509:3): [True: 0, False: 0]
  ------------------
  510|      0|		case ComputerNamePhysicalDnsDomain:
  ------------------
  |  Branch (510:3): [True: 0, False: 0]
  ------------------
  511|      0|		case ComputerNamePhysicalDnsFullyQualified:
  ------------------
  |  Branch (511:3): [True: 0, False: 0]
  ------------------
  512|      0|			if ((*lpnSize <= (DWORD)length) || !lpBuffer)
  ------------------
  |  Branch (512:8): [True: 0, False: 0]
  |  Branch (512:39): [True: 0, False: 0]
  ------------------
  513|      0|			{
  514|      0|				*lpnSize = (DWORD)(length + 1);
  515|      0|				SetLastError(ERROR_MORE_DATA);
  ------------------
  |  |  367|      0|#define ERROR_MORE_DATA 0x000000EA
  ------------------
  516|      0|				return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  517|      0|			}
  518|       |
  519|      0|			CopyMemory(lpBuffer, hostname, length);
  ------------------
  |  |  123|      0|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  520|      0|			lpBuffer[length] = '\0';
  521|      0|			*lpnSize = (DWORD)length;
  522|      0|			break;
  523|       |
  524|      0|		default:
  ------------------
  |  Branch (524:3): [True: 0, False: 0]
  ------------------
  525|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  526|      0|	}
  527|       |
  528|      0|	return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  529|      0|}
winpr_GetUnixTimeNS:
  630|  15.4k|{
  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|  15.4k|	struct timespec ts = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  15.4k|	{                      \
  |  |   85|  15.4k|	} /** @since version 3.24.0 */
  ------------------
  642|  15.4k|	if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
  ------------------
  |  Branch (642:6): [True: 0, False: 15.4k]
  ------------------
  643|      0|		return 0;
  644|  15.4k|	return WINPR_ASSERTING_INT_CAST(uint64_t, ts.tv_sec) * 1000000000ull +
  ------------------
  |  |  112|  15.4k|	__extension__({                                                                             \
  |  |  113|  15.4k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  15.4k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  15.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.4k|	do                                                                                             \
  |  |  |  |  |  |   61|  15.4k|	{                                                                                              \
  |  |  |  |  |  |   62|  15.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  15.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  15.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  15.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  15.4k|                                                                                                   \
  |  |  |  |  |  |   70|  15.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  15.4k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  15.4k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  15.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  15.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  15.4k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.4k|                                                                                                   \
  |  |  |  |  |  |   72|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  15.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  15.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  15.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  15.4k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  15.4k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  15.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.4k|	do                                                                                             \
  |  |  |  |  |  |   61|  15.4k|	{                                                                                              \
  |  |  |  |  |  |   62|  15.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  15.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  15.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  15.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  15.4k|                                                                                                   \
  |  |  |  |  |  |   70|  15.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  15.4k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  15.4k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  46.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 15.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 15.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  15.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  15.4k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.4k|                                                                                                   \
  |  |  |  |  |  |   72|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  15.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  15.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  15.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  15.4k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  15.4k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  15.4k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  15.4k|	})
  ------------------
  645|  15.4k|	       WINPR_ASSERTING_INT_CAST(uint64_t, ts.tv_nsec);
  ------------------
  |  |  112|  15.4k|	__extension__({                                                                             \
  |  |  113|  15.4k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  15.4k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  15.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.4k|	do                                                                                             \
  |  |  |  |  |  |   61|  15.4k|	{                                                                                              \
  |  |  |  |  |  |   62|  15.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  15.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  15.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  15.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  15.4k|                                                                                                   \
  |  |  |  |  |  |   70|  15.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  15.4k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  15.4k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  15.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  15.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  15.4k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.4k|                                                                                                   \
  |  |  |  |  |  |   72|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  15.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  15.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  15.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  15.4k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  15.4k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  15.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.4k|	do                                                                                             \
  |  |  |  |  |  |   61|  15.4k|	{                                                                                              \
  |  |  |  |  |  |   62|  15.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  15.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  15.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  15.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  15.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  15.4k|                                                                                                   \
  |  |  |  |  |  |   70|  15.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  15.4k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  15.4k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  46.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 15.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 15.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  15.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  15.4k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.4k|                                                                                                   \
  |  |  |  |  |  |   72|  15.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  15.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  15.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  15.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 15.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  15.4k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  15.4k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  15.4k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  15.4k|	})
  ------------------
  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|  15.4k|}

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

GetCurrentThreadId:
  907|  15.0k|{
  908|       |#if defined(__FreeBSD__)
  909|       |	return WINPR_CXX_COMPAT_CAST(DWORD, pthread_getthreadid_np());
  910|       |#elif defined(__linux__)
  911|  15.0k|	return WINPR_CXX_COMPAT_CAST(DWORD, syscall(SYS_gettid));
  ------------------
  |  |   33|  15.0k|#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|  15.0k|}

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,
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
   40|      0|		         winpr_strerror(errno, buffer, sizeof(buffer)), errno);
   41|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   42|      0|	}
   43|      2|	return TRUE;
  ------------------
  |  |  117|      2|#define TRUE true
  ------------------
   44|      2|}

winpr_backtrace_free:
   66|    149|{
   67|    149|	if (!buffer)
  ------------------
  |  Branch (67:6): [True: 0, False: 149]
  ------------------
   68|      0|		return;
   69|       |
   70|    149|#if defined(USE_UNWIND)
   71|    149|	winpr_unwind_backtrace_free(buffer);
   72|       |#elif defined(USE_EXECINFO)
   73|       |	winpr_execinfo_backtrace_free(buffer);
   74|       |#elif defined(WINPR_HAVE_CORKSCREW)
   75|       |	winpr_corkscrew_backtrace_free(buffer);
   76|       |#elif defined(_WIN32) || defined(_WIN64)
   77|       |	winpr_win_backtrace_free(buffer);
   78|       |#else
   79|       |	free(buffer);
   80|       |	WLog_FATAL(TAG, "%s", support_msg);
   81|       |#endif
   82|    149|}
winpr_backtrace:
   85|    149|{
   86|    149|#if defined(USE_UNWIND)
   87|    149|	return winpr_unwind_backtrace(size);
   88|       |#elif defined(USE_EXECINFO)
   89|       |	return winpr_execinfo_backtrace(size);
   90|       |#elif defined(WINPR_HAVE_CORKSCREW)
   91|       |	return winpr_corkscrew_backtrace(size);
   92|       |#elif (defined(_WIN32) || defined(_WIN64)) && !defined(_UWP)
   93|       |	return winpr_win_backtrace(size);
   94|       |#else
   95|       |	WLog_FATAL(TAG, "%s", support_msg);
   96|       |	/* return a non nullptr buffer to allow the backtrace function family to succeed without failing
   97|       |	 */
   98|       |	return strndup(support_msg, sizeof(support_msg));
   99|       |#endif
  100|    149|}
winpr_backtrace_symbols:
  103|    149|{
  104|    149|	if (used)
  ------------------
  |  Branch (104:6): [True: 149, False: 0]
  ------------------
  105|    149|		*used = 0;
  106|       |
  107|    149|	if (!buffer)
  ------------------
  |  Branch (107:6): [True: 0, False: 149]
  ------------------
  108|      0|	{
  109|      0|		WLog_FATAL(TAG, "%s", support_msg);
  ------------------
  |  |  340|      0|	WLog_Print_dbg_tag(tag, WLOG_FATAL, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   47|      0|#define WLOG_FATAL 5
  |  |  ------------------
  ------------------
  110|      0|		return nullptr;
  111|      0|	}
  112|       |
  113|    149|#if defined(USE_UNWIND)
  114|    149|	return winpr_unwind_backtrace_symbols(buffer, used);
  115|       |#elif defined(USE_EXECINFO)
  116|       |	return winpr_execinfo_backtrace_symbols(buffer, used);
  117|       |#elif defined(WINPR_HAVE_CORKSCREW)
  118|       |	return winpr_corkscrew_backtrace_symbols(buffer, used);
  119|       |#elif (defined(_WIN32) || defined(_WIN64)) && !defined(_UWP)
  120|       |	return winpr_win_backtrace_symbols(buffer, used);
  121|       |#else
  122|       |	WLog_FATAL(TAG, "%s", support_msg);
  123|       |
  124|       |	/* We return a char** on heap that is compatible with free:
  125|       |	 *
  126|       |	 * 1. We allocate sizeof(char*) + strlen + 1 bytes.
  127|       |	 * 2. The first sizeof(char*) bytes contain the pointer to the string following the pointer.
  128|       |	 * 3. The at data + sizeof(char*) contains the actual string
  129|       |	 */
  130|       |	size_t len = strnlen(support_msg, sizeof(support_msg));
  131|       |	char* ppmsg = calloc(sizeof(char*) + len + 1, sizeof(char));
  132|       |	if (!ppmsg)
  133|       |		return nullptr;
  134|       |	char** msgptr = (char**)ppmsg;
  135|       |	char* msg = &ppmsg[sizeof(char*)];
  136|       |
  137|       |	*msgptr = msg;
  138|       |	strncpy(msg, support_msg, len);
  139|       |	*used = 1;
  140|       |	return msgptr;
  141|       |#endif
  142|    149|}
winpr_log_backtrace_ex:
  177|    149|{
  178|    149|	size_t used = 0;
  179|    149|	char** msg = nullptr;
  180|    149|	void* stack = winpr_backtrace(20);
  181|       |
  182|    149|	if (!stack)
  ------------------
  |  Branch (182:6): [True: 0, False: 149]
  ------------------
  183|      0|	{
  184|      0|		WLog_Print(log, WLOG_ERROR, "winpr_backtrace failed!\n");
  ------------------
  |  |  247|      0|	do                                                           \
  |  |  248|      0|	{                                                            \
  |  |  249|      0|		if (WLog_IsLevelActive(_log, _log_level))                \
  |  |  ------------------
  |  |  |  Branch (249:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  250|      0|		{                                                        \
  |  |  251|      0|			WLog_Print_unchecked(_log, _log_level, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |  241|      0|	do                                                                                      \
  |  |  |  |  242|      0|	{                                                                                       \
  |  |  |  |  243|      0|		WLog_PrintTextMessage(_log, _log_level, __LINE__, __FILE__, __func__, __VA_ARGS__); \
  |  |  |  |  244|      0|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:11): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  252|      0|		}                                                        \
  |  |  253|      0|	} while (0)
  |  |  ------------------
  |  |  |  Branch (253:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  185|      0|		goto fail;
  186|      0|	}
  187|       |
  188|    149|	msg = winpr_backtrace_symbols(stack, &used);
  189|       |
  190|    149|	if (msg)
  ------------------
  |  Branch (190:6): [True: 149, False: 0]
  ------------------
  191|    149|	{
  192|  2.73k|		for (size_t x = 0; x < used; x++)
  ------------------
  |  Branch (192:22): [True: 2.58k, False: 149]
  ------------------
  193|  2.58k|			WLog_Print(log, level, "%" PRIuz ": %s", x, msg[x]);
  ------------------
  |  |  247|  2.58k|	do                                                           \
  |  |  248|  2.58k|	{                                                            \
  |  |  249|  2.58k|		if (WLog_IsLevelActive(_log, _log_level))                \
  |  |  ------------------
  |  |  |  Branch (249:7): [True: 2.58k, False: 0]
  |  |  ------------------
  |  |  250|  2.58k|		{                                                        \
  |  |  251|  2.58k|			WLog_Print_unchecked(_log, _log_level, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |  241|  2.58k|	do                                                                                      \
  |  |  |  |  242|  2.58k|	{                                                                                       \
  |  |  |  |  243|  2.58k|		WLog_PrintTextMessage(_log, _log_level, __LINE__, __FILE__, __func__, __VA_ARGS__); \
  |  |  |  |  244|  2.58k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:11): [Folded, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  252|  2.58k|		}                                                        \
  |  |  253|  2.58k|	} while (0)
  |  |  ------------------
  |  |  |  Branch (253:11): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
  194|    149|	}
  195|    149|	free((void*)msg);
  196|       |
  197|    149|fail:
  198|    149|	winpr_backtrace_free(stack);
  199|    149|}

NTOWFv1W:
   35|     67|{
   36|     67|	if (!Password || !NtHash)
  ------------------
  |  Branch (36:6): [True: 0, False: 67]
  |  Branch (36:19): [True: 0, False: 67]
  ------------------
   37|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   38|       |
   39|     67|	if (!winpr_Digest(WINPR_MD_MD4, Password, PasswordLengthInBytes, NtHash,
  ------------------
  |  Branch (39:6): [True: 0, False: 67]
  ------------------
   40|     67|	                  WINPR_MD4_DIGEST_LENGTH))
  ------------------
  |  |   32|     67|#define WINPR_MD4_DIGEST_LENGTH 16
  ------------------
   41|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   42|       |
   43|     67|	return TRUE;
  ------------------
  |  |  117|     67|#define TRUE true
  ------------------
   44|     67|}
NTOWFv2W:
   84|     67|{
   85|     67|	BYTE NtHashV1[WINPR_MD5_DIGEST_LENGTH] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     67|	{                      \
  |  |   85|     67|	} /** @since version 3.24.0 */
  ------------------
   86|       |
   87|     67|	if (!Domain && (DomainLengthInBytes > 0))
  ------------------
  |  Branch (87:6): [True: 0, False: 67]
  |  Branch (87:17): [True: 0, False: 0]
  ------------------
   88|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   89|     67|	if (!User || !Password || !NtHash)
  ------------------
  |  Branch (89:6): [True: 0, False: 67]
  |  Branch (89:15): [True: 0, False: 67]
  |  Branch (89:28): [True: 0, False: 67]
  ------------------
   90|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   91|       |
   92|     67|	if (!NTOWFv1W(Password, PasswordLengthInBytes, NtHashV1))
  ------------------
  |  Branch (92:6): [True: 0, False: 67]
  ------------------
   93|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   94|       |
   95|     67|	return NTOWFv2FromHashW(NtHashV1, User, UserLengthInBytes, Domain, DomainLengthInBytes, NtHash);
   96|     67|}
NTOWFv2FromHashW:
  153|     67|{
  154|     67|	BYTE result = FALSE;
  ------------------
  |  |  113|     67|#define FALSE false
  ------------------
  155|       |
  156|     67|	if (!NtHash || !NtHashV1)
  ------------------
  |  Branch (156:6): [True: 0, False: 67]
  |  Branch (156:17): [True: 0, False: 67]
  ------------------
  157|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  158|       |
  159|     67|	if (!User && (UserLengthInBytes > 0))
  ------------------
  |  Branch (159:6): [True: 0, False: 67]
  |  Branch (159:15): [True: 0, False: 0]
  ------------------
  160|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  161|     67|	if (!Domain && (DomainLengthInBytes > 0))
  ------------------
  |  Branch (161:6): [True: 0, False: 67]
  |  Branch (161:17): [True: 0, False: 0]
  ------------------
  162|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  163|       |
  164|     67|	if (!User)
  ------------------
  |  Branch (164:6): [True: 0, False: 67]
  ------------------
  165|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  166|       |
  167|     67|	BYTE* buffer = (BYTE*)malloc(UserLengthInBytes + DomainLengthInBytes);
  168|     67|	if (!buffer)
  ------------------
  |  Branch (168:6): [True: 0, False: 67]
  ------------------
  169|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  170|       |
  171|       |	/* Concatenate(UpperCase(User), Domain) */
  172|     67|	CopyMemory(buffer, User, UserLengthInBytes);
  ------------------
  |  |  123|     67|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  173|     67|	CharUpperBuffW((LPWSTR)buffer, UserLengthInBytes / 2);
  174|       |
  175|     67|	if (DomainLengthInBytes > 0)
  ------------------
  |  Branch (175:6): [True: 67, False: 0]
  ------------------
  176|     67|	{
  177|     67|		CopyMemory(&buffer[UserLengthInBytes], Domain, DomainLengthInBytes);
  ------------------
  |  |  123|     67|#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length))
  ------------------
  178|     67|	}
  179|       |
  180|       |	/* Compute the HMAC-MD5 hash of the above value using the NTLMv1 hash as the key, the result is
  181|       |	 * the NTLMv2 hash */
  182|     67|	if (!winpr_HMAC(WINPR_MD_MD5, NtHashV1, 16, buffer, UserLengthInBytes + DomainLengthInBytes,
  ------------------
  |  Branch (182:6): [True: 0, False: 67]
  ------------------
  183|     67|	                NtHash, WINPR_MD5_DIGEST_LENGTH))
  ------------------
  |  |   33|     67|#define WINPR_MD5_DIGEST_LENGTH 16
  ------------------
  184|      0|		goto out_fail;
  185|       |
  186|     67|	result = TRUE;
  ------------------
  |  |  117|     67|#define TRUE true
  ------------------
  187|     67|out_fail:
  188|     67|	free(buffer);
  189|     67|	return result;
  190|     67|}

winpr_BinToHexStringBuffer:
  214|    108|{
  215|    108|	const size_t n = space ? 3 : 2;
  ------------------
  |  Branch (215:19): [True: 108, False: 0]
  ------------------
  216|    108|	const char bin2hex[] = "0123456789ABCDEF";
  217|    108|	const size_t maxLength = MIN(length, dstSize / n);
  ------------------
  |  |   34|    108|#define MIN(a, b) (a) < (b) ? (a) : (b)
  |  |  ------------------
  |  |  |  Branch (34:19): [True: 0, False: 108]
  |  |  ------------------
  ------------------
  218|       |
  219|    108|	if (!data || !dstStr || (length == 0) || (dstSize == 0))
  ------------------
  |  Branch (219:6): [True: 0, False: 108]
  |  Branch (219:15): [True: 0, False: 108]
  |  Branch (219:26): [True: 0, False: 108]
  |  Branch (219:43): [True: 0, False: 108]
  ------------------
  220|      0|		return 0;
  221|       |
  222|    972|	for (size_t i = 0; i < maxLength; i++)
  ------------------
  |  Branch (222:21): [True: 864, False: 108]
  ------------------
  223|    864|	{
  224|    864|		const int ln = data[i] & 0xF;
  225|    864|		const int hn = (data[i] >> 4) & 0xF;
  226|    864|		char* dst = &dstStr[i * n];
  227|       |
  228|    864|		dst[0] = bin2hex[hn];
  229|    864|		dst[1] = bin2hex[ln];
  230|       |
  231|    864|		if (space)
  ------------------
  |  Branch (231:7): [True: 864, False: 0]
  ------------------
  232|    864|			dst[2] = ' ';
  233|    864|	}
  234|       |
  235|    108|	if (space && (maxLength > 0))
  ------------------
  |  Branch (235:6): [True: 108, False: 0]
  |  Branch (235:15): [True: 108, False: 0]
  ------------------
  236|    108|	{
  237|    108|		dstStr[maxLength * n - 1] = '\0';
  238|    108|		return maxLength * n - 1;
  239|    108|	}
  240|      0|	dstStr[maxLength * n] = '\0';
  241|      0|	return maxLength * n;
  242|    108|}

winpr_InitializeSSL:
  350|      1|{
  351|      1|	static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
  ------------------
  |  |  402|      1|#define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
  |  |  ------------------
  |  |  |  |  377|      1|	{                     \
  |  |  |  |  378|      1|		0                 \
  |  |  |  |  379|      1|	}
  |  |  ------------------
  ------------------
  352|       |
  353|      1|	if (!InitOnceExecuteOnce(&once, winpr_openssl_initialize, &flags, nullptr))
  ------------------
  |  |  424|      1|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
  |  Branch (353:6): [True: 0, False: 1]
  ------------------
  354|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  355|       |
  356|      1|	return winpr_enable_fips(flags);
  357|      1|}
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");
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
  384|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  385|      0|		}
  386|       |
  387|      0|		g_winpr_openssl_initialized_by_winpr = FALSE;
  ------------------
  |  |  113|      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;
  ------------------
  |  |  117|      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;
  ------------------
  |  |  117|      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;
  ------------------
  |  |  113|      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;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  344|      1|	return TRUE;
  ------------------
  |  |  117|      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|      1|{
  247|      1|	if (flags & WINPR_SSL_INIT_ENABLE_FIPS)
  ------------------
  |  |   30|      1|#define WINPR_SSL_INIT_ENABLE_FIPS 0x4
  ------------------
  |  Branch (247:6): [True: 0, False: 1]
  ------------------
  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");
  ------------------
  |  |  332|      0|	WLog_Print_dbg_tag(tag, WLOG_DEBUG, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   43|      0|#define WLOG_DEBUG 1
  |  |  ------------------
  ------------------
  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!");
  ------------------
  |  |  334|      0|	WLog_Print_dbg_tag(tag, WLOG_INFO, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   44|      0|#define WLOG_INFO 2
  |  |  ------------------
  ------------------
  272|      0|			else
  273|      0|			{
  274|      0|				WLog_ERR(TAG, "Openssl fips mode enable failed!");
  ------------------
  |  |  338|      0|	WLog_Print_dbg_tag(tag, WLOG_ERROR, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   46|      0|#define WLOG_ERROR 4
  |  |  ------------------
  ------------------
  275|      0|				return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  276|      0|			}
  277|      0|		}
  278|       |
  279|      0|#endif
  280|      0|	}
  281|       |
  282|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  283|      1|}

Stream_StaticConstInit:
  121|  1.91k|{
  122|  1.91k|	union
  123|  1.91k|	{
  124|  1.91k|		BYTE* b;
  125|  1.91k|		const BYTE* cb;
  126|  1.91k|	} cnv;
  127|       |
  128|  1.91k|	cnv.cb = buffer;
  129|  1.91k|	return Stream_StaticInit(s, cnv.b, size);
  130|  1.91k|}
Stream_StaticInit:
  133|  3.51k|{
  134|  3.51k|	const wStream empty = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  3.51k|	{                      \
  |  |   85|  3.51k|	} /** @since version 3.24.0 */
  ------------------
  135|       |
  136|  3.51k|	WINPR_ASSERT(s);
  ------------------
  |  |   76|  3.51k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.51k|	do                                                                                             \
  |  |  |  |   61|  3.51k|	{                                                                                              \
  |  |  |  |   62|  3.51k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.51k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.51k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.51k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.51k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.51k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.51k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.51k|                                                                                                   \
  |  |  |  |   70|  3.51k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.51k|	do                                                      \
  |  |  |  |  |  |   32|  3.51k|	{                                                       \
  |  |  |  |  |  |   33|  3.51k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.51k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.51k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.51k|                                                                                                   \
  |  |  |  |   72|  3.51k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.51k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.51k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.51k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|  3.51k|	WINPR_ASSERT(buffer);
  ------------------
  |  |   76|  3.51k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  3.51k|	do                                                                                             \
  |  |  |  |   61|  3.51k|	{                                                                                              \
  |  |  |  |   62|  3.51k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  3.51k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  3.51k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  3.51k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  3.51k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  3.51k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  3.51k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  3.51k|                                                                                                   \
  |  |  |  |   70|  3.51k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  3.51k|	do                                                      \
  |  |  |  |  |  |   32|  3.51k|	{                                                       \
  |  |  |  |  |  |   33|  3.51k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 3.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.51k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  3.51k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 3.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  3.51k|                                                                                                   \
  |  |  |  |   72|  3.51k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  3.51k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  3.51k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  3.51k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 3.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  138|       |
  139|  3.51k|	*s = empty;
  140|  3.51k|	s->buffer = s->pointer = buffer;
  141|  3.51k|	s->capacity = s->length = size;
  142|  3.51k|	s->pool = nullptr;
  143|  3.51k|	s->count = 1;
  144|  3.51k|	s->isAllocatedStream = FALSE;
  ------------------
  |  |  113|  3.51k|#define FALSE false
  ------------------
  145|  3.51k|	s->isOwner = FALSE;
  ------------------
  |  |  113|  3.51k|#define FALSE false
  ------------------
  146|  3.51k|	return s;
  147|  3.51k|}
Stream_SetPosition:
  186|  3.22k|{
  187|  3.22k|	if ((_p) > Stream_Capacity(_s))
  ------------------
  |  Branch (187:6): [True: 0, False: 3.22k]
  ------------------
  188|      0|	{
  189|      0|		_s->pointer = _s->buffer;
  190|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  191|      0|	}
  192|  3.22k|	_s->pointer = _s->buffer + (_p);
  193|  3.22k|	return TRUE;
  ------------------
  |  |  117|  3.22k|#define TRUE true
  ------------------
  194|  3.22k|}
Stream_GetRemainingCapacity:
  245|  72.8k|{
  246|  72.8k|	size_t cur = 0;
  247|  72.8k|	WINPR_ASSERT(_s);
  ------------------
  |  |   76|  72.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  72.8k|	do                                                                                             \
  |  |  |  |   61|  72.8k|	{                                                                                              \
  |  |  |  |   62|  72.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  72.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  72.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  72.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  72.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  72.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  72.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  72.8k|                                                                                                   \
  |  |  |  |   70|  72.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  72.8k|	do                                                      \
  |  |  |  |  |  |   32|  72.8k|	{                                                       \
  |  |  |  |  |  |   33|  72.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 72.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  72.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  72.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 72.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  72.8k|                                                                                                   \
  |  |  |  |   72|  72.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  72.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  72.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  72.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 72.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|  72.8k|	WINPR_ASSERT(_s->buffer <= _s->pointer);
  ------------------
  |  |   76|  72.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  72.8k|	do                                                                                             \
  |  |  |  |   61|  72.8k|	{                                                                                              \
  |  |  |  |   62|  72.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  72.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  72.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  72.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  72.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  72.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  72.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  72.8k|                                                                                                   \
  |  |  |  |   70|  72.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  72.8k|	do                                                      \
  |  |  |  |  |  |   32|  72.8k|	{                                                       \
  |  |  |  |  |  |   33|  72.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 72.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  72.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  72.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 72.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  72.8k|                                                                                                   \
  |  |  |  |   72|  72.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  72.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  72.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  72.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 72.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  72.8k|	cur = (size_t)(_s->pointer - _s->buffer);
  250|  72.8k|	WINPR_ASSERT(cur <= _s->capacity);
  ------------------
  |  |   76|  72.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  72.8k|	do                                                                                             \
  |  |  |  |   61|  72.8k|	{                                                                                              \
  |  |  |  |   62|  72.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  72.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  72.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  72.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  72.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  72.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  72.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  72.8k|                                                                                                   \
  |  |  |  |   70|  72.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  72.8k|	do                                                      \
  |  |  |  |  |  |   32|  72.8k|	{                                                       \
  |  |  |  |  |  |   33|  72.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 72.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  72.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  72.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 72.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  72.8k|                                                                                                   \
  |  |  |  |   72|  72.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  72.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  72.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  72.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 72.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  251|  72.8k|	if (cur > _s->capacity)
  ------------------
  |  Branch (251:6): [True: 0, False: 72.8k]
  ------------------
  252|      0|	{
  253|      0|		WLog_FATAL(STREAM_TAG, "wStream API misuse: stream was written out of bounds");
  ------------------
  |  |  340|      0|	WLog_Print_dbg_tag(tag, WLOG_FATAL, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   47|      0|#define WLOG_FATAL 5
  |  |  ------------------
  ------------------
  254|      0|		winpr_log_backtrace(STREAM_TAG, WLOG_FATAL, 20);
  ------------------
  |  |   30|      0|#define STREAM_TAG WINPR_TAG("wStream")
  |  |  ------------------
  |  |  |  |   25|      0|#define WINPR_TAG(tag) "com.winpr." tag
  |  |  ------------------
  ------------------
              		winpr_log_backtrace(STREAM_TAG, WLOG_FATAL, 20);
  ------------------
  |  |   47|      0|#define WLOG_FATAL 5
  ------------------
  255|      0|		return 0;
  256|      0|	}
  257|  72.8k|	return (_s->capacity - cur);
  258|  72.8k|}
Stream_GetRemainingLength:
  261|  29.4k|{
  262|  29.4k|	size_t cur = 0;
  263|  29.4k|	WINPR_ASSERT(_s);
  ------------------
  |  |   76|  29.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  29.4k|	do                                                                                             \
  |  |  |  |   61|  29.4k|	{                                                                                              \
  |  |  |  |   62|  29.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  29.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  29.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  29.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  29.4k|                                                                                                   \
  |  |  |  |   70|  29.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  29.4k|	do                                                      \
  |  |  |  |  |  |   32|  29.4k|	{                                                       \
  |  |  |  |  |  |   33|  29.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  29.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  29.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  29.4k|                                                                                                   \
  |  |  |  |   72|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  29.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  29.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  29.4k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 29.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  264|  29.4k|	WINPR_ASSERT(_s->buffer <= _s->pointer);
  ------------------
  |  |   76|  29.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  29.4k|	do                                                                                             \
  |  |  |  |   61|  29.4k|	{                                                                                              \
  |  |  |  |   62|  29.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  29.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  29.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  29.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  29.4k|                                                                                                   \
  |  |  |  |   70|  29.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  29.4k|	do                                                      \
  |  |  |  |  |  |   32|  29.4k|	{                                                       \
  |  |  |  |  |  |   33|  29.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  29.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  29.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  29.4k|                                                                                                   \
  |  |  |  |   72|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  29.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  29.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  29.4k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 29.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  265|  29.4k|	WINPR_ASSERT(_s->length <= _s->capacity);
  ------------------
  |  |   76|  29.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  29.4k|	do                                                                                             \
  |  |  |  |   61|  29.4k|	{                                                                                              \
  |  |  |  |   62|  29.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  29.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  29.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  29.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  29.4k|                                                                                                   \
  |  |  |  |   70|  29.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  29.4k|	do                                                      \
  |  |  |  |  |  |   32|  29.4k|	{                                                       \
  |  |  |  |  |  |   33|  29.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  29.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  29.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  29.4k|                                                                                                   \
  |  |  |  |   72|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  29.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  29.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  29.4k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 29.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  266|  29.4k|	cur = (size_t)(_s->pointer - _s->buffer);
  267|  29.4k|	WINPR_ASSERT(cur <= _s->length);
  ------------------
  |  |   76|  29.4k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  29.4k|	do                                                                                             \
  |  |  |  |   61|  29.4k|	{                                                                                              \
  |  |  |  |   62|  29.4k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  29.4k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  29.4k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  29.4k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  29.4k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  29.4k|                                                                                                   \
  |  |  |  |   70|  29.4k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  29.4k|	do                                                      \
  |  |  |  |  |  |   32|  29.4k|	{                                                       \
  |  |  |  |  |  |   33|  29.4k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  29.4k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  29.4k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  29.4k|                                                                                                   \
  |  |  |  |   72|  29.4k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  29.4k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  29.4k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  29.4k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 29.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|  29.4k|	if (cur > _s->length)
  ------------------
  |  Branch (268:6): [True: 0, False: 29.4k]
  ------------------
  269|      0|	{
  270|      0|		WLog_FATAL(STREAM_TAG, "wStream API misuse: stream was read out of bounds");
  ------------------
  |  |  340|      0|	WLog_Print_dbg_tag(tag, WLOG_FATAL, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   47|      0|#define WLOG_FATAL 5
  |  |  ------------------
  ------------------
  271|      0|		winpr_log_backtrace(STREAM_TAG, WLOG_FATAL, 20);
  ------------------
  |  |   30|      0|#define STREAM_TAG WINPR_TAG("wStream")
  |  |  ------------------
  |  |  |  |   25|      0|#define WINPR_TAG(tag) "com.winpr." tag
  |  |  ------------------
  ------------------
              		winpr_log_backtrace(STREAM_TAG, WLOG_FATAL, 20);
  ------------------
  |  |   47|      0|#define WLOG_FATAL 5
  ------------------
  272|      0|		return 0;
  273|      0|	}
  274|  29.4k|	return (_s->length - cur);
  275|  29.4k|}
Stream_CheckAndLogRequiredCapacityEx:
  309|  10.3k|{
  310|  10.3k|	WINPR_ASSERT(size != 0);
  ------------------
  |  |   76|  10.3k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  10.3k|	do                                                                                             \
  |  |  |  |   61|  10.3k|	{                                                                                              \
  |  |  |  |   62|  10.3k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  10.3k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  10.3k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  10.3k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  10.3k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  10.3k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  10.3k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  10.3k|                                                                                                   \
  |  |  |  |   70|  10.3k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  10.3k|	do                                                      \
  |  |  |  |  |  |   32|  10.3k|	{                                                       \
  |  |  |  |  |  |   33|  10.3k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  10.3k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  10.3k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  10.3k|                                                                                                   \
  |  |  |  |   72|  10.3k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  10.3k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  10.3k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  10.3k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 10.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  311|  10.3k|	const size_t actual = Stream_GetRemainingCapacity(s) / size;
  312|       |
  313|  10.3k|	if (actual < nmemb)
  ------------------
  |  Branch (313:6): [True: 18, False: 10.3k]
  ------------------
  314|     18|	{
  315|     18|		va_list args = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     18|	{                      \
  |  |   85|     18|	} /** @since version 3.24.0 */
  ------------------
  316|       |
  317|     18|		va_start(args, fmt);
  318|     18|		const BOOL rc =
  319|     18|		    Stream_CheckAndLogRequiredCapacityExVa(tag, level, s, nmemb, size, fmt, args);
  320|     18|		va_end(args);
  321|     18|		return rc;
  322|     18|	}
  323|  10.3k|	return TRUE;
  ------------------
  |  |  117|  10.3k|#define TRUE true
  ------------------
  324|  10.3k|}
Stream_CheckAndLogRequiredCapacityExVa:
  328|     18|{
  329|     18|	WINPR_ASSERT(size != 0);
  ------------------
  |  |   76|     18|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     18|	do                                                                                             \
  |  |  |  |   61|     18|	{                                                                                              \
  |  |  |  |   62|     18|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     18|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     18|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     18|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     18|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     18|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     18|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     18|                                                                                                   \
  |  |  |  |   70|     18|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     18|	do                                                      \
  |  |  |  |  |  |   32|     18|	{                                                       \
  |  |  |  |  |  |   33|     18|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     18|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     18|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     18|                                                                                                   \
  |  |  |  |   72|     18|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     18|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     18|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     18|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  330|     18|	const size_t actual = Stream_GetRemainingCapacity(s) / size;
  331|       |
  332|     18|	if (actual < nmemb)
  ------------------
  |  Branch (332:6): [True: 18, False: 0]
  ------------------
  333|     18|		return Stream_CheckAndLogRequiredCapacityWLogExVa(WLog_Get(tag), level, s, nmemb, size, fmt,
  334|     18|		                                                  args);
  335|      0|	return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  336|     18|}
Stream_CheckAndLogRequiredCapacityWLogExVa:
  342|     18|{
  343|       |
  344|     18|	WINPR_ASSERT(size != 0);
  ------------------
  |  |   76|     18|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|     18|	do                                                                                             \
  |  |  |  |   61|     18|	{                                                                                              \
  |  |  |  |   62|     18|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|     18|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|     18|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|     18|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|     18|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|     18|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|     18|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|     18|                                                                                                   \
  |  |  |  |   70|     18|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|     18|	do                                                      \
  |  |  |  |  |  |   32|     18|	{                                                       \
  |  |  |  |  |  |   33|     18|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|     18|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|     18|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|     18|                                                                                                   \
  |  |  |  |   72|     18|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|     18|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|     18|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|     18|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  345|     18|	const size_t actual = Stream_GetRemainingCapacity(s) / size;
  346|       |
  347|     18|	if (actual < nmemb)
  ------------------
  |  Branch (347:6): [True: 18, False: 0]
  ------------------
  348|     18|	{
  349|     18|		char prefix[1024] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|     18|	{                      \
  |  |   85|     18|	} /** @since version 3.24.0 */
  ------------------
  350|       |
  351|     18|		(void)vsnprintf(prefix, sizeof(prefix), fmt, args);
  352|       |
  353|     18|		WLog_Print(log, level,
  ------------------
  |  |  247|     18|	do                                                           \
  |  |  248|     18|	{                                                            \
  |  |  249|     18|		if (WLog_IsLevelActive(_log, _log_level))                \
  |  |  ------------------
  |  |  |  Branch (249:7): [True: 18, False: 0]
  |  |  ------------------
  |  |  250|     18|		{                                                        \
  |  |  251|     18|			WLog_Print_unchecked(_log, _log_level, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |  241|     18|	do                                                                                      \
  |  |  |  |  242|     18|	{                                                                                       \
  |  |  |  |  243|     18|		WLog_PrintTextMessage(_log, _log_level, __LINE__, __FILE__, __func__, __VA_ARGS__); \
  |  |  |  |  244|     18|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:11): [Folded, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  252|     18|		}                                                        \
  |  |  253|     18|	} while (0)
  |  |  ------------------
  |  |  |  Branch (253:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  354|     18|		           "[%s] invalid remaining capacity, got %" PRIuz ", require at least %" PRIuz
  355|     18|		           " [element size=%" PRIuz "]",
  356|     18|		           prefix, actual, nmemb, size);
  357|     18|		winpr_log_backtrace_ex(log, level, 20);
  358|     18|		return FALSE;
  ------------------
  |  |  113|     18|#define FALSE false
  ------------------
  359|     18|	}
  360|      0|	return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  361|     18|}
Stream_CheckAndLogRequiredLengthEx:
  387|  9.20k|{
  388|  9.20k|	WINPR_ASSERT(size > 0);
  ------------------
  |  |   76|  9.20k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  9.20k|	do                                                                                             \
  |  |  |  |   61|  9.20k|	{                                                                                              \
  |  |  |  |   62|  9.20k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  9.20k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  9.20k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  9.20k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  9.20k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  9.20k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  9.20k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  9.20k|                                                                                                   \
  |  |  |  |   70|  9.20k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  9.20k|	do                                                      \
  |  |  |  |  |  |   32|  9.20k|	{                                                       \
  |  |  |  |  |  |   33|  9.20k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 9.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  9.20k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  9.20k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 9.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  9.20k|                                                                                                   \
  |  |  |  |   72|  9.20k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  9.20k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  9.20k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  9.20k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 9.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  389|  9.20k|	const size_t actual = Stream_GetRemainingLength(s) / size;
  390|       |
  391|  9.20k|	if (actual < nmemb)
  ------------------
  |  Branch (391:6): [True: 131, False: 9.07k]
  ------------------
  392|    131|	{
  393|    131|		va_list args = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    131|	{                      \
  |  |   85|    131|	} /** @since version 3.24.0 */
  ------------------
  394|       |
  395|    131|		va_start(args, fmt);
  396|    131|		const BOOL rc = Stream_CheckAndLogRequiredLengthExVa(tag, level, s, nmemb, size, fmt, args);
  397|    131|		va_end(args);
  398|    131|		return rc;
  399|    131|	}
  400|  9.07k|	return TRUE;
  ------------------
  |  |  117|  9.07k|#define TRUE true
  ------------------
  401|  9.20k|}
Stream_CheckAndLogRequiredLengthExVa:
  405|    131|{
  406|    131|	WINPR_ASSERT(size > 0);
  ------------------
  |  |   76|    131|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    131|	do                                                                                             \
  |  |  |  |   61|    131|	{                                                                                              \
  |  |  |  |   62|    131|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    131|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    131|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    131|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    131|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    131|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    131|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    131|                                                                                                   \
  |  |  |  |   70|    131|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    131|	do                                                      \
  |  |  |  |  |  |   32|    131|	{                                                       \
  |  |  |  |  |  |   33|    131|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 131]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    131|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    131|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 131]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    131|                                                                                                   \
  |  |  |  |   72|    131|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    131|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    131|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    131|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 131]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  407|    131|	const size_t actual = Stream_GetRemainingLength(s) / size;
  408|       |
  409|    131|	if (actual < nmemb)
  ------------------
  |  Branch (409:6): [True: 131, False: 0]
  ------------------
  410|    131|		return Stream_CheckAndLogRequiredLengthWLogExVa(WLog_Get(tag), level, s, nmemb, size, fmt,
  411|    131|		                                                args);
  412|      0|	return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  413|    131|}
Stream_CheckAndLogRequiredLengthWLogExVa:
  438|    131|{
  439|    131|	WINPR_ASSERT(size > 0);
  ------------------
  |  |   76|    131|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    131|	do                                                                                             \
  |  |  |  |   61|    131|	{                                                                                              \
  |  |  |  |   62|    131|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    131|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    131|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    131|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    131|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    131|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    131|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    131|                                                                                                   \
  |  |  |  |   70|    131|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    131|	do                                                      \
  |  |  |  |  |  |   32|    131|	{                                                       \
  |  |  |  |  |  |   33|    131|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 131]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    131|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    131|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 131]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    131|                                                                                                   \
  |  |  |  |   72|    131|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    131|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    131|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    131|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 131]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  440|    131|	const size_t actual = Stream_GetRemainingLength(s) / size;
  441|       |
  442|    131|	if (actual < nmemb)
  ------------------
  |  Branch (442:6): [True: 131, False: 0]
  ------------------
  443|    131|	{
  444|    131|		char prefix[1024] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|    131|	{                      \
  |  |   85|    131|	} /** @since version 3.24.0 */
  ------------------
  445|       |
  446|    131|		(void)vsnprintf(prefix, sizeof(prefix), fmt, args);
  447|       |
  448|    131|		WLog_Print(log, level,
  ------------------
  |  |  247|    131|	do                                                           \
  |  |  248|    131|	{                                                            \
  |  |  249|    131|		if (WLog_IsLevelActive(_log, _log_level))                \
  |  |  ------------------
  |  |  |  Branch (249:7): [True: 131, False: 0]
  |  |  ------------------
  |  |  250|    131|		{                                                        \
  |  |  251|    131|			WLog_Print_unchecked(_log, _log_level, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |  241|    131|	do                                                                                      \
  |  |  |  |  242|    131|	{                                                                                       \
  |  |  |  |  243|    131|		WLog_PrintTextMessage(_log, _log_level, __LINE__, __FILE__, __func__, __VA_ARGS__); \
  |  |  |  |  244|    131|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:11): [Folded, False: 131]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  252|    131|		}                                                        \
  |  |  253|    131|	} while (0)
  |  |  ------------------
  |  |  |  Branch (253:11): [Folded, False: 131]
  |  |  ------------------
  ------------------
  449|    131|		           "[%s] invalid length, got %" PRIuz ", require at least %" PRIuz
  450|    131|		           " [element size=%" PRIuz "]",
  451|    131|		           prefix, actual, nmemb, size);
  452|    131|		winpr_log_backtrace_ex(log, level, 20);
  453|    131|		return FALSE;
  ------------------
  |  |  113|    131|#define FALSE false
  ------------------
  454|    131|	}
  455|      0|	return TRUE;
  ------------------
  |  |  117|      0|#define TRUE true
  ------------------
  456|    131|}

winpr_unwind_backtrace:
  129|    149|{
  130|    149|	_Unwind_Reason_Code rc = _URC_FOREIGN_EXCEPTION_CAUGHT;
  131|    149|	unwind_context_t* ctx = calloc(1, sizeof(unwind_context_t));
  132|    149|	if (!ctx)
  ------------------
  |  Branch (132:6): [True: 0, False: 149]
  ------------------
  133|      0|		goto fail;
  134|    149|	ctx->size = size;
  135|    149|	ctx->info = calloc(size, sizeof(unwind_info_t));
  136|    149|	if (!ctx->info)
  ------------------
  |  Branch (136:6): [True: 0, False: 149]
  ------------------
  137|      0|		goto fail;
  138|       |
  139|    149|	rc = _Unwind_Backtrace(unwind_backtrace_callback, ctx);
  140|    149|	if (rc != _URC_END_OF_STACK)
  ------------------
  |  Branch (140:6): [True: 0, False: 149]
  ------------------
  141|      0|	{
  142|       |		/* https://github.com/FreeRDP/FreeRDP/issues/11490
  143|       |		 *
  144|       |		 * there seems to be no consensus on what to return from this function.
  145|       |		 * so we just warn about unexpected return codes and return the context regardless.
  146|       |		 */
  147|      0|		char buffer[64] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|      0|	{                      \
  |  |   85|      0|	} /** @since version 3.24.0 */
  ------------------
  148|      0|		WLog_WARN(TAG, "_Unwind_Backtrace failed with %s",
  ------------------
  |  |  336|      0|	WLog_Print_dbg_tag(tag, WLOG_WARN, __LINE__, __FILE__, __func__, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   45|      0|#define WLOG_WARN 3
  |  |  ------------------
  ------------------
  149|      0|		          unwind_reason_str_buffer(rc, buffer, sizeof(buffer)));
  150|      0|	}
  151|       |
  152|    149|	return ctx;
  153|      0|fail:
  154|      0|	winpr_unwind_backtrace_free(ctx);
  155|      0|	return nullptr;
  156|    149|}
winpr_unwind_backtrace_free:
  159|    149|{
  160|    149|	unwind_context_t* ctx = buffer;
  161|    149|	if (!ctx)
  ------------------
  |  Branch (161:6): [True: 0, False: 149]
  ------------------
  162|      0|		return;
  163|    149|	free(ctx->info);
  164|    149|	free(ctx);
  165|    149|}
winpr_unwind_backtrace_symbols:
  168|    149|{
  169|    149|	union
  170|    149|	{
  171|    149|		void* pv;
  172|    149|		char* cp;
  173|    149|		char** cpp;
  174|    149|	} cnv;
  175|    149|	unwind_context_t* ctx = buffer;
  176|    149|	cnv.cpp = nullptr;
  177|       |
  178|    149|	if (!ctx)
  ------------------
  |  Branch (178:6): [True: 0, False: 149]
  ------------------
  179|      0|		return nullptr;
  180|       |
  181|    149|	cnv.pv = calloc(ctx->pos * (sizeof(char*) + UNWIND_MAX_LINE_SIZE), sizeof(char*));
  ------------------
  |  |   39|    149|#define UNWIND_MAX_LINE_SIZE 1024ULL
  ------------------
  182|    149|	if (!cnv.pv)
  ------------------
  |  Branch (182:6): [True: 0, False: 149]
  ------------------
  183|      0|		return nullptr;
  184|       |
  185|    149|	if (used)
  ------------------
  |  Branch (185:6): [True: 149, False: 0]
  ------------------
  186|    149|		*used = ctx->pos;
  187|       |
  188|  2.73k|	for (size_t x = 0; x < ctx->pos; x++)
  ------------------
  |  Branch (188:21): [True: 2.58k, False: 149]
  ------------------
  189|  2.58k|	{
  190|  2.58k|		char* msg = cnv.cp + ctx->pos * sizeof(char*) + x * UNWIND_MAX_LINE_SIZE;
  ------------------
  |  |   39|  2.58k|#define UNWIND_MAX_LINE_SIZE 1024ULL
  ------------------
  191|  2.58k|		const unwind_info_t* info = &ctx->info[x];
  192|  2.58k|		Dl_info dlinfo = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  2.58k|	{                      \
  |  |   85|  2.58k|	} /** @since version 3.24.0 */
  ------------------
  193|  2.58k|		int rc = dladdr(info->pc.pv, &dlinfo);
  194|       |
  195|  2.58k|		cnv.cpp[x] = msg;
  196|       |
  197|  2.58k|		if (rc == 0)
  ------------------
  |  Branch (197:7): [True: 149, False: 2.43k]
  ------------------
  198|    149|			(void)_snprintf(msg, UNWIND_MAX_LINE_SIZE, "address=%p, unresolvable", info->pc.pv);
  ------------------
  |  |  210|    149|#define _snprintf snprintf
  ------------------
              			(void)_snprintf(msg, UNWIND_MAX_LINE_SIZE, "address=%p, unresolvable", info->pc.pv);
  ------------------
  |  |   39|    149|#define UNWIND_MAX_LINE_SIZE 1024ULL
  ------------------
  199|  2.43k|		else
  200|  2.43k|			(void)_snprintf(msg, UNWIND_MAX_LINE_SIZE,
  ------------------
  |  |  210|  2.43k|#define _snprintf snprintf
  ------------------
              			(void)_snprintf(msg, UNWIND_MAX_LINE_SIZE,
  ------------------
  |  |   39|  2.43k|#define UNWIND_MAX_LINE_SIZE 1024ULL
  ------------------
  201|  2.43k|			                "address=%p dli_fname=%s [%p], dli_sname=%s [%p]", info->pc.pv,
  202|  2.43k|			                dlinfo.dli_fname, dlinfo.dli_fbase, dlinfo.dli_sname, dlinfo.dli_saddr);
  203|  2.58k|	}
  204|       |
  205|       |	// NOLINTNEXTLINE(clang-analyzer-unix.Malloc): function is an allocator
  206|    149|	return cnv.cpp;
  207|    149|}
debug.c:unwind_backtrace_callback:
  108|  2.58k|{
  109|  2.58k|	unwind_context_t* ctx = arg;
  110|       |
  111|  2.58k|	assert(ctx);
  ------------------
  |  Branch (111:2): [True: 0, False: 2.58k]
  |  Branch (111:2): [True: 2.58k, False: 0]
  ------------------
  112|       |
  113|  2.58k|	if (ctx->pos < ctx->size)
  ------------------
  |  Branch (113:6): [True: 2.58k, False: 0]
  ------------------
  114|  2.58k|	{
  115|  2.58k|		unwind_info_t* info = &ctx->info[ctx->pos++];
  116|  2.58k|		info->pc.uw = _Unwind_GetIP(context);
  117|       |
  118|       |		/* _Unwind_GetLanguageSpecificData has various return value definitions,
  119|       |		 * cast to the type we expect and disable linter warnings
  120|       |		 */
  121|       |		// NOLINTNEXTLINE(google-readability-casting,readability-redundant-casting)
  122|  2.58k|		info->langSpecificData.pv = (void*)_Unwind_GetLanguageSpecificData(context);
  123|  2.58k|	}
  124|       |
  125|  2.58k|	return _URC_NO_REASON;
  126|  2.58k|}

winpr_getApplicationDetailsVendor:
   97|  5.14k|{
   98|  5.14k|	if (!initializeApplicationDetails())
  ------------------
  |  Branch (98:6): [True: 0, False: 5.14k]
  ------------------
   99|      0|		return nullptr;
  100|  5.14k|	return s_winpr_vendor_string;
  101|  5.14k|}
winpr_getApplicationDetailsProduct:
  104|  5.14k|{
  105|  5.14k|	if (!initializeApplicationDetails())
  ------------------
  |  Branch (105:6): [True: 0, False: 5.14k]
  ------------------
  106|      0|		return nullptr;
  107|  5.14k|	return s_winpr_product_string;
  108|  5.14k|}
winpr_getApplicatonDetailsRegKey:
  111|  1.71k|{
  112|  1.71k|	char* val = winpr_getApplicatonDetailsCombined('\\');
  113|  1.71k|	if (!val)
  ------------------
  |  Branch (113:6): [True: 0, False: 1.71k]
  ------------------
  114|      0|		return nullptr;
  115|       |
  116|  1.71k|	char* str = nullptr;
  117|  1.71k|	size_t slen = 0;
  118|  1.71k|	(void)winpr_asprintf(&str, &slen, fmt, val);
  119|  1.71k|	free(val);
  120|  1.71k|	return str;
  121|  1.71k|}
winpr_getApplicatonDetailsCombined:
  124|  1.71k|{
  125|  1.71k|	const SSIZE_T version = winpr_getApplicationDetailsVersion();
  126|  1.71k|	const char* vendor = winpr_getApplicationDetailsVendor();
  127|  1.71k|	const char* product = winpr_getApplicationDetailsProduct();
  128|       |
  129|  1.71k|	size_t slen = 0;
  130|  1.71k|	char* str = nullptr;
  131|  1.71k|	if (version < 0)
  ------------------
  |  Branch (131:6): [True: 1.71k, False: 0]
  ------------------
  132|  1.71k|	{
  133|  1.71k|		(void)winpr_asprintf(&str, &slen, "%s%c%s", vendor, separator, product);
  134|  1.71k|	}
  135|      0|	else
  136|      0|	{
  137|      0|		(void)winpr_asprintf(&str, &slen, "%s%c%s%" PRIdz, vendor, separator, product, version);
  ------------------
  |  |  474|      0|#define PRIdz "zd"
  ------------------
  138|      0|	}
  139|       |
  140|  1.71k|	return str;
  141|  1.71k|}
winpr_getApplicationDetailsVersion:
  144|  5.14k|{
  145|  5.14k|	if (!initializeApplicationDetails())
  ------------------
  |  Branch (145:6): [True: 0, False: 5.14k]
  ------------------
  146|      0|		return -1;
  147|  5.14k|	return s_winpr_version;
  148|  5.14k|}
winpr.c:initializeApplicationDetails:
   69|  15.4k|{
   70|  15.4k|	return InitOnceExecuteOnce(&s_winpr_app_details_once, init_app_details, nullptr, nullptr);
  ------------------
  |  |  424|  15.4k|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
   71|  15.4k|}
winpr.c:init_app_details:
   50|      1|{
   51|      1|	const size_t vlen = sizeof(WINPR_VENDOR_STRING);
  ------------------
  |  |   18|      1|#define WINPR_VENDOR_STRING "FreeRDP"
  ------------------
   52|      1|	const size_t plen = sizeof(WINPR_PRODUCT_STRING);
  ------------------
  |  |   19|      1|#define WINPR_PRODUCT_STRING "FreeRDP"
  ------------------
   53|      1|	if (!strncpy(s_winpr_vendor_string, WINPR_VENDOR_STRING, vlen))
  ------------------
  |  |   18|      1|#define WINPR_VENDOR_STRING "FreeRDP"
  ------------------
  |  Branch (53:6): [True: 0, False: 1]
  ------------------
   54|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   55|       |
   56|      1|	if (!strncpy(s_winpr_product_string, WINPR_PRODUCT_STRING, plen))
  ------------------
  |  |   19|      1|#define WINPR_PRODUCT_STRING "FreeRDP"
  ------------------
  |  Branch (56:6): [True: 0, False: 1]
  ------------------
   57|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   58|       |
   59|       |#if defined(WITH_RESOURCE_VERSIONING)
   60|       |	s_winpr_version = WINPR_VERSION_MAJOR;
   61|       |#else
   62|      1|	s_winpr_version = -1;
   63|      1|#endif
   64|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
   65|      1|}

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|  29.7k|{
   41|  29.7k|	if (!log)
  ------------------
  |  Branch (41:6): [True: 0, False: 29.7k]
  ------------------
   42|      0|		return nullptr;
   43|       |
   44|  29.7k|	if (!log->Appender)
  ------------------
  |  Branch (44:6): [True: 14.8k, False: 14.8k]
  ------------------
   45|  14.8k|		return WLog_GetLogAppender(log->Parent);
   46|       |
   47|  14.8k|	return log->Appender;
   48|  29.7k|}
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;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   59|       |
   60|      1|	if (!appender->Open)
  ------------------
  |  Branch (60:6): [True: 0, False: 1]
  ------------------
   61|      0|		return TRUE;
  ------------------
  |  |  117|      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;
  ------------------
  |  |  117|      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;
  ------------------
  |  |  113|      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:
  ------------------
  |  |   65|      1|#define WLOG_APPENDER_CONSOLE 0
  ------------------
  |  Branch (103:3): [True: 1, False: 0]
  ------------------
  104|      1|			appender = WLog_ConsoleAppender_New(log);
  105|      1|			break;
  106|      0|		case WLOG_APPENDER_FILE:
  ------------------
  |  |   66|      0|#define WLOG_APPENDER_FILE 1
  ------------------
  |  Branch (106:3): [True: 0, False: 1]
  ------------------
  107|      0|			appender = WLog_FileAppender_New(log);
  108|      0|			break;
  109|      0|		case WLOG_APPENDER_BINARY:
  ------------------
  |  |   67|      0|#define WLOG_APPENDER_BINARY 2
  ------------------
  |  Branch (109:3): [True: 0, False: 1]
  ------------------
  110|      0|			appender = WLog_BinaryAppender_New(log);
  111|      0|			break;
  112|      0|		case WLOG_APPENDER_CALLBACK:
  ------------------
  |  |   68|      0|#define WLOG_APPENDER_CALLBACK 3
  ------------------
  |  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:
  ------------------
  |  |   69|      0|#define WLOG_APPENDER_SYSLOG 4
  ------------------
  |  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:
  ------------------
  |  |   71|      0|#define WLOG_APPENDER_UDP 6
  ------------------
  |  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:
  251|      1|{
  252|      1|	wLogConsoleAppender* ConsoleAppender =
  253|      1|	    (wLogConsoleAppender*)calloc(1, sizeof(wLogConsoleAppender));
  254|       |
  255|      1|	if (!ConsoleAppender)
  ------------------
  |  Branch (255:6): [True: 0, False: 1]
  ------------------
  256|      0|		return nullptr;
  257|       |
  258|      1|	ConsoleAppender->common.Type = WLOG_APPENDER_CONSOLE;
  ------------------
  |  |   65|      1|#define WLOG_APPENDER_CONSOLE 0
  ------------------
  259|      1|	ConsoleAppender->common.Open = WLog_ConsoleAppender_Open;
  260|      1|	ConsoleAppender->common.Close = WLog_ConsoleAppender_Close;
  261|      1|	ConsoleAppender->common.WriteMessage = WLog_ConsoleAppender_WriteMessage;
  262|      1|	ConsoleAppender->common.WriteDataMessage = WLog_ConsoleAppender_WriteDataMessage;
  263|      1|	ConsoleAppender->common.WriteImageMessage = WLog_ConsoleAppender_WriteImageMessage;
  264|      1|	ConsoleAppender->common.WritePacketMessage = WLog_ConsoleAppender_WritePacketMessage;
  265|      1|	ConsoleAppender->common.Set = WLog_ConsoleAppender_Set;
  266|      1|	ConsoleAppender->common.Free = WLog_ConsoleAppender_Free;
  267|       |
  268|      1|	ConsoleAppender->outputStream = WLOG_CONSOLE_DEFAULT;
  ------------------
  |  |   29|      1|#define WLOG_CONSOLE_DEFAULT 0
  ------------------
  269|       |
  270|       |#ifdef _WIN32
  271|       |	if (IsDebuggerPresent())
  272|       |		ConsoleAppender->outputStream = WLOG_CONSOLE_DEBUG;
  273|       |#endif
  274|       |
  275|      1|	return &ConsoleAppender->common;
  276|      1|}
ConsoleAppender.c:WLog_ConsoleAppender_Open:
   43|      1|{
   44|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
   45|      1|}
ConsoleAppender.c:WLog_ConsoleAppender_WriteMessage:
   55|  14.8k|{
   56|  14.8k|	if (!appender)
  ------------------
  |  Branch (56:6): [True: 0, False: 14.8k]
  ------------------
   57|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
   58|       |
   59|  14.8k|	wLogConsoleAppender* consoleAppender = (wLogConsoleAppender*)appender;
   60|       |
   61|  14.8k|	char prefix[WLOG_MAX_PREFIX_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
   62|  14.8k|	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|  14.8k|	FILE* fp = nullptr;
  109|  14.8k|	switch (consoleAppender->outputStream)
  110|  14.8k|	{
  111|      0|		case WLOG_CONSOLE_STDOUT:
  ------------------
  |  |   30|      0|#define WLOG_CONSOLE_STDOUT 1
  ------------------
  |  Branch (111:3): [True: 0, False: 14.8k]
  ------------------
  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: 14.8k]
  ------------------
  115|      0|			fp = stderr;
  116|      0|			break;
  117|  14.8k|		default:
  ------------------
  |  Branch (117:3): [True: 14.8k, False: 0]
  ------------------
  118|  14.8k|			switch (cmessage->Level)
  119|  14.8k|			{
  120|      0|				case WLOG_TRACE:
  ------------------
  |  |   42|      0|#define WLOG_TRACE 0
  ------------------
  |  Branch (120:5): [True: 0, False: 14.8k]
  ------------------
  121|  10.3k|				case WLOG_DEBUG:
  ------------------
  |  |   43|  10.3k|#define WLOG_DEBUG 1
  ------------------
  |  Branch (121:5): [True: 10.3k, False: 4.51k]
  ------------------
  122|  10.3k|				case WLOG_INFO:
  ------------------
  |  |   44|  10.3k|#define WLOG_INFO 2
  ------------------
  |  Branch (122:5): [True: 0, False: 14.8k]
  ------------------
  123|  10.3k|					fp = stdout;
  124|  10.3k|					break;
  125|  4.51k|				default:
  ------------------
  |  Branch (125:5): [True: 4.51k, False: 10.3k]
  ------------------
  126|  4.51k|					fp = stderr;
  127|  4.51k|					break;
  128|  14.8k|			}
  129|  14.8k|			break;
  130|  14.8k|	}
  131|       |
  132|  14.8k|	if (cmessage->Level != WLOG_OFF)
  ------------------
  |  |   48|  14.8k|#define WLOG_OFF 6
  ------------------
  |  Branch (132:6): [True: 14.8k, False: 0]
  ------------------
  133|  14.8k|		(void)fprintf(fp, "%s%s\n", prefix, cmessage->TextString);
  134|  14.8k|#endif
  135|  14.8k|	return TRUE;
  ------------------
  |  |  117|  14.8k|#define TRUE true
  ------------------
  136|  14.8k|}
ConsoleAppender.c:WLog_ConsoleAppender_Free:
  238|      1|{
  239|      1|	if (appender)
  ------------------
  |  Branch (239:6): [True: 1, False: 0]
  ------------------
  240|      1|	{
  241|      1|		if (appender->PacketMessageContext)
  ------------------
  |  Branch (241:7): [True: 0, False: 1]
  ------------------
  242|      0|		{
  243|      0|			Pcap_Close((wPcap*)appender->PacketMessageContext);
  244|      0|		}
  245|       |
  246|      1|		free(appender);
  247|      1|	}
  248|      1|}

WLog_Layout_GetMessagePrefix:
  246|  14.8k|{
  247|  14.8k|	char format[WLOG_MAX_PREFIX_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
  248|       |
  249|  14.8k|	WINPR_ASSERT(layout);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  250|  14.8k|	WINPR_ASSERT(message);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  251|  14.8k|	WINPR_ASSERT(prefix);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  252|       |
  253|  14.8k|	struct format_tid_arg targ = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
  254|       |
  255|  14.8k|	SYSTEMTIME localTime = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
  256|  14.8k|	GetLocalTime(&localTime);
  257|       |
  258|  14.8k|	struct format_option_recurse recurse = {
  259|  14.8k|		.options = nullptr, .nroptions = 0, .log = log, .layout = layout, .message = message
  260|  14.8k|	};
  261|       |
  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  263|  14.8k|	struct format_option options[] = {
  264|  14.8k|		{ ENTRY("%ctx"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  265|  14.8k|		  ENTRY("%s"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  266|  14.8k|		  log->custom,
  267|  14.8k|		  { .pv = log->context },
  268|  14.8k|		  nullptr,
  269|  14.8k|		  &recurse }, /* log context */
  270|  14.8k|		{ ENTRY("%dw"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  271|  14.8k|		  ENTRY("%u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  272|  14.8k|		  nullptr,
  273|  14.8k|		  { .s = localTime.wDayOfWeek },
  274|  14.8k|		  nullptr,
  275|  14.8k|		  &recurse }, /* day of week */
  276|  14.8k|		{ ENTRY("%dy"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  277|  14.8k|		  ENTRY("%u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  278|  14.8k|		  nullptr,
  279|  14.8k|		  { .s = localTime.wDay },
  280|  14.8k|		  nullptr,
  281|  14.8k|		  &recurse }, /* day of year
  282|       |		               */
  283|  14.8k|		{ ENTRY("%fl"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  284|  14.8k|		  ENTRY("%s"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  285|  14.8k|		  nullptr,
  286|  14.8k|		  { .cpv = message->FileName },
  287|  14.8k|		  nullptr,
  288|  14.8k|		  &recurse }, /* file
  289|       |		               */
  290|  14.8k|		{ ENTRY("%fn"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  291|  14.8k|		  ENTRY("%s"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  292|  14.8k|		  nullptr,
  293|  14.8k|		  { .cpv = message->FunctionName },
  294|  14.8k|		  nullptr,
  295|  14.8k|		  &recurse }, /* function
  296|       |		               */
  297|  14.8k|		{ ENTRY("%hr"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  298|  14.8k|		  ENTRY("%02u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  299|  14.8k|		  nullptr,
  300|  14.8k|		  { .s = localTime.wHour },
  301|  14.8k|		  nullptr,
  302|  14.8k|		  &recurse }, /* hours
  303|       |		               */
  304|  14.8k|		{ ENTRY("%ln"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  305|  14.8k|		  ENTRY("%" PRIuz),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  306|  14.8k|		  nullptr,
  307|  14.8k|		  { .s = message->LineNumber },
  308|  14.8k|		  nullptr,
  309|  14.8k|		  &recurse }, /* line number */
  310|  14.8k|		{ ENTRY("%lv"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  311|  14.8k|		  ENTRY("%s"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  312|  14.8k|		  nullptr,
  313|  14.8k|		  { .cpv = WLOG_LEVELS[message->Level] },
  314|  14.8k|		  nullptr,
  315|  14.8k|		  &recurse }, /* log level */
  316|  14.8k|		{ ENTRY("%mi"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  317|  14.8k|		  ENTRY("%02u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  318|  14.8k|		  nullptr,
  319|  14.8k|		  { .s = localTime.wMinute },
  320|  14.8k|		  nullptr,
  321|  14.8k|		  &recurse }, /* minutes
  322|       |		               */
  323|  14.8k|		{ ENTRY("%ml"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  324|  14.8k|		  ENTRY("%03u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  325|  14.8k|		  nullptr,
  326|  14.8k|		  { .s = localTime.wMilliseconds },
  327|  14.8k|		  nullptr,
  328|  14.8k|		  &recurse }, /* milliseconds */
  329|  14.8k|		{ ENTRY("%mn"), ENTRY("%s"), nullptr, { .cpv = log->Name }, nullptr, &recurse }, /* module
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
              		{ ENTRY("%mn"), ENTRY("%s"), nullptr, { .cpv = log->Name }, nullptr, &recurse }, /* module
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  330|       |		                                                                                    name */
  331|  14.8k|		{ ENTRY("%mo"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  332|  14.8k|		  ENTRY("%u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  333|  14.8k|		  nullptr,
  334|  14.8k|		  { .s = localTime.wMonth },
  335|  14.8k|		  nullptr,
  336|  14.8k|		  &recurse }, /* month
  337|       |		               */
  338|  14.8k|		{ ENTRY("%pid"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  339|  14.8k|		  ENTRY("%u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  340|  14.8k|		  nullptr,
  341|  14.8k|		  { .s = GetCurrentProcessId() },
  342|  14.8k|		  nullptr,
  343|  14.8k|		  &recurse }, /* process id */
  344|  14.8k|		{ ENTRY("%se"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  345|  14.8k|		  ENTRY("%02u"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  346|  14.8k|		  nullptr,
  347|  14.8k|		  { .s = localTime.wSecond },
  348|  14.8k|		  nullptr,
  349|  14.8k|		  &recurse },                                                                /* seconds
  350|       |		                                                                              */
  351|  14.8k|		{ ENTRY("%tid"), ENTRY("%s"), get_tid, { .pv = &targ }, nullptr, &recurse }, /* thread id */
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
              		{ ENTRY("%tid"), ENTRY("%s"), get_tid, { .pv = &targ }, nullptr, &recurse }, /* thread id */
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  352|  14.8k|		{ ENTRY("%yr"), ENTRY("%u"), nullptr, { .s = localTime.wYear }, nullptr, &recurse }, /* year
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
              		{ ENTRY("%yr"), ENTRY("%u"), nullptr, { .s = localTime.wYear }, nullptr, &recurse }, /* year
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  353|       |		                                                                                      */
  354|  14.8k|		{ ENTRY("%{"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  355|  14.8k|		  ENTRY("%}"),
  ------------------
  |  |  262|  14.8k|#define ENTRY(x) x, sizeof(x) - 1
  ------------------
  356|  14.8k|		  nullptr,
  357|  14.8k|		  { .pv = log->context },
  358|  14.8k|		  skip_if_null,
  359|  14.8k|		  &recurse }, /* skip if no context */
  360|  14.8k|	};
  361|       |
  362|  14.8k|	recurse.options = options;
  363|  14.8k|	recurse.nroptions = ARRAYSIZE(options);
  ------------------
  |  |  966|  14.8k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  14.8k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  14.8k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  364|       |
  365|  14.8k|	if (!replace_format_string(layout->FormatString, &recurse, format, ARRAYSIZE(format)))
  ------------------
  |  |  966|  14.8k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  14.8k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  14.8k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (365:6): [True: 0, False: 14.8k]
  ------------------
  366|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  367|       |
  368|  14.8k|	WINPR_PRAGMA_DIAG_PUSH
  369|  14.8k|	WINPR_PRAGMA_DIAG_IGNORED_FORMAT_SECURITY
  370|       |
  371|  14.8k|	WLog_PrintMessagePrefix(prefix, prefixlen, format);
  372|       |
  373|  14.8k|	WINPR_PRAGMA_DIAG_POP
  374|       |
  375|  14.8k|	return TRUE;
  ------------------
  |  |  117|  14.8k|#define TRUE true
  ------------------
  376|  14.8k|}
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|  14.8k|{
  102|  14.8k|	struct format_tid_arg* targ = arg;
  103|  14.8k|	WINPR_ASSERT(targ);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|       |
  105|  14.8k|	size_t tid = 0;
  106|  14.8k|#if defined __linux__ && !defined ANDROID
  107|       |	/* On Linux we prefer to see the LWP id */
  108|  14.8k|	tid = (size_t)syscall(SYS_gettid);
  109|       |#else
  110|       |	tid = (size_t)GetCurrentThreadId();
  111|       |#endif
  112|  14.8k|	(void)_snprintf(targ->tid, sizeof(targ->tid), "%08" PRIxz, tid);
  ------------------
  |  |  210|  14.8k|#define _snprintf snprintf
  ------------------
              	(void)_snprintf(targ->tid, sizeof(targ->tid), "%08" PRIxz, tid);
  ------------------
  |  |  478|  14.8k|#define PRIxz "zx"
  ------------------
  113|  14.8k|	return targ->tid;
  114|  14.8k|}
Layout.c:skip_if_null:
  150|  14.8k|{
  151|  14.8k|	WINPR_ASSERT(opt);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|  14.8k|	WINPR_ASSERT(fmt);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|  14.8k|	WINPR_ASSERT(preplacelen);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|  14.8k|	WINPR_ASSERT(pskiplen);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|       |
  156|  14.8k|	*preplacelen = 0;
  157|  14.8k|	*pskiplen = 0;
  158|       |
  159|  14.8k|	const char* str = &fmt[opt->fmtlen]; /* Skip first %{ from string */
  160|  14.8k|	const char* end = strstr(str, opt->replace);
  161|  14.8k|	if (!end)
  ------------------
  |  Branch (161:6): [True: 0, False: 14.8k]
  ------------------
  162|      0|		return nullptr;
  163|  14.8k|	*pskiplen = WINPR_ASSERTING_INT_CAST(size_t, end - fmt) + opt->replacelen;
  ------------------
  |  |  112|  14.8k|	__extension__({                                                                             \
  |  |  113|  14.8k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|  14.8k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  14.8k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|  14.8k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |  |  |   33|  44.5k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 14.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 14.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  14.8k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|  14.8k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|  14.8k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|  14.8k|	})
  ------------------
  164|       |
  165|  14.8k|	if (!opt->arg.cpv)
  ------------------
  |  Branch (165:6): [True: 14.8k, False: 0]
  ------------------
  166|  14.8k|		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|  14.8k|{
  184|  14.8k|	WINPR_ASSERT(FormatString);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|  14.8k|	WINPR_ASSERT(recurse);
  ------------------
  |  |   76|  14.8k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|  14.8k|	do                                                                                             \
  |  |  |  |   61|  14.8k|	{                                                                                              \
  |  |  |  |   62|  14.8k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|  14.8k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|  14.8k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|  14.8k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|  14.8k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|  14.8k|                                                                                                   \
  |  |  |  |   70|  14.8k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  14.8k|	do                                                      \
  |  |  |  |  |  |   32|  14.8k|	{                                                       \
  |  |  |  |  |  |   33|  14.8k|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  14.8k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|  14.8k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  14.8k|                                                                                                   \
  |  |  |  |   72|  14.8k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|  14.8k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|  14.8k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|  14.8k|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|       |
  187|  14.8k|	size_t index = 0;
  188|  14.8k|	const char* prefix = WLog_GetGlobalPrefix();
  189|  14.8k|	if (prefix)
  ------------------
  |  Branch (189:6): [True: 0, False: 14.8k]
  ------------------
  190|      0|	{
  191|      0|		const int res = _snprintf(format, formatlen, "{%s}", prefix);
  ------------------
  |  |  210|      0|#define _snprintf snprintf
  ------------------
  192|      0|		if (res < 0)
  ------------------
  |  Branch (192:7): [True: 0, False: 0]
  ------------------
  193|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  194|      0|		index = (size_t)res;
  195|      0|	}
  196|       |
  197|   475k|	while (*FormatString)
  ------------------
  |  Branch (197:9): [True: 460k, False: 14.8k]
  ------------------
  198|   460k|	{
  199|   460k|		const struct format_option* opt =
  200|   460k|		    bsearch(FormatString, recurse->options, recurse->nroptions,
  201|   460k|		            sizeof(struct format_option), opt_compare_fn);
  202|   460k|		if (opt)
  ------------------
  |  Branch (202:7): [True: 148k, False: 312k]
  ------------------
  203|   148k|		{
  204|   148k|			size_t replacelen = opt->replacelen;
  205|   148k|			size_t fmtlen = opt->fmtlen;
  206|   148k|			const char* replace = opt->replace;
  207|   148k|			const void* arg = opt->arg.cpv;
  208|       |
  209|   148k|			if (opt->ext)
  ------------------
  |  Branch (209:8): [True: 14.8k, False: 133k]
  ------------------
  210|  14.8k|				replace = opt->ext(opt, FormatString, &replacelen, &fmtlen);
  211|   148k|			if (opt->fkt)
  ------------------
  |  Branch (211:8): [True: 14.8k, False: 133k]
  ------------------
  212|  14.8k|				arg = opt->fkt(opt->arg.pv);
  213|       |
  214|   148k|			if (replace && (replacelen > 0))
  ------------------
  |  Branch (214:8): [True: 133k, False: 14.8k]
  |  Branch (214:19): [True: 133k, False: 0]
  ------------------
  215|   133k|			{
  216|   133k|				WINPR_PRAGMA_DIAG_PUSH
  217|   133k|				WINPR_PRAGMA_DIAG_IGNORED_FORMAT_NONLITERAL
  218|   133k|				const int rc = _snprintf(&format[index], formatlen - index, replace, arg);
  ------------------
  |  |  210|   133k|#define _snprintf snprintf
  ------------------
  219|   133k|				WINPR_PRAGMA_DIAG_POP
  220|   133k|				if (rc < 0)
  ------------------
  |  Branch (220:9): [True: 0, False: 133k]
  ------------------
  221|      0|					return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  222|   133k|				if (!check_and_log_format_size(format, formatlen, index,
  ------------------
  |  Branch (222:9): [True: 0, False: 133k]
  ------------------
  223|   133k|				                               WINPR_ASSERTING_INT_CAST(size_t, rc)))
  ------------------
  |  |  112|   133k|	__extension__({                                                                             \
  |  |  113|   133k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   133k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   133k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   133k|	do                                                                                             \
  |  |  |  |  |  |   61|   133k|	{                                                                                              \
  |  |  |  |  |  |   62|   133k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   133k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   133k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   133k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   133k|                                                                                                   \
  |  |  |  |  |  |   70|   133k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   133k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   133k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   133k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 133k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   133k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   133k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 133k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|                                                                                                   \
  |  |  |  |  |  |   72|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   133k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   133k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   133k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   133k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   133k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   133k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   133k|	do                                                                                             \
  |  |  |  |  |  |   61|   133k|	{                                                                                              \
  |  |  |  |  |  |   62|   133k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   133k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   133k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   133k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   133k|                                                                                                   \
  |  |  |  |  |  |   70|   133k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   133k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   133k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   401k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 133k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 133k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   133k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   133k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 133k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|                                                                                                   \
  |  |  |  |  |  |   72|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   133k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   133k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   133k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   133k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   133k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   133k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   133k|	})
  ------------------
  224|      0|					return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  225|   133k|				index += WINPR_ASSERTING_INT_CAST(size_t, rc);
  ------------------
  |  |  112|   133k|	__extension__({                                                                             \
  |  |  113|   133k|		__typeof(ivar) var = ivar;                                                              \
  |  |  114|   133k|		WINPR_ASSERT((var) ==                                                                   \
  |  |  ------------------
  |  |  |  |   76|   133k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   133k|	do                                                                                             \
  |  |  |  |  |  |   61|   133k|	{                                                                                              \
  |  |  |  |  |  |   62|   133k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   133k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   133k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   133k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   133k|                                                                                                   \
  |  |  |  |  |  |   70|   133k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   133k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   133k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   133k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 133k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   133k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   133k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 133k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|                                                                                                   \
  |  |  |  |  |  |   72|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   133k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   133k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   133k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|   133k|		             WINPR_CXX_COMPAT_CAST(__typeof(var), WINPR_CXX_COMPAT_CAST(type, (var)))); \
  |  |  116|   133k|		WINPR_ASSERT((((var) > 0) && (WINPR_CXX_COMPAT_CAST(type, (var)) > 0)) ||               \
  |  |  ------------------
  |  |  |  |   76|   133k|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   133k|	do                                                                                             \
  |  |  |  |  |  |   61|   133k|	{                                                                                              \
  |  |  |  |  |  |   62|   133k|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |  |  |   63|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |  |  |   64|   133k|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |  |  |   65|   133k|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |  |  |   66|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   67|   133k|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |  |  |   68|   133k|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |  |  |   69|   133k|                                                                                                   \
  |  |  |  |  |  |   70|   133k|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   31|   133k|	do                                                      \
  |  |  |  |  |  |  |  |   32|   133k|	{                                                       \
  |  |  |  |  |  |  |  |   33|   401k|		if (!(cond))                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 133k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 133k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (33:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   133k|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |  |  |   35|   133k|	} while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 133k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|                                                                                                   \
  |  |  |  |  |  |   72|   133k|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |  |  |   73|   133k|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |  |  |   74|   133k|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |  |  |   75|   133k|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (75:11): [Folded, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|   133k|		             (((var) <= 0) && WINPR_CXX_COMPAT_CAST(type, (var)) <= 0));                \
  |  |  118|   133k|		WINPR_CXX_COMPAT_CAST(type, (var));                                                     \
  |  |  ------------------
  |  |  |  |   33|   133k|#define WINPR_CXX_COMPAT_CAST(t, val) (t)(val)
  |  |  ------------------
  |  |  119|   133k|	})
  ------------------
  226|   133k|			}
  227|   148k|			FormatString += fmtlen;
  228|   148k|		}
  229|   312k|		else
  230|   312k|		{
  231|       |			/* Unknown format string */
  232|   312k|			if (*FormatString == '%')
  ------------------
  |  Branch (232:8): [True: 0, False: 312k]
  ------------------
  233|      0|				return log_invalid_fmt(FormatString);
  234|       |
  235|   312k|			if (!check_and_log_format_size(format, formatlen, index, 1))
  ------------------
  |  Branch (235:8): [True: 0, False: 312k]
  ------------------
  236|      0|				return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  237|   312k|			format[index++] = *FormatString++;
  238|   312k|		}
  239|   460k|	}
  240|       |
  241|  14.8k|	return check_and_log_format_size(format, formatlen, index, 0);
  242|  14.8k|}
Layout.c:opt_compare_fn:
  137|  1.82M|{
  138|  1.82M|	const char* what = a;
  139|  1.82M|	const struct format_option* opt = b;
  140|  1.82M|	if (!opt)
  ------------------
  |  Branch (140:6): [True: 0, False: 1.82M]
  ------------------
  141|      0|		return -1;
  142|  1.82M|	return strncmp(what, opt->fmt, opt->fmtlen);
  143|  1.82M|}
Layout.c:check_and_log_format_size:
  123|   460k|{
  124|       |	/* format string must be '\0' terminated, so abort at size - 1 */
  125|   460k|	if (index + add + 1 >= size)
  ------------------
  |  Branch (125:6): [True: 0, False: 460k]
  ------------------
  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;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  132|      0|	}
  133|   460k|	return TRUE;
  ------------------
  |  |  117|   460k|#define TRUE true
  ------------------
  134|   460k|}
Layout.c:WLog_PrintMessagePrefix:
   93|  14.8k|{
   94|  14.8k|	va_list args = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
   95|  14.8k|	va_start(args, format);
   96|  14.8k|	WLog_PrintMessagePrefixVA(prefix, prefixlen, format, args);
   97|       |	va_end(args);
   98|  14.8k|}
Layout.c:WLog_PrintMessagePrefixVA:
   86|  14.8k|{
   87|  14.8k|	(void)vsnprintf(prefix, prefixlen, format, args);
   88|  14.8k|}

WLog_PrintTextMessageVA:
  420|  14.8k|{
  421|  14.8k|	wLogMessage message = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
  422|  14.8k|	message.Type = WLOG_MESSAGE_TEXT;
  ------------------
  |  |   54|  14.8k|#define WLOG_MESSAGE_TEXT 0
  ------------------
  423|  14.8k|	message.Level = level;
  424|  14.8k|	message.LineNumber = line;
  425|  14.8k|	message.FileName = file;
  426|  14.8k|	message.FunctionName = function;
  427|       |
  428|  14.8k|	message.FormatString = fmt;
  429|       |
  430|  14.8k|	return WLog_PrintTextMessageInternal(log, &message, args);
  431|  14.8k|}
WLog_PrintTextMessage:
  446|  5.58k|{
  447|  5.58k|	BOOL status = 0;
  448|  5.58k|	va_list args = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  5.58k|	{                      \
  |  |   85|  5.58k|	} /** @since version 3.24.0 */
  ------------------
  449|  5.58k|	va_start(args, fmt);
  450|  5.58k|	status = WLog_PrintTextMessageVA(log, level, line, file, function, fmt, args);
  451|       |	va_end(args);
  452|  5.58k|	return status;
  453|  5.58k|}
WLog_GetLogLevel:
  456|  14.8k|{
  457|  14.8k|	if (!log)
  ------------------
  |  Branch (457:6): [True: 0, False: 14.8k]
  ------------------
  458|      0|		return WLOG_OFF;
  ------------------
  |  |   48|      0|#define WLOG_OFF 6
  ------------------
  459|       |
  460|  14.8k|	if (log->FilterLevel <= WLOG_FILTER_NOT_INITIALIZED)
  ------------------
  |  |   53|  14.8k|#define WLOG_FILTER_NOT_INITIALIZED (-2)
  ------------------
  |  Branch (460:6): [True: 1, False: 14.8k]
  ------------------
  461|      1|		log->FilterLevel = WLog_GetFilterLogLevel(log);
  462|       |
  463|  14.8k|	if (log->FilterLevel > WLOG_FILTER_NOT_FILTERED)
  ------------------
  |  |   52|  14.8k|#define WLOG_FILTER_NOT_FILTERED (-1)
  ------------------
  |  Branch (463:6): [True: 0, False: 14.8k]
  ------------------
  464|      0|		return (DWORD)log->FilterLevel;
  465|  14.8k|	else if (log->Level == WLOG_LEVEL_INHERIT)
  ------------------
  |  |   49|  14.8k|#define WLOG_LEVEL_INHERIT 0xFFFF
  ------------------
  |  Branch (465:11): [True: 2, False: 14.8k]
  ------------------
  466|      2|		log->Level = WLog_GetLogLevel(log->Parent);
  467|       |
  468|  14.8k|	return log->Level;
  469|  14.8k|}
WLog_IsLevelActive:
  472|  14.8k|{
  473|  14.8k|	DWORD level = 0;
  474|       |
  475|  14.8k|	if (!_log)
  ------------------
  |  Branch (475:6): [True: 0, False: 14.8k]
  ------------------
  476|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  477|       |
  478|  14.8k|	level = WLog_GetLogLevel(_log);
  479|       |
  480|  14.8k|	if (level == WLOG_OFF)
  ------------------
  |  |   48|  14.8k|#define WLOG_OFF 6
  ------------------
  |  Branch (480:6): [True: 0, False: 14.8k]
  ------------------
  481|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  482|       |
  483|  14.8k|	return _log_level >= level;
  484|  14.8k|}
WLog_SetLogLevel:
  611|      1|{
  612|      1|	if (!log)
  ------------------
  |  Branch (612:6): [True: 0, False: 1]
  ------------------
  613|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  614|       |
  615|      1|	if ((logLevel > WLOG_OFF) && (logLevel != WLOG_LEVEL_INHERIT))
  ------------------
  |  |   48|      1|#define WLOG_OFF 6
  ------------------
              	if ((logLevel > WLOG_OFF) && (logLevel != WLOG_LEVEL_INHERIT))
  ------------------
  |  |   49|      0|#define WLOG_LEVEL_INHERIT 0xFFFF
  ------------------
  |  Branch (615:6): [True: 0, False: 1]
  |  Branch (615:31): [True: 0, False: 0]
  ------------------
  616|      0|		logLevel = WLOG_OFF;
  ------------------
  |  |   48|      0|#define WLOG_OFF 6
  ------------------
  617|       |
  618|      1|	log->Level = logLevel;
  619|      1|	log->inherit = (logLevel == WLOG_LEVEL_INHERIT);
  ------------------
  |  |   49|      1|#define WLOG_LEVEL_INHERIT 0xFFFF
  ------------------
  620|       |
  621|      1|	for (DWORD x = 0; x < log->ChildrenCount; x++)
  ------------------
  |  Branch (621:20): [True: 0, False: 1]
  ------------------
  622|      0|	{
  623|      0|		wLog* child = log->Children[x];
  624|       |
  625|      0|		if (!WLog_UpdateInheritLevel(child, logLevel))
  ------------------
  |  Branch (625:7): [True: 0, False: 0]
  ------------------
  626|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  627|      0|	}
  628|       |
  629|      1|	return WLog_reset_log_filters(log);
  630|      1|}
WLog_GetRoot:
  954|    154|{
  955|    154|	if (!InitOnceExecuteOnce(&g_WLogInitialized, WLog_InitializeRoot, nullptr, nullptr))
  ------------------
  |  |  424|    154|#define InitOnceExecuteOnce winpr_InitOnceExecuteOnce
  ------------------
  |  Branch (955:6): [True: 0, False: 154]
  ------------------
  956|      0|		return nullptr;
  957|       |
  958|    154|	return g_RootLog;
  959|    154|}
WLog_Get:
 1053|    153|{
 1054|    153|	wLog* root = WLog_GetRoot();
 1055|    153|	return WLog_Get_int(root, name);
 1056|    153|}
WLog_GetGlobalPrefix:
 1111|  14.8k|{
 1112|  14.8k|	return g_GlobalPrefix;
 1113|  14.8k|}
wlog.c:WLog_PrintTextMessageInternal:
  354|  14.8k|{
  355|  14.8k|	assert(cmessage);
  ------------------
  |  Branch (355:2): [True: 0, False: 14.8k]
  |  Branch (355:2): [True: 14.8k, False: 0]
  ------------------
  356|       |
  357|  14.8k|	char formattedLogMessage[WLOG_MAX_STRING_SIZE] = WINPR_C_ARRAY_INIT;
  ------------------
  |  |   84|  14.8k|	{                      \
  |  |   85|  14.8k|	} /** @since version 3.24.0 */
  ------------------
  358|  14.8k|	wLogMessage message = *cmessage;
  359|  14.8k|	message.TextString = formattedLogMessage;
  360|       |
  361|  14.8k|	WINPR_PRAGMA_DIAG_PUSH
  362|  14.8k|	WINPR_PRAGMA_DIAG_IGNORED_FORMAT_NONLITERAL
  363|  14.8k|	if (vsnprintf(formattedLogMessage, ARRAYSIZE(formattedLogMessage) - 1, cmessage->FormatString,
  ------------------
  |  |  966|  14.8k|#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
  |  |  ------------------
  |  |  |  |  962|  14.8k|#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
  |  |  |  |  ------------------
  |  |  |  |  |  |  961|  14.8k|#define RTL_NUMBER_OF_V1(A) (sizeof(A) / sizeof((A)[0]))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (363:6): [True: 0, False: 14.8k]
  ------------------
  364|  14.8k|	              args) < 0)
  365|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  366|  14.8k|	WINPR_PRAGMA_DIAG_POP
  367|       |
  368|  14.8k|	return WLog_Write(log, &message);
  369|  14.8k|}
wlog.c:WLog_Write:
  232|  14.8k|{
  233|  14.8k|	BOOL status = FALSE;
  ------------------
  |  |  113|  14.8k|#define FALSE false
  ------------------
  234|  14.8k|	wLogAppender* appender = WLog_GetLogAppender(log);
  235|       |
  236|  14.8k|	if (!appender)
  ------------------
  |  Branch (236:6): [True: 0, False: 14.8k]
  ------------------
  237|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  238|       |
  239|  14.8k|	if (!appender->active)
  ------------------
  |  Branch (239:6): [True: 1, False: 14.8k]
  ------------------
  240|      1|		if (!WLog_OpenAppender(log))
  ------------------
  |  Branch (240:7): [True: 0, False: 1]
  ------------------
  241|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  242|       |
  243|  14.8k|	EnterCriticalSection(&appender->lock);
  244|       |
  245|  14.8k|	if (appender->WriteMessage)
  ------------------
  |  Branch (245:6): [True: 14.8k, False: 0]
  ------------------
  246|  14.8k|	{
  247|  14.8k|		if (appender->recursive)
  ------------------
  |  Branch (247:7): [True: 0, False: 14.8k]
  ------------------
  248|      0|			status = log_recursion(message->FileName, message->FunctionName, message->LineNumber);
  249|  14.8k|		else
  250|  14.8k|		{
  251|  14.8k|			appender->recursive = TRUE;
  ------------------
  |  |  117|  14.8k|#define TRUE true
  ------------------
  252|  14.8k|			status = appender->WriteMessage(log, appender, message);
  253|  14.8k|			appender->recursive = FALSE;
  ------------------
  |  |  113|  14.8k|#define FALSE false
  ------------------
  254|  14.8k|		}
  255|  14.8k|	}
  256|       |
  257|  14.8k|	LeaveCriticalSection(&appender->lock);
  258|  14.8k|	return status;
  259|  14.8k|}
wlog.c:WLog_reset_log_filters:
  502|      1|{
  503|      1|	if (!log)
  ------------------
  |  Branch (503:6): [True: 0, False: 1]
  ------------------
  504|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  505|       |
  506|      1|	log->FilterLevel = WLOG_FILTER_NOT_INITIALIZED;
  ------------------
  |  |   53|      1|#define WLOG_FILTER_NOT_INITIALIZED (-2)
  ------------------
  507|       |
  508|      1|	for (DWORD x = 0; x < log->ChildrenCount; x++)
  ------------------
  |  Branch (508:20): [True: 0, False: 1]
  ------------------
  509|      0|	{
  510|      0|		wLog* child = log->Children[x];
  511|       |
  512|      0|		if (!WLog_reset_log_filters(child))
  ------------------
  |  Branch (512:7): [True: 0, False: 0]
  ------------------
  513|      0|			return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  514|      0|	}
  515|       |
  516|      1|	return TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  517|      1|}
wlog.c:WLog_GetFilterLogLevel:
  767|      4|{
  768|      4|	BOOL match = FALSE;
  ------------------
  |  |  113|      4|#define FALSE false
  ------------------
  769|       |
  770|      4|	if (log->FilterLevel >= 0)
  ------------------
  |  Branch (770:6): [True: 0, False: 4]
  ------------------
  771|      0|		return log->FilterLevel;
  772|       |
  773|      4|	log->FilterLevel = WLOG_FILTER_NOT_FILTERED;
  ------------------
  |  |   52|      4|#define WLOG_FILTER_NOT_FILTERED (-1)
  ------------------
  774|      4|	for (DWORD i = 0; i < g_FilterCount; i++)
  ------------------
  |  Branch (774:20): [True: 0, False: 4]
  ------------------
  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;
  ------------------
  |  |  117|      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|      4|	return log->FilterLevel;
  810|      4|}
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;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  125|       |
  126|      1|	g_RootLog->IsRoot = TRUE;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  127|      1|	logAppenderType = WLOG_APPENDER_CONSOLE;
  ------------------
  |  |   65|      1|#define WLOG_APPENDER_CONSOLE 0
  ------------------
  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;
  ------------------
  |  |   65|      0|#define WLOG_APPENDER_CONSOLE 0
  ------------------
  146|      0|		else if (_stricmp(env, "FILE") == 0)
  ------------------
  |  Branch (146:12): [True: 0, False: 0]
  ------------------
  147|      0|			logAppenderType = WLOG_APPENDER_FILE;
  ------------------
  |  |   66|      0|#define WLOG_APPENDER_FILE 1
  ------------------
  148|      0|		else if (_stricmp(env, "BINARY") == 0)
  ------------------
  |  Branch (148:12): [True: 0, False: 0]
  ------------------
  149|      0|			logAppenderType = WLOG_APPENDER_BINARY;
  ------------------
  |  |   67|      0|#define WLOG_APPENDER_BINARY 2
  ------------------
  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;
  ------------------
  |  |   69|      0|#define WLOG_APPENDER_SYSLOG 4
  ------------------
  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;
  ------------------
  |  |   71|      0|#define WLOG_APPENDER_UDP 6
  ------------------
  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;
  ------------------
  |  |  117|      1|#define TRUE true
  ------------------
  176|      0|fail:
  177|      0|	WLog_Uninit_();
  178|      0|	return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  179|      1|}
wlog.c:WLog_ParseFilters:
  741|      1|{
  742|      1|	LPCSTR filter = "WLOG_FILTER";
  743|      1|	BOOL res = FALSE;
  ------------------
  |  |  113|      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;
  ------------------
  |  |  117|      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;
  ------------------
  |  |  113|      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|      3|	for (DWORD index = 0; index < root->ChildrenCount; index++)
  ------------------
  |  Branch (88:24): [True: 2, False: 1]
  ------------------
   89|      2|	{
   90|      2|		child = root->Children[index];
   91|      2|		WLog_Free(child);
   92|      2|	}
   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|    153|{
 1032|    153|	wLog* log = nullptr;
 1033|       |
 1034|    153|	if (!(log = WLog_FindChild(root, name)))
  ------------------
  |  Branch (1034:6): [True: 2, False: 151]
  ------------------
 1035|      2|	{
 1036|      2|		if (!root)
  ------------------
  |  Branch (1036:7): [True: 0, False: 2]
  ------------------
 1037|      0|			return nullptr;
 1038|       |
 1039|      2|		if (!(log = WLog_New(name, root)))
  ------------------
  |  Branch (1039:7): [True: 0, False: 2]
  ------------------
 1040|      0|			return nullptr;
 1041|       |
 1042|      2|		if (!WLog_AddChild(root, log))
  ------------------
  |  Branch (1042:7): [True: 0, False: 2]
  ------------------
 1043|      0|		{
 1044|      0|			WLog_Free(log);
 1045|      0|			return nullptr;
 1046|      0|		}
 1047|      2|	}
 1048|       |
 1049|    153|	return log;
 1050|    153|}
wlog.c:WLog_FindChild:
 1006|    153|{
 1007|    153|	wLog* child = nullptr;
 1008|       |
 1009|    153|	if (!root)
  ------------------
  |  Branch (1009:6): [True: 0, False: 153]
  ------------------
 1010|      0|		return nullptr;
 1011|       |
 1012|    153|	WLog_Lock(root);
 1013|       |
 1014|    304|	for (DWORD index = 0; index < root->ChildrenCount; index++)
  ------------------
  |  Branch (1014:24): [True: 302, False: 2]
  ------------------
 1015|    302|	{
 1016|    302|		wLog* cchild = root->Children[index];
 1017|       |
 1018|    302|		if (strcmp(cchild->Name, name) == 0)
  ------------------
  |  Branch (1018:7): [True: 151, False: 151]
  ------------------
 1019|    151|		{
 1020|    151|			child = cchild;
 1021|    151|			break;
 1022|    151|		}
 1023|    302|	}
 1024|       |
 1025|    153|	WLog_Unlock(root);
 1026|       |
 1027|    153|	return child;
 1028|    153|}
wlog.c:WLog_Lock:
  101|    155|{
  102|    155|	WINPR_ASSERT(log);
  ------------------
  |  |   76|    155|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    155|	do                                                                                             \
  |  |  |  |   61|    155|	{                                                                                              \
  |  |  |  |   62|    155|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    155|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    155|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    155|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    155|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    155|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    155|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    155|                                                                                                   \
  |  |  |  |   70|    155|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    155|	do                                                      \
  |  |  |  |  |  |   32|    155|	{                                                       \
  |  |  |  |  |  |   33|    155|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 155]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    155|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    155|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 155]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    155|                                                                                                   \
  |  |  |  |   72|    155|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    155|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    155|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    155|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 155]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|    155|	EnterCriticalSection(&log->lock);
  104|    155|}
wlog.c:WLog_Unlock:
  107|    155|{
  108|    155|	WINPR_ASSERT(log);
  ------------------
  |  |   76|    155|#define WINPR_ASSERT(cond) WINPR_ASSERT_AT((cond), __FILE__, __func__, __LINE__)
  |  |  ------------------
  |  |  |  |   60|    155|	do                                                                                             \
  |  |  |  |   61|    155|	{                                                                                              \
  |  |  |  |   62|    155|		WINPR_PRAGMA_DIAG_PUSH                                                                     \
  |  |  |  |   63|    155|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE                               \
  |  |  |  |   64|    155|		WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE                                         \
  |  |  |  |   65|    155|		WINPR_PRAGMA_DIAG_IGNORED_UNKNOWN_PRAGMAS                                                  \
  |  |  |  |   66|    155|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   67|    155|		    coverity compliance block deviate 'CONSTANT_EXPRESSION_RESULT' 'WINPR_ASSERT')         \
  |  |  |  |   68|    155|		WINPR_DO_COVERITY_PRAGMA(coverity compliance block deviate : 2 'NO_EFFECT' 'WINPR_ASSERT') \
  |  |  |  |   69|    155|                                                                                                   \
  |  |  |  |   70|    155|		winpr_internal_assert((cond), (file), (fkt), (line));                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|    155|	do                                                      \
  |  |  |  |  |  |   32|    155|	{                                                       \
  |  |  |  |  |  |   33|    155|		if (!(cond))                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (33:7): [True: 0, False: 155]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    155|			winpr_int_assert(#cond, (file), (fkt), (line)); \
  |  |  |  |  |  |   35|    155|	} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:11): [Folded, False: 155]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|    155|                                                                                                   \
  |  |  |  |   72|    155|		WINPR_DO_COVERITY_PRAGMA(                                                                  \
  |  |  |  |   73|    155|		    coverity compliance end_block 'CONSTANT_EXPRESSION_RESULT' 'NO_EFFECT')                \
  |  |  |  |   74|    155|		WINPR_PRAGMA_DIAG_POP                                                                      \
  |  |  |  |   75|    155|	} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (75:11): [Folded, False: 155]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|    155|	LeaveCriticalSection(&log->lock);
  110|    155|}
wlog.c:WLog_AddChild:
  962|      2|{
  963|      2|	BOOL status = FALSE;
  ------------------
  |  |  113|      2|#define FALSE false
  ------------------
  964|       |
  965|      2|	WLog_Lock(parent);
  966|       |
  967|      2|	if (parent->ChildrenCount >= parent->ChildrenSize)
  ------------------
  |  Branch (967:6): [True: 1, False: 1]
  ------------------
  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|      2|	if (!parent->Children)
  ------------------
  |  Branch (992:6): [True: 0, False: 2]
  ------------------
  993|      0|		goto exit;
  994|       |
  995|      2|	parent->Children[parent->ChildrenCount++] = child;
  996|      2|	child->Parent = parent;
  997|       |
  998|      2|	WLog_Unlock(parent);
  999|       |
 1000|      2|	status = TRUE;
  ------------------
  |  |  117|      2|#define TRUE true
  ------------------
 1001|      2|exit:
 1002|      2|	return status;
 1003|      2|}
wlog.c:WLog_New:
  857|      3|{
  858|      3|	wLog* log = nullptr;
  859|      3|	char* env = nullptr;
  860|      3|	DWORD nSize = 0;
  861|      3|	int iLevel = 0;
  862|      3|	log = (wLog*)calloc(1, sizeof(wLog));
  863|       |
  864|      3|	if (!log)
  ------------------
  |  Branch (864:6): [True: 0, False: 3]
  ------------------
  865|      0|		return nullptr;
  866|       |
  867|      3|	log->Name = _strdup(name);
  868|       |
  869|      3|	if (!log->Name)
  ------------------
  |  Branch (869:6): [True: 0, False: 3]
  ------------------
  870|      0|		goto out_fail;
  871|       |
  872|      3|	if (!WLog_ParseName(log, name))
  ------------------
  |  Branch (872:6): [True: 0, False: 3]
  ------------------
  873|      0|		goto out_fail;
  874|       |
  875|      3|	log->Parent = rootLogger;
  876|      3|	log->FilterLevel = WLOG_FILTER_NOT_INITIALIZED;
  ------------------
  |  |   53|      3|#define WLOG_FILTER_NOT_INITIALIZED (-2)
  ------------------
  877|       |
  878|      3|	if (rootLogger)
  ------------------
  |  Branch (878:6): [True: 2, False: 1]
  ------------------
  879|      2|	{
  880|      2|		log->Level = WLOG_LEVEL_INHERIT;
  ------------------
  |  |   49|      2|#define WLOG_LEVEL_INHERIT 0xFFFF
  ------------------
  881|      2|		log->inherit = TRUE;
  ------------------
  |  |  117|      2|#define TRUE true
  ------------------
  882|      2|	}
  883|      1|	else
  884|      1|	{
  885|      1|		LPCSTR level = "WLOG_LEVEL";
  886|      1|		log->Level = WLOG_INFO;
  ------------------
  |  |   44|      1|#define WLOG_INFO 2
  ------------------
  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|      3|	iLevel = WLog_GetFilterLogLevel(log);
  915|       |
  916|      3|	if (iLevel >= 0)
  ------------------
  |  Branch (916:6): [True: 0, False: 3]
  ------------------
  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|      3|	if (!InitializeCriticalSectionAndSpinCount(&log->lock, 4000))
  ------------------
  |  Branch (922:6): [True: 0, False: 3]
  ------------------
  923|      0|		goto out_fail;
  924|       |
  925|      3|	return log;
  926|      0|out_fail:
  927|      0|	WLog_Free(log);
  928|      0|	return nullptr;
  929|      3|}
wlog.c:WLog_ParseName:
  813|      3|{
  814|      3|	const char* cp = name;
  815|      3|	char* p = nullptr;
  816|      3|	size_t count = 1;
  817|      3|	LPSTR names = nullptr;
  818|       |
  819|      8|	while ((cp = strchr(cp, '.')) != nullptr)
  ------------------
  |  Branch (819:9): [True: 5, False: 3]
  ------------------
  820|      5|	{
  821|      5|		count++;
  822|      5|		cp++;
  823|      5|	}
  824|       |
  825|      3|	names = _strdup(name);
  826|       |
  827|      3|	if (!names)
  ------------------
  |  Branch (827:6): [True: 0, False: 3]
  ------------------
  828|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  829|       |
  830|      3|	log->NameCount = count;
  831|      3|	log->Names = (LPSTR*)calloc((count + 1UL), sizeof(LPSTR));
  832|       |
  833|      3|	if (!log->Names)
  ------------------
  |  Branch (833:6): [True: 0, False: 3]
  ------------------
  834|      0|	{
  835|      0|		free(names);
  836|      0|		return FALSE;
  ------------------
  |  |  113|      0|#define FALSE false
  ------------------
  837|      0|	}
  838|       |
  839|      3|	log->Names[count] = nullptr;
  840|      3|	count = 0;
  841|      3|	p = (char*)names;
  842|      3|	log->Names[count++] = p;
  843|       |
  844|      8|	while ((p = strchr(p, '.')) != nullptr)
  ------------------
  |  Branch (844:9): [True: 5, False: 3]
  ------------------
  845|      5|	{
  846|      5|		if (count < log->NameCount)
  ------------------
  |  Branch (846:7): [True: 5, False: 0]
  ------------------
  847|      5|			log->Names[count++] = p + 1;
  848|       |
  849|      5|		*p = '\0';
  850|      5|		p++;
  851|      5|	}
  852|       |
  853|      3|	return TRUE;
  ------------------
  |  |  117|      3|#define TRUE true
  ------------------
  854|      3|}
wlog.c:WLog_Free:
  932|      3|{
  933|      3|	if (log)
  ------------------
  |  Branch (933:6): [True: 3, False: 0]
  ------------------
  934|      3|	{
  935|      3|		if (log->Appender)
  ------------------
  |  Branch (935:7): [True: 1, False: 2]
  ------------------
  936|      1|		{
  937|      1|			WLog_Appender_Free(log, log->Appender);
  938|      1|			log->Appender = nullptr;
  939|      1|		}
  940|       |
  941|      3|		free(log->Name);
  942|       |
  943|       |		/* The first element in this array is allocated, the rest are indices into this variable */
  944|      3|		if (log->Names)
  ------------------
  |  Branch (944:7): [True: 3, False: 0]
  ------------------
  945|      3|			free(log->Names[0]);
  946|      3|		free((void*)log->Names);
  947|      3|		free((void*)log->Children);
  948|      3|		DeleteCriticalSection(&log->lock);
  949|      3|		free(log);
  950|      3|	}
  951|      3|}

