Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-clipboard-rdp.c:2426:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cliprdr_server_context_new(vcm)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-clipboard-rdp.c:2426:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-clipboard-rdp.c:2426:21: danger: ‘cliprdr_server_context_new(vcm)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 2424| # 2425| clipboard_rdp = g_object_new (GRD_TYPE_CLIPBOARD_RDP, NULL); # 2426|-> cliprdr_context = cliprdr_server_context_new (vcm); # 2427| if (!cliprdr_context) # 2428| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:444:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_new_from_file(certificate_filename)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:356:8: branch_false: following ‘false’ branch (when ‘fd_list’ is non-NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:356:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:365:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:366:31: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:365:7: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:374:7: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:374:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:375:23: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:374:7: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:384:20: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:385:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:391:13: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:393:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:400:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:400:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:409:12: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:410:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:416:13: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:418:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:425:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:425:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:434:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:437:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:444:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:444:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:444:21: danger: ‘freerdp_certificate_new_from_file(certificate_filename)’ leaks here; was allocated at [(25)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/24) # 442| } # 443| # 444|-> rdp_certificate = freerdp_certificate_new_from_file (certificate_filename); # 445| # 446| if (!rdp_certificate) Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_key_new_from_file(key_filename)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:356:8: branch_false: following ‘false’ branch (when ‘fd_list’ is non-NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:356:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:365:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:366:31: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:365:7: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:374:7: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:374:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:375:23: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:374:7: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:384:20: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:385:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:391:13: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:393:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:400:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:400:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:409:12: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:410:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:416:13: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:418:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:425:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:425:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:434:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:437:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:444:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:446:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:455:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:458:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:464:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:464:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-configuration.c:464:21: danger: ‘freerdp_key_new_from_file(key_filename)’ leaks here; was allocated at [(29)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/28) # 462| } # 463| # 464|-> rdp_private_key = freerdp_key_new_from_file (key_filename); # 465| # 466| if (!rdp_private_key) Error: GCC_ANALYZER_WARNING (CWE-688): [#def4] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-ctl.c:470:7: warning[-Wanalyzer-null-argument]: use of NULL ‘password’ where non-null expected gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-ctl.c:451:1: enter_function: entry to ‘vnc_set_credentials’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-ctl.c:458:6: branch_false: following ‘false’ branch (when ‘argc > 0’)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-ctl.c:467:18: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-ctl.c:470:7: danger: argument 1 (‘password’) NULL where non-null expected #argument 1 of ‘__builtin_strlen’ must be non-null # 468| } # 469| # 470|-> if (strlen (password) > MAX_VNC_PASSWORD_SIZE) # 471| { # 472| g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, Error: GCC_ANALYZER_WARNING (CWE-404): [#def5] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-daemon.c:956:1: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-daemon.c:950:3: acquire_resource: ‘va_start’ called here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-daemon.c:956:1: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 954| # 955| return booleans_count; # 956|-> } # 957| # 958| int Error: GCC_ANALYZER_WARNING (CWE-1335): [#def6] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-nal-writer.c:150:39: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-nal-writer.c:652:1: enter_function: entry to ‘grd_nal_writer_get_pps_bitstream’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-nal-writer.c:658:3: call_function: calling ‘start_bitstream’ from ‘grd_nal_writer_get_pps_bitstream’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-nal-writer.c:658:3: return_function: returning to ‘grd_nal_writer_get_pps_bitstream’ from ‘start_bitstream’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-nal-writer.c:659:3: call_function: inlined call to ‘write_nal_start_code_prefix’ from ‘grd_nal_writer_get_pps_bitstream’ # 148| if (bits_left > n_bits) # 149| { # 150|-> nal_bitstream->buffer[byte_pos] <<= n_bits; # 151| nal_bitstream->buffer[byte_pos] |= value; # 152| return; Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:765:20: warning[-Wanalyzer-malloc-leak]: leak of ‘rdpsnd_server_context_new(vcm)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:765:20: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:765:20: danger: ‘rdpsnd_server_context_new(vcm)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 763| # 764| audio_playback = g_object_new (GRD_TYPE_RDP_AUDIO_PLAYBACK, NULL); # 765|-> rdpsnd_context = rdpsnd_server_context_new (vcm); # 766| if (!rdpsnd_context) # 767| g_error ("[RDP.AUDIO_PLAYBACK] Failed to create server context"); Error: GCC_ANALYZER_WARNING (CWE-688): [#def8] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1270:11: warning[-Wanalyzer-null-argument]: use of NULL ‘*item.value’ where non-null expected gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1243:1: enter_function: entry to ‘registry_event_global’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1259:6: branch_false: following ‘false’ branch (when the strings are equal)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1262:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1262:3: branch_true: following ‘true’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1264:19: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1264:10: branch_true: following ‘true’ branch (when the strings are equal)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1266:11: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1266:11: branch_false: following ‘false’ branch (when ‘node_name’ is NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1267:23: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1269:10: branch_true: following ‘true’ branch (when the strings are equal)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1270:19: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-audio-playback.c:1270:11: danger: argument 1 (‘*item.value’) NULL where non-null expected # 1268| } # 1269| if (strcmp (item->key, "media.class") == 0 && # 1270|-> strcmp (item->value, "Audio/Sink") == 0) # 1271| found_audio_sink = TRUE; # 1272| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-fuse-clipboard.c:366:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘entry’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-fuse-clipboard.c:350:7: branch_true: following ‘true’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-fuse-clipboard.c:355:7: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-fuse-clipboard.c:358:14: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-fuse-clipboard.c:366:7: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-fuse-clipboard.c:366:7: danger: dereference of NULL ‘entry’ # 364| } # 365| # 366|-> g_debug ("[FUSE Clipboard] Force clearing selection with clipDataId %u", # 367| entry->clip_data_id); # 368| clear_entry_selection (rdp_fuse_clipboard, entry); Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:197:7: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, 4)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:197:7: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:197:7: danger: ‘Stream_New(0, 4)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 195| # 196| /* Peek TPKT Header */ # 197|-> s = Stream_New (NULL, 4); # 198| g_assert (s); # 199| Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:222:7: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, (long unsigned int)stream_read_u16_be(Stream_New(0, 4), 1))’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:171:1: enter_function: entry to ‘peek_routing_token’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:198:3: branch_true: following ‘true’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:200:24: call_function: inlined call to ‘Stream_Buffer’ from ‘peek_routing_token’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:200:8: call_function: calling ‘peek_bytes’ from ‘peek_routing_token’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:200:8: return_function: returning to ‘peek_routing_token’ from ‘peek_bytes’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:200:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:203:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:203:3: call_function: calling ‘stream_read_u8’ from ‘peek_routing_token’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:203:3: return_function: returning to ‘peek_routing_token’ from ‘stream_read_u8’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:204:3: call_function: calling ‘Stream_Seek’ from ‘peek_routing_token’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:204:3: return_function: returning to ‘peek_routing_token’ from ‘Stream_Seek’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:205:3: call_function: calling ‘stream_read_u16_be’ from ‘peek_routing_token’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:205:3: return_function: returning to ‘peek_routing_token’ from ‘stream_read_u16_be’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:207:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:213:6: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:213:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:221:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:222:7: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-routing-token.c:222:7: danger: ‘Stream_New(0, (long unsigned int)stream_read_u16_be(Stream_New(0, 4), 1))’ leaks here; was allocated at [(67)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/66) # 220| /* Peek full PDU */ # 221| Stream_Free (s, TRUE); # 222|-> s = Stream_New (NULL, tpkt_length); # 223| g_assert (s); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-sw-encoder-ca.c:231:29: warning[-Wanalyzer-malloc-leak]: leak of ‘rfx_context_new(1)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-sw-encoder-ca.c:231:29: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-rdp-sw-encoder-ca.c:231:29: danger: ‘rfx_context_new(1)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 229| encoder_ca = g_object_new (GRD_TYPE_RDP_SW_ENCODER_CA, NULL); # 230| # 231|-> encoder_ca->rfx_context = rfx_context_new (TRUE); # 232| if (!encoder_ca->rfx_context) # 233| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:266:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_new_from_pem(certificate)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:266:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:266:21: danger: ‘freerdp_certificate_new_from_pem(certificate)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 264| *size = 0; # 265| # 266|-> rdp_certificate = freerdp_certificate_new_from_pem (certificate); # 267| if (!rdp_certificate) # 268| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:270:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_get_der(freerdp_certificate_new_from_pem(certificate), &der_certificate_len)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:267:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:270:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:270:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:270:21: danger: ‘freerdp_certificate_get_der(freerdp_certificate_new_from_pem(certificate), &der_certificate_len)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 268| return NULL; # 269| # 270|-> der_certificate = freerdp_certificate_get_der (rdp_certificate, # 271| &der_certificate_len); # 272| if (!der_certificate) Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:275:7: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, 2048)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:267:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:270:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:272:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:275:7: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:275:7: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:275:7: danger: ‘Stream_New(0, 2048)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4) # 273| return NULL; # 274| # 275|-> s = Stream_New (NULL, 2048); # 276| g_assert (s); # 277| Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:322:17: warning[-Wanalyzer-malloc-leak]: leak of ‘redirection_new()’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:317:3: branch_true: following ‘true’ branch (when ‘routing_token’ is non-NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:318:3: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:318:3: branch_true: following ‘true’ branch (when ‘username’ is non-NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:319:3: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:319:3: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:320:3: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:320:3: branch_true: following ‘true’ branch (when ‘certificate’ is non-NULL)... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:322:17: branch_true: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:322:17: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:322:17: danger: ‘redirection_new()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8) # 320| g_assert (certificate); # 321| # 322|-> redirection = redirection_new (); # 323| g_assert (redirection); # 324| Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1159:10: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_peer_new(g_socket_get_fd(g_socket_connection_get_socket(*session_rdp.connection)))’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1159:10: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1159:10: danger: ‘freerdp_peer_new(g_socket_get_fd(g_socket_connection_get_socket(*session_rdp.connection)))’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 1157| g_debug ("Initialize RDP session"); # 1158| # 1159|-> peer = freerdp_peer_new (g_socket_get_fd (socket)); # 1160| if (!peer) # 1161| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1204:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_new_from_pem(server_cert)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1160:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1167:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1170:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1177:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1183:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1190:18: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1191:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1199:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1204:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1204:21: danger: ‘freerdp_certificate_new_from_pem(server_cert)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8) # 1202| NULL); # 1203| # 1204|-> rdp_certificate = freerdp_certificate_new_from_pem (server_cert); # 1205| if (!rdp_certificate) # 1206| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:8: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_new_from_pem(server_cert)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1160:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1167:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1170:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1177:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1183:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1190:18: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1191:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1199:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1204:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1205:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:8: danger: ‘freerdp_certificate_new_from_pem(server_cert)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8) # 1209| return FALSE; # 1210| } # 1211|-> if (!freerdp_settings_set_pointer_len (rdp_settings, # 1212| FreeRDP_RdpServerCertificate, # 1213| rdp_certificate, 1)) Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1216:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_key_new_from_pem(server_key)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1160:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1167:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1170:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1177:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1183:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1190:18: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1191:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1199:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1205:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1216:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1216:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1216:21: danger: ‘freerdp_key_new_from_pem(server_key)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/12) # 1214| g_assert_not_reached (); # 1215| # 1216|-> rdp_private_key = freerdp_key_new_from_pem (server_key); # 1217| if (!rdp_private_key) # 1218| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1223:8: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_key_new_from_pem(server_key)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1160:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1167:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1170:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1177:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1183:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1190:18: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1191:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1199:3: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1205:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1211:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1216:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1216:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1217:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1223:8: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-session-rdp.c:1223:8: danger: ‘freerdp_key_new_from_pem(server_key)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/12) # 1221| return FALSE; # 1222| } # 1223|-> if (!freerdp_settings_set_pointer_len (rdp_settings, # 1224| FreeRDP_RdpServerRsaKey, # 1225| rdp_private_key, 1)) Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:451:21: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_new_from_file(*(GrdSettingsPrivate *)<unknown>.rdp.server_cert_path)’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:447:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:451:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:451:21: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:451:21: danger: ‘freerdp_certificate_new_from_file(*(GrdSettingsPrivate *)<unknown>.rdp.server_cert_path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 449| # 450| #ifdef HAVE_RDP # 451|-> rdp_certificate = freerdp_certificate_new_from_file (priv->rdp.server_cert_path); # 452| if (!rdp_certificate) # 453| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:458:17: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_get_fingerprint(freerdp_certificate_new_from_file(*(GrdSettingsPrivate *)<unknown>.rdp.server_cert_path))’ gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:447:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:451:21: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:452:6: branch_false: following ‘false’ branch... gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:458:17: branch_false: ...to here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:458:17: acquire_memory: allocated here gnome-remote-desktop-48.1/redhat-linux-build/../src/grd-settings.c:458:17: danger: ‘freerdp_certificate_get_fingerprint(freerdp_certificate_new_from_file(*(GrdSettingsPrivate *)<unknown>.rdp.server_cert_path))’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) # 456| } # 457| # 458|-> fingerprint = freerdp_certificate_get_fingerprint (rdp_certificate); # 459| if (!fingerprint) # 460| { Error: CPPCHECK_WARNING (CWE-664): [#def24] gnome-remote-desktop-48.1/src/grd-daemon.c:955: error[va_end_missing]: va_list 'booleans' was opened but not closed by va_end(). # 953| booleans_count += va_arg (booleans, gboolean) ? 1 : 0; # 954| # 955|-> return booleans_count; # 956| } # 957|
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-209.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | gnome-remote-desktop-48.1-1.fc43 |
store-results-to | /tmp/tmprw4tgqa4/gnome-remote-desktop-48.1-1.fc43.tar.xz |
time-created | 2025-04-25 12:49:49 |
time-finished | 2025-04-25 12:52:39 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmprw4tgqa4/gnome-remote-desktop-48.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmprw4tgqa4/gnome-remote-desktop-48.1-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |