Fixed defects

List of Defects

Error: COMPILER_WARNING (CWE-843): [#def1]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/drive/client/drive_main.c: scope_hint: In function ‘drive_process_irp_query_volume_information’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/drive/client/drive_main.c:514:60: warning[-Wincompatible-pointer-types]: passing argument 1 of ‘wcslen’ from incompatible pointer type
#  514 |                         const size_t diskTypeLen = (wcslen(diskType) + 1) * sizeof(WCHAR);
#      |                                                            ^~~~~~~~
#      |                                                            |
#      |                                                            const WCHAR * {aka const short unsigned int *}
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/string.h:24: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/crt.h:31: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/drive/client/drive_main.c:31: included_from: Included from here.
/usr/include/wchar.h:247:38: note: expected ‘const wchar_t *’ {aka ‘const int *’} but argument is of type ‘const WCHAR *’ {aka ‘const short unsigned int *’}
#  247 | extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
#      |                       ~~~~~~~~~~~~~~~^~~
#  512|   			const WCHAR* diskType =
#  513|   			    InitializeConstWCharFromUtf8("FAT32", LabelBuffer, ARRAYSIZE(LabelBuffer));
#  514|-> 			const size_t diskTypeLen = (wcslen(diskType) + 1) * sizeof(WCHAR);
#  515|   			const size_t length = 12ul + diskTypeLen;
#  516|   			Stream_Write_UINT32(output, length); /* Length */

Error: COMPILER_WARNING (CWE-681): [#def2]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c: scope_hint: In function ‘location_send_client_ready_pdu’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c:114:50: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘Stream_StaticInit’ differ in signedness
#  114 |         wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#      |                                                  ^~~~~~
#      |                                                  |
#      |                                                  char *
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c:30: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:97:64: note: expected ‘BYTE *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#   97 |         WINPR_API wStream* Stream_StaticInit(wStream* s, BYTE* buffer, size_t size);
#      |                                                          ~~~~~~^~~~~~
#  112|   	wStream sbuffer = { 0 };
#  113|   	char buffer[32] = { 0 };
#  114|-> 	wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#  115|   	WINPR_ASSERT(s);
#  116|   

Error: COMPILER_WARNING (CWE-681): [#def3]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c: scope_hint: In function ‘location_send_base_location3d’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c:214:50: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘Stream_StaticInit’ differ in signedness
#  214 |         wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#      |                                                  ^~~~~~
#      |                                                  |
#      |                                                  char *
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:97:64: note: expected ‘BYTE *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#   97 |         WINPR_API wStream* Stream_StaticInit(wStream* s, BYTE* buffer, size_t size);
#      |                                                          ~~~~~~^~~~~~
#  212|   	wStream sbuffer = { 0 };
#  213|   	char buffer[32] = { 0 };
#  214|-> 	wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#  215|   	WINPR_ASSERT(s);
#  216|   	WINPR_ASSERT(channel);

Error: COMPILER_WARNING (CWE-681): [#def4]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c: scope_hint: In function ‘location_send_location2d_delta’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c:245:50: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘Stream_StaticInit’ differ in signedness
#  245 |         wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#      |                                                  ^~~~~~
#      |                                                  |
#      |                                                  char *
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:97:64: note: expected ‘BYTE *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#   97 |         WINPR_API wStream* Stream_StaticInit(wStream* s, BYTE* buffer, size_t size);
#      |                                                          ~~~~~~^~~~~~
#  243|   	wStream sbuffer = { 0 };
#  244|   	char buffer[32] = { 0 };
#  245|-> 	wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#  246|   	WINPR_ASSERT(s);
#  247|   

Error: COMPILER_WARNING (CWE-681): [#def5]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c: scope_hint: In function ‘location_send_location3d_delta’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/location/client/location_main.c:275:50: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘Stream_StaticInit’ differ in signedness
#  275 |         wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#      |                                                  ^~~~~~
#      |                                                  |
#      |                                                  char *
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:97:64: note: expected ‘BYTE *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
#   97 |         WINPR_API wStream* Stream_StaticInit(wStream* s, BYTE* buffer, size_t size);
#      |                                                          ~~~~~~^~~~~~
#  273|   	wStream sbuffer = { 0 };
#  274|   	char buffer[32] = { 0 };
#  275|-> 	wStream* s = Stream_StaticInit(&sbuffer, buffer, sizeof(buffer));
#  276|   	WINPR_ASSERT(s);
#  277|   

Error: COMPILER_WARNING (CWE-704): [#def6]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rail/client/client_rails.c: scope_hint: In function ‘client_rail_server_start_cmd’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rail/client/client_rails.c:90:49: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   90 |                 exec.RemoteApplicationArguments = RemoteApplicationFile;
#      |                                                 ^
#   88|   	}
#   89|   	else if (RemoteApplicationFile)
#   90|-> 		exec.RemoteApplicationArguments = RemoteApplicationFile;
#   91|   	else
#   92|   		exec.RemoteApplicationArguments = RemoteApplicationCmdLine;

Error: COMPILER_WARNING (CWE-704): [#def7]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rail/client/client_rails.c:92:49: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   92 |                 exec.RemoteApplicationArguments = RemoteApplicationCmdLine;
#      |                                                 ^
#   90|   		exec.RemoteApplicationArguments = RemoteApplicationFile;
#   91|   	else
#   92|-> 		exec.RemoteApplicationArguments = RemoteApplicationCmdLine;
#   93|   	exec.RemoteApplicationProgram =
#   94|   	    freerdp_settings_get_string(settings, FreeRDP_RemoteApplicationProgram);

Error: COMPILER_WARNING (CWE-704): [#def8]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rail/client/client_rails.c:93:39: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   93 |         exec.RemoteApplicationProgram =
#      |                                       ^
#   91|   	else
#   92|   		exec.RemoteApplicationArguments = RemoteApplicationCmdLine;
#   93|-> 	exec.RemoteApplicationProgram =
#   94|   	    freerdp_settings_get_string(settings, FreeRDP_RemoteApplicationProgram);
#   95|   	exec.RemoteApplicationWorkingDir =

Error: COMPILER_WARNING (CWE-704): [#def9]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rail/client/client_rails.c:95:42: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   95 |         exec.RemoteApplicationWorkingDir =
#      |                                          ^
#   93|   	exec.RemoteApplicationProgram =
#   94|   	    freerdp_settings_get_string(settings, FreeRDP_RemoteApplicationProgram);
#   95|-> 	exec.RemoteApplicationWorkingDir =
#   96|   	    freerdp_settings_get_string(settings, FreeRDP_ShellWorkingDirectory);
#   97|   	return context->ClientExecute(context, &exec);

Error: CLANG_WARNING: [#def10]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/pulse/rdpsnd_pulse.c:754:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'pulse'
#  752|   	if (pa_threaded_mainloop_start(pulse->mainloop) < 0)
#  753|   	{
#  754|-> 		pa_threaded_mainloop_unlock(pulse->mainloop);
#  755|   		return FALSE;
#  756|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/pulse/rdpsnd_pulse.c: scope_hint: In function ‘pulse_freerdp_rdpsnd_client_subsystem_entry’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/pulse/rdpsnd_pulse.c:754:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pulse’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/pulse/rdpsnd_pulse.c:32: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/pulse/rdpsnd_pulse.c:714:9: note: in expansion of macro ‘WINPR_ASSERT’
#  752|   	if (pa_threaded_mainloop_start(pulse->mainloop) < 0)
#  753|   	{
#  754|-> 		pa_threaded_mainloop_unlock(pulse->mainloop);
#  755|   		return FALSE;
#  756|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:175:12: warning[-Wanalyzer-malloc-leak]: leak of ‘audio_formats_new((long unsigned int)*rdpsnd.NumberOfServerFormats)’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:40: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:38: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:689:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:690:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:690:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:691:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:692:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:782:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:788:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:788:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:788:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:790:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:790:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:264:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:277:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:277:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:278:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:278:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:279:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:279:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_select_supported_audio_formats’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:302:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/addin.h:23: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:46: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/api.h:103:11: note: in definition of macro ‘IFCALLRESULT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/rdpsnd/client/rdpsnd_main.c:165:9: note: in expansion of macro ‘WINPR_ASSERT’
#  173|   	rdpsnd->ClientFormats = audio_formats_new(rdpsnd->NumberOfServerFormats);
#  174|   
#  175|-> 	if (!rdpsnd->ClientFormats || !rdpsnd->device)
#  176|   		return;
#  177|   

Error: COMPILER_WARNING (CWE-704): [#def13]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/remdesk/client/remdesk_main.c: scope_hint: In function ‘remdesk_send_ctl_remote_control_desktop_pdu’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/remdesk/client/remdesk_main.c:432:32: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  430|   	WINPR_ASSERT(settings);
#  431|   
#  432|-> 	pdu.raConnectionString =
#  433|   	    freerdp_settings_get_string(settings, FreeRDP_RemoteAssistanceRCTicket);
#  434|   	raConnectionStringW = ConvertUtf8ToWCharAlloc(pdu.raConnectionString, &length);

Error: COMPILER_WARNING (CWE-704): [#def14]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c: scope_hint: In function ‘wlf_cliprdr_transfer_data’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c:528:38: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  526|   	if (wlf_mime_is_html(mime))
#  527|   	{
#  528|-> 		request.responseMime = mime_html;
#  529|   		request.responseFormat = wlf_get_server_format_id(clipboard, type_HtmlFormat);
#  530|   	}

Error: COMPILER_WARNING (CWE-704): [#def15]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c:533:38: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  531|   	else if (wlf_mime_is_file(mime))
#  532|   	{
#  533|-> 		request.responseMime = mime;
#  534|   		request.responseFormat = wlf_get_server_format_id(clipboard, type_FileGroupDescriptorW);
#  535|   	}

Error: COMPILER_WARNING (CWE-704): [#def16]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c:543:38: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  541|   	else if (wlf_mime_is_image(mime))
#  542|   	{
#  543|-> 		request.responseMime = mime;
#  544|   		if (strcmp(mime, mime_tiff) == 0)
#  545|   			request.responseFormat = CF_TIFF;

Error: COMPILER_WARNING (CWE-681): [#def17]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c: scope_hint: In function ‘wlf_cliprdr_server_format_data_request’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c:785:79: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘cliprdr_file_context_update_client_data’ differ in signedness
#  785 |                 if (!cliprdr_file_context_update_client_data(clipboard->file, data, size))
#      |                                                                               ^~~~
#      |                                                                               |
#      |                                                                               BYTE * {aka unsigned char *}
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlf_cliprdr.c:35: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/client/client_cliprdr_file.h:87:78: note: expected ‘const char *’ but argument is of type ‘BYTE *’ {aka ‘unsigned char *’}
#   87 |                                                                  const char* data, size_t count);
#      |                                                                  ~~~~~~~~~~~~^~~~
#  783|   	if (fileFormatId == formatId)
#  784|   	{
#  785|-> 		if (!cliprdr_file_context_update_client_data(clipboard->file, data, size))
#  786|   			goto fail;
#  787|   	}

Error: COMPILER_WARNING (CWE-704): [#def18]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlfreerdp.c: scope_hint: In function ‘wl_post_connect’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/Wayland/wlfreerdp.c:244:23: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  242|   	const char* wtitle = freerdp_settings_get_string(settings, FreeRDP_WindowTitle);
#  243|   	if (wtitle)
#  244|-> 		title = wtitle;
#  245|   
#  246|   	if (!gdi_init(instance, PIXEL_FORMAT_BGRA32))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:189:24: warning[-Wanalyzer-malloc-leak]: leak of ‘xf_cached_data_new_copy(data,  size)’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:35: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2011:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2012:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2012:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2015:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2018:9: note: in expansion of macro ‘WINPR_ASSERT’
#  187|   	if (data_length > 0)
#  188|   	{
#  189|-> 		copy = malloc(data_length);
#  190|   		if (!copy)
#  191|   			return NULL;

Error: COMPILER_WARNING (CWE-704): [#def20]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c: scope_hint: In function ‘xf_cliprdr_server_format_data_response’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2178:73: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘xf_cached_data_new_copy’ discards ‘const’ qualifier from pointer target type
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:184:52: note: expected ‘BYTE *’ {aka ‘unsigned char *’} but argument is of type ‘const BYTE *’ {aka ‘const unsigned char *’}
# 2176|   		// clipboard->cachedData owns cached_data
# 2177|   		// NOLINTNEXTLINE(clang-analyzer-unix.Malloc
# 2178|-> 		xfCachedData* cached_raw_data = xf_cached_data_new_copy(data, size);
# 2179|   		if (!cached_raw_data)
# 2180|   			WLog_WARN(TAG, "Failed to allocate cache entry");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2183:80: warning[-Wanalyzer-malloc-leak]: leak of ‘xf_cached_data_new_copy(data,  size)’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2011:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2012:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2012:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2015:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_cliprdr.c:2018:9: note: in expansion of macro ‘WINPR_ASSERT’
# 2181|   		else
# 2182|   		{
# 2183|-> 			if (!HashTable_Insert(clipboard->cachedRawData, (void*)(UINT_PTR)srcFormatId,
# 2184|   			                      cached_raw_data))
# 2185|   			{

Error: COMPILER_WARNING (CWE-697): [#def22]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_event.c: scope_hint: In function ‘xf_event_action_script_init’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_event.c:207:21: warning[-Waddress]: the address of ‘buffer’ will always evaluate as ‘true’
#  207 |                 if (!buffer || !ArrayList_Append(xfc->xevents, buffer))
#      |                     ^
#  205|   		strtok_s(buffer, "\n", &context);
#  206|   
#  207|-> 		if (!buffer || !ArrayList_Append(xfc->xevents, buffer))
#  208|   		{
#  209|   			pclose(actionScript);

Error: COMPILER_WARNING (CWE-697): [#def23]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_keyboard.c: scope_hint: In function ‘xf_keyboard_action_script_init’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/X11/xf_keyboard.c:123:21: warning[-Waddress]: the address of ‘buffer’ will always evaluate as ‘true’
#  123 |                 if (!buffer || !ArrayList_Append(xfc->keyCombinations, buffer))
#      |                     ^
#  121|   		strtok_s(buffer, "\n", &context);
#  122|   
#  123|-> 		if (!buffer || !ArrayList_Append(xfc->keyCombinations, buffer))
#  124|   		{
#  125|   			ArrayList_Free(xfc->keyCombinations);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c: scope_hint: In function ‘append_entry’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2174:12: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:42: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2485:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:1664:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2467:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:27: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2469:9: note: in expansion of macro ‘WLog_Print’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2307:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2264:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2152:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2134:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2134:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2134:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2134:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2135:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/client_cliprdr_file.c:2136:9: note: in expansion of macro ‘WINPR_ASSERT’
# 2172|   {
# 2173|   	CliprdrLocalFile* tmp = realloc(stream->files, sizeof(CliprdrLocalFile) * (stream->count + 1));
# 2174|-> 	if (!tmp)
# 2175|   		return FALSE;
# 2176|   	stream->files = tmp;

Error: COMPILER_WARNING (CWE-704): [#def25]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/cmdline.c: scope_hint: In function ‘argv_append’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/cmdline.c:5320:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5320 |         tmp[*pargc] = what;
#      |                     ^
# 5318|   		return FALSE;
# 5319|   
# 5320|-> 	tmp[*pargc] = what;
# 5321|   	*pargv = tmp;
# 5322|   	*pargc = nargc;

Error: COMPILER_WARNING (CWE-843): [#def26]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/file.c: scope_hint: In function ‘freerdp_client_populate_settings_from_rdp_file’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/file.c:2303:85: warning[-Wincompatible-pointer-types]: passing argument 3 of ‘freerdp_client_add_dynamic_channel’ from incompatible pointer type
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/file.c:31: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/client/cmdline.h:96:74: note: expected ‘const char **’ but argument is of type ‘char **’
# 2301|   		size_t count = 0;
# 2302|   		char** str = CommandLineParseCommaSeparatedValuesEx(LOCATION_CHANNEL_NAME, NULL, &count);
# 2303|-> 		const BOOL rc = freerdp_client_add_dynamic_channel(settings, count, str);
# 2304|   		free(str);
# 2305|   		if (!rc)

Error: CLANG_WARNING: [#def27]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/man/generate_argument_docbook.c:19:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#   17|   		free(*buffer);
#   18|   	}
#   19|-> 	memset(&tmp[*size], '\0', increment);
#   20|   	*size = nsize;
#   21|   	*buffer = tmp;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def28]
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/man/generate_argument_docbook.c: scope_hint: In function ‘resize’
freerdp-3.4.0-build/FreeRDP-3.4.0/client/common/man/generate_argument_docbook.c:19:9: warning[-Wanalyzer-null-argument]: use of NULL ‘tmp’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#   17|   		free(*buffer);
#   18|   	}
#   19|-> 	memset(&tmp[*size], '\0', increment);
#   20|   	*size = nsize;
#   21|   	*buffer = tmp;

Error: COMPILER_WARNING (CWE-843): [#def29]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/codec/rfx.c: scope_hint: In function ‘rfx_message_get_tiles’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/codec/rfx.c:1371:23: warning[-Wincompatible-pointer-types]: returning ‘RFX_TILE **’ from a function with incompatible return type ‘const RFX_TILE **’
# 1369|   	if (numTiles)
# 1370|   		*numTiles = message->numTiles;
# 1371|-> 	return message->tiles;
# 1372|   }
# 1373|   

Error: COMPILER_WARNING (CWE-681): [#def30]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/aad.c: scope_hint: In function ‘bn_to_base64_url’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/aad.c:723:52: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘crypto_base64url_encode’ differ in signedness
#  723 |         char* b64 = (char*)crypto_base64url_encode(bn, len);
#      |                                                    ^~
#      |                                                    |
#      |                                                    char *
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/aad.c:25: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/crypto/crypto.h:47:63: note: expected ‘const BYTE *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’
#   47 |         FREERDP_API char* crypto_base64url_encode(const BYTE* data, size_t length);
#      |                                                   ~~~~~~~~~~~~^~~~
#  721|   		return NULL;
#  722|   
#  723|-> 	char* b64 = (char*)crypto_base64url_encode(bn, len);
#  724|   	free(bn);
#  725|   

Error: COMPILER_WARNING: [#def31]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/gateway/rdg.c: scope_hint: In function ‘rdg_establish_data_connection’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/gateway/rdg.c:1477:25: warning[-Wuse-after-free]: pointer ‘response_56’ may be used after ‘http_response_free’
# 1477 |                         http_response_log_error_status(rdg->log, WLOG_WARN, response);
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/gateway/rdg.c:1433:9: note: call to ‘http_response_free’ here
# 1433 |         http_response_free(response);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1475|   			return TRUE;
# 1476|   		default:
# 1477|-> 			http_response_log_error_status(rdg->log, WLOG_WARN, response);
# 1478|   			return FALSE;
# 1479|   	}

Error: COMPILER_WARNING (CWE-704): [#def32]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/gcc.c: scope_hint: In function ‘gcc_write_server_security_data’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/gcc.c:1782:39: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘gcc_update_server_random’ discards ‘const’ qualifier from pointer target type
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/gcc.c:1750:51: note: expected ‘rdpSettings *’ {aka ‘struct rdp_settings *’} but argument is of type ‘const rdpSettings *’ {aka ‘const struct rdp_settings *’}
# 1780|   	if (settings->EncryptionMethods == ENCRYPTION_METHOD_NONE)
# 1781|   		return TRUE;
# 1782|-> 	if (!gcc_update_server_random(settings))
# 1783|   		return FALSE;
# 1784|   

Error: COMPILER_WARNING (CWE-843): [#def33]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c: scope_hint: In function ‘license_set_string’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c:2813:14: warning[-Wincompatible-pointer-types]: assignment to ‘WCHAR *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘BYTE *’ {aka ‘unsigned char *’}
# 2811|   
# 2812|   	size_t len = 0;
# 2813|-> 	*dst = (BYTE*)ConvertUtf8ToWCharAlloc(value, &len);
# 2814|   	if (!*dst || (len > UINT32_MAX / sizeof(WCHAR)))
# 2815|   	{

Error: COMPILER_WARNING (CWE-843): [#def34]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c: scope_hint: In function ‘license_server_configure’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c:2855:63: warning[-Wincompatible-pointer-types]: passing argument 3 of ‘license_set_string’ from incompatible pointer type
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c:2805:77: note: expected ‘WCHAR **’ {aka ‘short unsigned int **’} but argument is of type ‘BYTE **’ {aka ‘unsigned char **’}
# 2853|   
# 2854|   	license->ProductInfo->dwVersion = ProductVersion;
# 2855|-> 	if (!license_set_string("pbCompanyName", CompanyName, &license->ProductInfo->pbCompanyName,
# 2856|   	                        &license->ProductInfo->cbCompanyName))
# 2857|   		return FALSE;

Error: COMPILER_WARNING (CWE-843): [#def35]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c:2859:61: warning[-Wincompatible-pointer-types]: passing argument 3 of ‘license_set_string’ from incompatible pointer type
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/license.c:2805:77: note: expected ‘WCHAR **’ {aka ‘short unsigned int **’} but argument is of type ‘BYTE **’ {aka ‘unsigned char **’}
# 2857|   		return FALSE;
# 2858|   
# 2859|-> 	if (!license_set_string("pbProductId", ProductName, &license->ProductInfo->pbProductId,
# 2860|   	                        &license->ProductInfo->cbProductId))
# 2861|   		return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-762): [#def36]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2238:9: warning[-Wanalyzer-mismatching-deallocation]: ‘cache_bitmap’ should have been deallocated with ‘free’ but was deallocated with ‘free_cache_bitmap_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4281:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3953:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_bitmap_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2189:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
# 2236|   	WINPR_PRAGMA_DIAG_PUSH
# 2237|   	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
# 2238|-> 	free_cache_bitmap_order(update->context, cache_bitmap);
# 2239|   	WINPR_PRAGMA_DIAG_POP
# 2240|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-762): [#def37]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_color_table_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2607:9: warning[-Wanalyzer-mismatching-deallocation]: ‘cache_color_table’ should have been deallocated with ‘free’ but was deallocated with ‘free_cache_color_table_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_color_table_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4281:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_color_table_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3953:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2583:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
# 2605|   	WINPR_PRAGMA_DIAG_PUSH
# 2606|   	WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
# 2607|-> 	free_cache_color_table_order(update->context, cache_color_table);
# 2608|   	WINPR_PRAGMA_DIAG_POP
# 2609|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2974:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cache_brush’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4281:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3953:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_read_cache_brush_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2905:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2908:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2908:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2908:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2909:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2909:9: note: in expansion of macro ‘Stream_Read_UINT8’
# 2972|   	}
# 2973|   
# 2974|-> 	return cache_brush;
# 2975|   fail:
# 2976|   	free_cache_brush_order(update->context, cache_brush);

Error: COMPILER_WARNING (CWE-704): [#def39]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_emulate.c: scope_hint: In function ‘scard_status_transition’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_emulate.c:124:42: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  124 |                         reader->szReader = g_ReaderNameA;
#      |                                          ^
#  122|   		{
#  123|   			SCARD_READERSTATEA* reader = &context->readerStateA[0];
#  124|-> 			reader->szReader = g_ReaderNameA;
#  125|   			reader->dwEventState = SCARD_STATE_PRESENT;
#  126|   			reader->cbAtr = sizeof(ATR);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:284:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vgids_ef_new(ctx, 40976)’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_virtual_gids.c: scope_hint: In function ‘vgids_init’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:564:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:565:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:566:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:538:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:539:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:540:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:629:25: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:629:25: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:630:25: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:630:25: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:631:25: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_virtual_gids.c: scope_hint: In function ‘vgids_init’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_virtual_gids.c: scope_hint: In function ‘vgids_init’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/wlog.h:206:28: note: in expansion of macro ‘WLog_Print_tag’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:302:17: note: in expansion of macro ‘WLog_ERR’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/emu/scard/smartcard_virtual_gids.c: scope_hint: In function ‘vgids_init’
#  282|   	Stream_SetLength(ef->data, 0);
#  283|   
#  284|-> 	if (!ArrayList_Append(ctx->files, ef))
#  285|   	{
#  286|   		WLog_ERR(TAG, "Failed to add new ef to file list");

Error: COMPILER_WARNING (CWE-843): [#def41]
freerdp-3.4.0-build/FreeRDP-3.4.0/server/shadow/shadow_client.c: scope_hint: In function ‘shadow_client_context_new’
freerdp-3.4.0-build/FreeRDP-3.4.0/server/shadow/shadow_client.c:255:42: warning[-Wincompatible-pointer-types]: passing argument 1 of ‘WTSOpenServerA’ from incompatible pointer type
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/types.h:25: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/dvc.h:56: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/channels/drdynvc.h:25: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/server/shadow/shadow_client.c:33: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/wtsapi.h:1006:54: note: expected ‘LPSTR’ {aka ‘char *’} but argument is of type ‘rdpContext *’ {aka ‘struct rdp_context *’}
#  253|   
#  254|   	region16_init(&(client->invalidRegion));
#  255|-> 	client->vcm = WTSOpenServerA(peer->context);
#  256|   
#  257|   	if (!client->vcm || client->vcm == INVALID_HANDLE_VALUE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/common/urbdrc_helpers.h:32: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:27: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘urb_control_transfer’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:129:18: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, (long unsigned int)out_size)’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1584:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1587:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1587:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:30: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1587:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1588:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1588:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1589:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1589:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1590:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:1590:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:656:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:660:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:660:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:661:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:661:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:679:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:682:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:682:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:682:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:683:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:683:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:684:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:684:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:685:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:685:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:686:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:686:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:687:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:217:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:218:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:687:9: note: in expansion of macro ‘Stream_Read_UINT32’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/channels/urbdrc/client/data_transfer.c:707:22: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
#  127|   		WINPR_ASSERT(s);
#  128|   		WINPR_ASSERT(Stream_GetRemainingCapacity(s) >= _offset);
#  129|-> 		s->pointer += (_offset);
#  130|   	}
#  131|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/collections.h:34: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/types.h:139: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/settings_types_private.h:29: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/settings.h:30: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:24: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:150:63: warning[-Wanalyzer-malloc-leak]: leak of ‘update_read_cache_brush_order(update,  s, (int)stream_read_u16_le(s, 1))’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4281:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4284:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:193:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:194:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3926:9: note: in expansion of macro ‘Stream_Read_INT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:169:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:170:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3927:9: note: in expansion of macro ‘Stream_Read_UINT16’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3928:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:756:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:757:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:3953:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/update.h:130:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c: scope_hint: In function ‘update_recv_secondary_order’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:103:9: note: in expansion of macro ‘Stream_CheckAndLogRequiredLengthOfSize’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2905:14: note: in expansion of macro ‘Stream_CheckAndLogRequiredLength’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2908:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2908:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2908:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2909:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2909:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2915:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2915:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2915:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2916:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2916:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2919:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2919:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2920:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:147:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:148:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:127:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/assert.h:38:23: note: in definition of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:128:17: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:2920:9: note: in expansion of macro ‘Stream_Read_UINT8’
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/settings_types_private.h:30: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/include/freerdp/api.h:103:11: note: in definition of macro ‘IFCALLRESULT’
freerdp-3.4.0-build/FreeRDP-3.4.0/libfreerdp/core/orders.c:4060:46: note: in expansion of macro ‘IFCALLRESULT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/stream.h:62:39: note: in definition of macro ‘WINPR_STREAM_CAST’
#  148|   		WINPR_ASSERT(Stream_GetRemainingLength(_s) >= sizeof(UINT8));
#  149|   
#  150|-> 		const UINT8 v = WINPR_STREAM_CAST(UINT8, *(_s)->pointer);
#  151|   		if (seek)
#  152|   			Stream_Seek(_s, sizeof(UINT8));

Error: COMPILER_WARNING: [#def44]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/clipboard/synthetic.c:406:34: warning: dereferencing ‘void *’ pointer
#  404|   
#  405|   	if (dst)
#  406|-> 		memmove(dst, &dst[sizeof(WINPR_BITMAP_FILE_HEADER)],
#  407|   		        size - sizeof(WINPR_BITMAP_FILE_HEADER));
#  408|   	return dst;

Error: COMPILER_WARNING (CWE-468): [#def45]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/clipboard/synthetic.c: scope_hint: In function ‘clipboard_synthesize_image_format_to_bmp’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/clipboard/synthetic.c:406:34: warning[-Wpointer-arith]: pointer of type ‘void *’ used in arithmetic
#  406 |                 memmove(dst, &dst[sizeof(WINPR_BITMAP_FILE_HEADER)],
#      |                                  ^
#  404|   
#  405|   	if (dst)
#  406|-> 		memmove(dst, &dst[sizeof(WINPR_BITMAP_FILE_HEADER)],
#  407|   		        size - sizeof(WINPR_BITMAP_FILE_HEADER));
#  408|   	return dst;

Error: COMPILER_WARNING (CWE-843): [#def46]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/clipboard/synthetic_file.c: scope_hint: In function ‘add_directory_contents_to_list’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/clipboard/synthetic_file.c:279:33: warning[-Wincompatible-pointer-types]: initialization of ‘const WCHAR *’ {aka ‘const short unsigned int *’} from incompatible pointer type ‘char *’
#  277|   {
#  278|   	BOOL result = FALSE;
#  279|-> 	const WCHAR* wildcard = "/\0*\0\0\0";
#  280|   	const size_t wildcardLen = 3;
#  281|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/file/generic.c:1205:12: warning[-Wanalyzer-malloc-leak]: leak of ‘pFileSearch’
# 1203|   		 * Disable this return to stop confusing the analyzer. */
# 1204|   #ifndef __clang_analyzer__
# 1205|-> 	if (!is_valid_file_search_handle(hFindFile))
# 1206|   		return FALSE;
# 1207|   #endif

Error: COMPILER_WARNING (CWE-843): [#def48]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c: scope_hint: In function ‘PCSC_SCardListReadersW’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:996:66: warning[-Wincompatible-pointer-types]: passing argument 3 of ‘PCSC_SCardListReaders_Internal’ from incompatible pointer type
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:875:57: note: expected ‘LPSTR’ {aka ‘char *’} but argument is of type ‘CHAR **’ {aka ‘char **’}
#  994|   
#  995|   	status =
#  996|-> 	    PCSC_SCardListReaders_Internal(hContext, mszGroupsA, (LPSTR*)&mszReadersA, pcchReaders);
#  997|   	if (status == SCARD_S_SUCCESS)
#  998|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c: scope_hint: In function ‘PCSC_SCardReadCacheA’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:2773:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:39: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:2738:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:2739:9: note: in expansion of macro ‘WINPR_ASSERT’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:2739:9: note: in expansion of macro ‘WINPR_ASSERT’
# 2771|   	char* id = card_id_and_name_a(CardIdentifier, LookupName);
# 2772|   
# 2773|-> 	data = HashTable_GetItemValue(ctx->cache, id);
# 2774|   	free(id);
# 2775|   	if (!data)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def50]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c: scope_hint: In function ‘PCSC_SCardReadCacheW’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/smartcard/smartcard_pcsc.c:2816:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 2814|   	char* id = card_id_and_name_w(CardIdentifier, LookupName);
# 2815|   
# 2816|-> 	data = HashTable_GetItemValue(ctx->cache, id);
# 2817|   	free(id);
# 2818|   

Error: COMPILER_WARNING (CWE-681): [#def51]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c: scope_hint: In function ‘kerberos_EncryptMessage’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c:1545:34: warning[-Wpointer-sign]: pointer targets in assignment from ‘BYTE *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1545 |         encrypt_iov[2].data.data = header + 16;
#      |                                  ^
# 1543|   	/* Set up the iov array in sig_buffer */
# 1544|   	header = sig_buffer->pvBuffer;
# 1545|-> 	encrypt_iov[2].data.data = header + 16;
# 1546|   	encrypt_iov[3].data.data = (BYTE*)encrypt_iov[2].data.data + encrypt_iov[2].data.length;
# 1547|   	encrypt_iov[4].data.data = (BYTE*)encrypt_iov[3].data.data + encrypt_iov[3].data.length;

Error: COMPILER_WARNING (CWE-681): [#def52]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c:1546:34: warning[-Wpointer-sign]: pointer targets in assignment from ‘BYTE *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1546 |         encrypt_iov[3].data.data = (BYTE*)encrypt_iov[2].data.data + encrypt_iov[2].data.length;
#      |                                  ^
# 1544|   	header = sig_buffer->pvBuffer;
# 1545|   	encrypt_iov[2].data.data = header + 16;
# 1546|-> 	encrypt_iov[3].data.data = (BYTE*)encrypt_iov[2].data.data + encrypt_iov[2].data.length;
# 1547|   	encrypt_iov[4].data.data = (BYTE*)encrypt_iov[3].data.data + encrypt_iov[3].data.length;
# 1548|   	encrypt_iov[0].data.data = (BYTE*)encrypt_iov[4].data.data + encrypt_iov[4].data.length;

Error: COMPILER_WARNING (CWE-681): [#def53]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c:1547:34: warning[-Wpointer-sign]: pointer targets in assignment from ‘BYTE *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1547 |         encrypt_iov[4].data.data = (BYTE*)encrypt_iov[3].data.data + encrypt_iov[3].data.length;
#      |                                  ^
# 1545|   	encrypt_iov[2].data.data = header + 16;
# 1546|   	encrypt_iov[3].data.data = (BYTE*)encrypt_iov[2].data.data + encrypt_iov[2].data.length;
# 1547|-> 	encrypt_iov[4].data.data = (BYTE*)encrypt_iov[3].data.data + encrypt_iov[3].data.length;
# 1548|   	encrypt_iov[0].data.data = (BYTE*)encrypt_iov[4].data.data + encrypt_iov[4].data.length;
# 1549|   	encrypt_iov[1].data.data = data_buffer->pvBuffer;

Error: COMPILER_WARNING (CWE-681): [#def54]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c:1548:34: warning[-Wpointer-sign]: pointer targets in assignment from ‘BYTE *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1548 |         encrypt_iov[0].data.data = (BYTE*)encrypt_iov[4].data.data + encrypt_iov[4].data.length;
#      |                                  ^
# 1546|   	encrypt_iov[3].data.data = (BYTE*)encrypt_iov[2].data.data + encrypt_iov[2].data.length;
# 1547|   	encrypt_iov[4].data.data = (BYTE*)encrypt_iov[3].data.data + encrypt_iov[3].data.length;
# 1548|-> 	encrypt_iov[0].data.data = (BYTE*)encrypt_iov[4].data.data + encrypt_iov[4].data.length;
# 1549|   	encrypt_iov[1].data.data = data_buffer->pvBuffer;
# 1550|   

Error: COMPILER_WARNING (CWE-681): [#def55]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c: scope_hint: In function ‘kerberos_DecryptMessage’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c:1655:26: warning[-Wpointer-sign]: pointer targets in assignment from ‘BYTE *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1655 |         iov[3].data.data = (BYTE*)iov[2].data.data + iov[2].data.length;
#      |                          ^
# 1653|   	iov[1].data.data = data_buffer->pvBuffer;
# 1654|   	iov[2].data.data = header + 16 + ec;
# 1655|-> 	iov[3].data.data = (BYTE*)iov[2].data.data + iov[2].data.length;
# 1656|   	iov[4].data.data = (BYTE*)iov[3].data.data + iov[3].data.length;
# 1657|   

Error: COMPILER_WARNING (CWE-681): [#def56]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Kerberos/kerberos.c:1656:26: warning[-Wpointer-sign]: pointer targets in assignment from ‘BYTE *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
# 1656 |         iov[4].data.data = (BYTE*)iov[3].data.data + iov[3].data.length;
#      |                          ^
# 1654|   	iov[2].data.data = header + 16 + ec;
# 1655|   	iov[3].data.data = (BYTE*)iov[2].data.data + iov[2].data.length;
# 1656|-> 	iov[4].data.data = (BYTE*)iov[3].data.data + iov[3].data.length;
# 1657|   
# 1658|   	if (krb_log_exec(krb5glue_decrypt_iov, context->ctx, key, usage, iov, ARRAYSIZE(iov)))

Error: CLANG_WARNING: [#def57]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Negotiate/negotiate.c:825:4: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  823|   		{
#  824|   			/* Store the mech token in the output buffer */
#  825|-> 			CopyMemory(&output_token.mechToken, output_buffer, sizeof(SecBuffer));
#  826|   
#  827|   			mech_input_buffers[0] = input_token.mechToken;

Error: CLANG_WARNING: [#def58]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/sspi/Negotiate/negotiate.c:1130:4: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1128|   
# 1129|   			/* Use the output buffer to store the optimistic token */
# 1130|-> 			CopyMemory(&output_token.mechToken, output_buffer, sizeof(SecBuffer));
# 1131|   
# 1132|   			status = context->mech->pkg->table->AcceptSecurityContext(

Error: COMPILER_WARNING (CWE-681): [#def59]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c: scope_hint: In function ‘winpr_image_read’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:493:73: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘winpr_image_read_buffer’ differ in signedness
#  493 |                                 status = winpr_image_read_buffer(image, buffer, (size_t)pos);
#      |                                                                         ^~~~~~
#      |                                                                         |
#      |                                                                         char *
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:30: included_from: Included from here.
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/include/winpr/image.h:105:74: note: expected ‘const BYTE *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’
#  105 |         WINPR_API int winpr_image_read_buffer(wImage* image, const BYTE* buffer, size_t size);
#      |                                                              ~~~~~~~~~~~~^~~~~~
#  491|   			if (r == (size_t)pos)
#  492|   			{
#  493|-> 				status = winpr_image_read_buffer(image, buffer, (size_t)pos);
#  494|   			}
#  495|   		}

Error: COMPILER_WARNING (CWE-704): [#def60]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c: scope_hint: In function ‘winpr_convert_to_jpeg’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:632:42: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  630|   	{
#  631|   		const JDIMENSION offset = x * stride;
#  632|-> 		const JSAMPROW coffset = &cdata[offset];
#  633|   		if (jpeg_write_scanlines(&cinfo, &coffset, 1) != 1)
#  634|   			goto fail;

Error: COMPILER_WARNING (CWE-704): [#def61]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:633:50: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘jpeg_write_scanlines’ discards ‘const’ qualifier from pointer target type
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:38: included_from: Included from here.
/usr/include/jpeglib.h:1009:52: note: expected ‘JSAMPARRAY’ {aka ‘unsigned char **’} but argument is of type ‘JSAMPLE * const*’ {aka ‘unsigned char * const*’}
#  631|   		const JDIMENSION offset = x * stride;
#  632|   		const JSAMPROW coffset = &cdata[offset];
#  633|-> 		if (jpeg_write_scanlines(&cinfo, &coffset, 1) != 1)
#  634|   			goto fail;
#  635|   	}

Error: COMPILER_WARNING (CWE-681): [#def62]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c: scope_hint: In function ‘winpr_convert_from_jpeg’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:665:30: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘jpeg_mem_src’ differ in signedness
#  665 |         jpeg_mem_src(&cinfo, comp_data, comp_data_bytes);
#      |                              ^~~~~~~~~
#      |                              |
#      |                              const char *
/usr/include/jpeglib.h:977:48: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
#  977 |                           const unsigned char *inbuffer, unsigned long insize);
#      |                           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
#  663|   	cinfo.err = jpeg_std_error(&jerr);
#  664|   	jpeg_create_decompress(&cinfo);
#  665|-> 	jpeg_mem_src(&cinfo, comp_data, comp_data_bytes);
#  666|   
#  667|   	if (jpeg_read_header(&cinfo, 1) != JPEG_HEADER_OK)

Error: COMPILER_WARNING (CWE-681): [#def63]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:686:40: warning[-Wpointer-sign]: pointer targets in initialization of ‘JSAMPROW’ {aka ‘unsigned char *’} from ‘char *’ differ in signedness
#  686 |                         JSAMPROW row = &decomp_data[cinfo.output_scanline * stride];
#      |                                        ^
#  684|   		while (cinfo.output_scanline < cinfo.image_height)
#  685|   		{
#  686|-> 			JSAMPROW row = &decomp_data[cinfo.output_scanline * stride];
#  687|   			if (jpeg_read_scanlines(&cinfo, &row, 1) != 1)
#  688|   				goto fail;

Error: COMPILER_WARNING (CWE-681): [#def64]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c: scope_hint: In function ‘winpr_convert_from_webp’
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:754:39: warning[-Wpointer-sign]: pointer targets in passing argument 1 of ‘WebPDecodeBGRA’ differ in signedness
#  754 |         uint8_t* dst = WebPDecodeBGRA(comp_data, comp_data_bytes, width, height);
#      |                                       ^~~~~~~~~
#      |                                       |
#      |                                       const char *
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:44: included_from: Included from here.
/usr/include/webp/decode.h:68:20: note: expected ‘const uint8_t *’ {aka ‘const unsigned char *’} but argument is of type ‘const char *’
#   68 |     const uint8_t* data, size_t data_size, int* width, int* height);
#      |     ~~~~~~~~~~~~~~~^~~~
#  752|   #else
#  753|   
#  754|-> 	uint8_t* dst = WebPDecodeBGRA(comp_data, comp_data_bytes, width, height);
#  755|   	if (!dst)
#  756|   		return -1;

Error: COMPILER_WARNING (CWE-681): [#def65]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:754:67: warning[-Wpointer-sign]: pointer targets in passing argument 3 of ‘WebPDecodeBGRA’ differ in signedness
#  754 |         uint8_t* dst = WebPDecodeBGRA(comp_data, comp_data_bytes, width, height);
#      |                                                                   ^~~~~
#      |                                                                   |
#      |                                                                   UINT32 * {aka unsigned int *}
/usr/include/webp/decode.h:68:49: note: expected ‘int *’ but argument is of type ‘UINT32 *’ {aka ‘unsigned int *’}
#   68 |     const uint8_t* data, size_t data_size, int* width, int* height);
#      |                                            ~~~~~^~~~~
#  752|   #else
#  753|   
#  754|-> 	uint8_t* dst = WebPDecodeBGRA(comp_data, comp_data_bytes, width, height);
#  755|   	if (!dst)
#  756|   		return -1;

Error: COMPILER_WARNING (CWE-681): [#def66]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:754:74: warning[-Wpointer-sign]: pointer targets in passing argument 4 of ‘WebPDecodeBGRA’ differ in signedness
#  754 |         uint8_t* dst = WebPDecodeBGRA(comp_data, comp_data_bytes, width, height);
#      |                                                                          ^~~~~~
#      |                                                                          |
#      |                                                                          UINT32 * {aka unsigned int *}
/usr/include/webp/decode.h:68:61: note: expected ‘int *’ but argument is of type ‘UINT32 *’ {aka ‘unsigned int *’}
#   68 |     const uint8_t* data, size_t data_size, int* width, int* height);
#      |                                                        ~~~~~^~~~~~
#  752|   #else
#  753|   
#  754|-> 	uint8_t* dst = WebPDecodeBGRA(comp_data, comp_data_bytes, width, height);
#  755|   	if (!dst)
#  756|   		return -1;

Error: COMPILER_WARNING (CWE-681): [#def67]
freerdp-3.4.0-build/FreeRDP-3.4.0/winpr/libwinpr/utils/image.c:759:24: warning[-Wpointer-sign]: pointer targets in assignment from ‘uint8_t *’ {aka ‘unsigned char *’} to ‘char *’ differ in signedness
#  759 |         *ppdecomp_data = dst;
#      |                        ^
#  757|   
#  758|   	*bpp = 32;
#  759|-> 	*ppdecomp_data = dst;
#  760|   	return (*width) * (*height) * 4;
#  761|   #endif

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-127.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namefreerdp-3.5.1-2.fc41
diffbase-store-results-to/tmp/tmp2lxny7nk/freerdp-3.5.1-2.fc41.tar.xz
diffbase-time-created2024-07-03 12:47:55
diffbase-time-finished2024-07-03 12:57:19
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp2lxny7nk/freerdp-3.5.1-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp2lxny7nk/freerdp-3.5.1-2.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-127.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namefreerdp-3.4.0-1.fc40
store-results-to/tmp/tmpn5iian98/freerdp-3.4.0-1.fc40.tar.xz
time-created2024-07-03 12:37:36
time-finished2024-07-03 12:47:19
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpn5iian98/freerdp-3.4.0-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpn5iian98/freerdp-3.4.0-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9