From cd5d2e55c13d2f84b2b16b6afbb6dcf5eb9299af Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 22 Apr 2024 15:31:38 +0200 Subject: [PATCH] writer-json-sarif: propagate the "imp" flag as level If the "imp" flag is set on a finding, set the SARIF level to "error", which means "Important". Related: https://issues.redhat.com/browse/OSH-565 Closes: https://github.com/csutils/csdiff/pull/173 --- src/lib/writer-json-sarif.cc | 8 +- tests/csgrep/0124-sarif-writer-imp-args.txt | 1 + tests/csgrep/0124-sarif-writer-imp-stdin.txt | 31396 ++++++ tests/csgrep/0124-sarif-writer-imp-stdout.txt | 82959 ++++++++++++++++ tests/csgrep/CMakeLists.txt | 1 + 5 files changed, 114363 insertions(+), 2 deletions(-) create mode 100644 tests/csgrep/0124-sarif-writer-imp-args.txt create mode 100644 tests/csgrep/0124-sarif-writer-imp-stdin.txt create mode 100644 tests/csgrep/0124-sarif-writer-imp-stdout.txt diff --git a/src/lib/writer-json-sarif.cc b/src/lib/writer-json-sarif.cc index 0e399404..0ee06fdf 100644 --- a/src/lib/writer-json-sarif.cc +++ b/src/lib/writer-json-sarif.cc @@ -338,8 +338,12 @@ void SarifTreeEncoder::appendDef(const Defect &def) // update tool for this rule d->ruleMap[ruleId].tool = def.tool; - // key event severity level - sarifEncodeLevel(&result, keyEvt.event); + if (0 < def.imp) + // if the "imp" flag is set, promote this finding to "Important" + result.emplace("level", "error"); + else + // key event severity level + sarifEncodeLevel(&result, keyEvt.event); // key event location object loc; diff --git a/tests/csgrep/0124-sarif-writer-imp-args.txt b/tests/csgrep/0124-sarif-writer-imp-args.txt new file mode 100644 index 00000000..e952d021 --- /dev/null +++ b/tests/csgrep/0124-sarif-writer-imp-args.txt @@ -0,0 +1 @@ +--mode=sarif diff --git a/tests/csgrep/0124-sarif-writer-imp-stdin.txt b/tests/csgrep/0124-sarif-writer-imp-stdin.txt new file mode 100644 index 00000000..763285c0 --- /dev/null +++ b/tests/csgrep/0124-sarif-writer-imp-stdin.txt @@ -0,0 +1,31396 @@ +{ + "scan": { + "analyzer-version-clang": "17.0.6", + "analyzer-version-coverity": "2023.12.0", + "analyzer-version-cppcheck": "2.9", + "analyzer-version-gcc": "14.0.1", + "analyzer-version-gcc-analyzer": "14.0.1", + "analyzer-version-shellcheck": "0.9.0", + "analyzer-version-snyk-code": "1.1233.0", + "analyzer-version-unicontrol": "0.0.2", + "cov-compilation-unit-count": 219, + "cov-compilation-unit-ratio": 99, + "cov-lines-processed": 190089, + "cov-time-elapsed-analysis": "00:00:37", + "enabled-plugins": "clang, coverity, cppcheck, gcc, shellcheck, snyk, unicontrol", + "exit-code": 0, + "host": "osh-worker-004.osh-001.prod.iad2.dc.redhat.com", + "known-false-positives": "/usr/share/csmock/known-false-positives.js", + "mock-config": "rhel-10-beta-x86_64", + "project-name": "gvfs-1.54.0-2.el10", + "snyk-scanned-files-coverage": 99, + "snyk-scanned-files-success": 324, + "snyk-scanned-files-total": 326, + "store-results-to": "/tmp/tmpy50j2zwh/gvfs-1.54.0-2.el10.tar.xz", + "time-created": "2024-04-16 09:57:52", + "time-finished": "2024-04-16 10:32:36", + "tool": "csmock", + "tool-args": "'/usr/bin/csmock' '-r' 'rhel-10-beta-x86_64' '-t' 'snyk,cppcheck,gcc,unicontrol,coverity,clang,shellcheck' '-o' '/tmp/tmpy50j2zwh/gvfs-1.54.0-2.el10.tar.xz' '--keep-going' '--use-host-cppcheck' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '/tmp/tmpy50j2zwh/gvfs-1.54.0-2.el10.src.rpm'", + "tool-version": "csmock-3.5.3.20240409.155451.gc41dad7.internal-1.el9" + }, + "defects": [ + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 476, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘create_proxy_for_file2’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 415, + "column": 64, + "event": "warning[-Wanalyzer-null-dereference]", + "message": "dereference of NULL ‘file1’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 1111, + "column": 1, + "event": "note", + "message": "(1) entry to ‘g_daemon_file_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 1125, + "column": 9, + "event": "note", + "message": "(2) inlined call to ‘get_pid_for_file’ from ‘g_daemon_file_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 93, + "column": 6, + "event": "note", + "message": "(3) following ‘true’ branch (when ‘file’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 94, + "column": 5, + "event": "note", + "message": "(4) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘create_proxy_for_file2’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 1127, + "column": 11, + "event": "note", + "message": "(5) inlined call to ‘create_proxy_for_file’ from ‘g_daemon_file_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 507, + "column": 10, + "event": "note", + "message": "(6) calling ‘create_proxy_for_file2’ from ‘g_daemon_file_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘create_proxy_for_file2’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 388, + "column": 1, + "event": "note", + "message": "(7) entry to ‘create_proxy_for_file2’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 403, + "column": 11, + "event": "note", + "message": "(8) ‘file1’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 405, + "column": 6, + "event": "note", + "message": "(9) following ‘true’ branch (when ‘path1_out’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 406, + "column": 16, + "event": "note", + "message": "(10) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 407, + "column": 6, + "event": "note", + "message": "(11) following ‘false’ branch (when ‘path2_out’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(12) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfile.c", + "line": 415, + "column": 64, + "event": "note", + "message": "(13) dereference of NULL ‘file1’", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 413| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 414| mount_info1 = _g_daemon_vfs_get_mount_info_sync (daemon_file1->mount_spec,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 415|-> daemon_file1->path,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 416| cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 417| &local_error);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "next_files_sync_check", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 189, + "column": 3, + "event": "path", + "message": "Condition \"enumerator->infos\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 189, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"enumerator->done\" without holding lock \"g__infos_lock\". Elsewhere, \"_GDaemonFileEnumerator.done\" is written to with \"g__infos_lock\" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 204, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"g__infos_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 205, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GDaemonFileEnumerator.done\" is written to with lock \"g__infos_lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 187| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 188| g_mutex_lock (&enumerator->next_files_mutex);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 189|-> if ((enumerator->infos || enumerator->done) && ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 190| enumerator->next_files_mainloop != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 191| {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_daemon_file_enumerator_next_file", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 2, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 506, + "column": 3, + "event": "path", + "message": "Condition \"daemon->sync_connection == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 519, + "column": 3, + "event": "path", + "message": "Condition \"!daemon->infos\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 519, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"daemon->done\" without holding lock \"g__infos_lock\". Elsewhere, \"_GDaemonFileEnumerator.done\" is written to with \"g__infos_lock\" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 204, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"g__infos_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 205, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GDaemonFileEnumerator.done\" is written to with lock \"g__infos_lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 517| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 518| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 519|-> if (! daemon->infos && ! daemon->done)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 520| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 521| /* Wait for incoming data */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_daemon_file_enumerator_next_file", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 506, + "column": 3, + "event": "path", + "message": "Condition \"daemon->sync_connection == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 519, + "column": 3, + "event": "path", + "message": "Condition \"!daemon->infos\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 519, + "column": 3, + "event": "path", + "message": "Condition \"!daemon->done\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 531, + "column": 7, + "event": "missing_lock", + "message": "Accessing \"daemon->next_files_mainloop\" without holding lock \"_GDaemonFileEnumerator.next_files_mutex\". Elsewhere, \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with \"_GDaemonFileEnumerator.next_files_mutex\" held 2 out of 2 times (1 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 522, + "column": 7, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GDaemonFileEnumerator.next_files_mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 523, + "column": 7, + "event": "example_access", + "message": "Example 1 (cont.): \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with lock \"_GDaemonFileEnumerator.next_files_mutex\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 534, + "column": 7, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GDaemonFileEnumerator.next_files_mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileenumerator.c", + "line": 539, + "column": 7, + "event": "example_access", + "message": "Example 2 (cont.): \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with lock \"_GDaemonFileEnumerator.next_files_mutex\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 529| \t\t\t\t\t\t\t\t\tG_VFS_DBUS_TIMEOUT_MSECS,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 530| \t\t\t\t\t\t\t\t\tsync_timeout, daemon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 531|-> g_main_loop_run (daemon->next_files_mainloop);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 532| g_main_context_pop_thread_default (daemon->next_files_context);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 533| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonfileinputstream.c", + "line": 529, + "column": 4, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'res' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileinputstream.c", + "line": 529, + "column": 4, + "event": "note", + "message": "Value stored to 'res' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 527| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 528| \t{", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 529|-> \t res = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 530| \t g_assert_not_reached ();", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 531| \t}", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonfileoutputstream.c", + "line": 480, + "column": 4, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'res' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonfileoutputstream.c", + "line": 480, + "column": 4, + "event": "note", + "message": "Value stored to 'res' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 478| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 479| \t{", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 480|-> \t res = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 481| \t g_assert_not_reached ();", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 482| \t}", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "g_daemon_vfs_local_file_set_attributes", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1225, + "column": 3, + "event": "path", + "message": "Condition \"g_file_info_has_namespace(info, \"metadata\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1229, + "column": 7, + "event": "path", + "message": "Condition \"lstat(filename, &statbuf) != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1246, + "column": 4, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"meta_lookup_cache_new\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1246, + "column": 4, + "event": "var_assign", + "message": "Assigning: \"cache\" = storage returned from \"meta_lookup_cache_new()\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1247, + "column": 4, + "event": "noescape", + "message": "Resource \"cache\" is not freed or pointed-to in \"meta_lookup_cache_lookup_path\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1252, + "column": 11, + "event": "path", + "message": "Condition \"!tree\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1263, + "column": 8, + "event": "path", + "message": "Condition \"proxy == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1270, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1336, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"cache\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1334| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1335| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1336|-> return res;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1337| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1338| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "g_daemon_vfs_local_file_set_attributes", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1225, + "column": 3, + "event": "path", + "message": "Condition \"g_file_info_has_namespace(info, \"metadata\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1229, + "column": 7, + "event": "path", + "message": "Condition \"lstat(filename, &statbuf) != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1247, + "column": 4, + "event": "alloc_arg", + "message": "\"meta_lookup_cache_lookup_path\" allocates memory that is stored into \"tree_path\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1252, + "column": 11, + "event": "path", + "message": "Condition \"!tree\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1263, + "column": 8, + "event": "path", + "message": "Condition \"proxy == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1270, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1336, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"tree_path\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1334| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1335| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1336|-> return res;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1337| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1338| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "g_daemon_vfs_local_file_moved", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "path", + "message": "Condition \"tree1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "path", + "message": "Condition \"tree2\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "path", + "message": "Condition \"tree1 == tree2\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "alias", + "message": "Equality between \"tree1\" and \"tree2\" implies that they are aliases.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1401, + "column": 7, + "event": "path", + "message": "Condition \"proxy\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1414, + "column": 3, + "event": "path", + "message": "Condition \"tree1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1416, + "column": 7, + "event": "freed_arg", + "message": "\"meta_tree_unref\" frees \"tree1\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1420, + "column": 3, + "event": "path", + "message": "Condition \"tree2\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1422, + "column": 7, + "event": "deref_arg", + "message": "Calling \"meta_tree_unref\" dereferences freed pointer \"tree2\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1420| if (tree2)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1421| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1422|-> meta_tree_unref (tree2);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1423| g_free (tree_path2);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1424| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "g_daemon_vfs_local_file_moved", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "path", + "message": "Condition \"tree1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "path", + "message": "Condition \"tree2\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "path", + "message": "Condition \"tree1 == tree2\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1398, + "column": 3, + "event": "alias", + "message": "Equality between \"tree1\" and \"tree2\" implies that they are aliases.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1401, + "column": 7, + "event": "path", + "message": "Condition \"proxy\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1414, + "column": 3, + "event": "path", + "message": "Condition \"tree1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1416, + "column": 7, + "event": "freed_arg", + "message": "\"meta_tree_unref\" frees \"tree1\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1420, + "column": 3, + "event": "path", + "message": "Condition \"tree2\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvfs.c", + "line": 1422, + "column": 7, + "event": "pass_freed_arg", + "message": "Passing freed pointer \"tree2\" as an argument to \"meta_tree_unref\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1420| if (tree2)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1421| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1422|-> meta_tree_unref (tree2);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1423| g_free (tree_path2);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1424| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_daemon_volume_monitor_init", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gdaemonvolumemonitor.c", + "line": 200, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"_the_daemon_volume_monitor\" without holding lock \"g__daemon_vm_lock\". Elsewhere, \"_the_daemon_volume_monitor\" is written to with \"g__daemon_vm_lock\" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvolumemonitor.c", + "line": 245, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"g__daemon_vm_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gdaemonvolumemonitor.c", + "line": 246, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_the_daemon_volume_monitor\" is written to with lock \"g__daemon_vm_lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 198| GMountInfo *info;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 199| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 200|-> _the_daemon_volume_monitor = daemon_monitor;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 201| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 202| daemon_monitor->mount_tracker = g_mount_tracker_new (_g_daemon_vfs_get_async_bus (), TRUE);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "get_file_handle_from_info", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 337, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"fi->fh\" without holding lock \"FileHandle.mutex\". Elsewhere, \"fuse_file_info.fh\" is written to with \"FileHandle.mutex\" held 2 out of 2 times (2 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1071, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"FileHandle.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1073, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"fuse_file_info.fh\" is written to with lock \"FileHandle.mutex\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1208, + "column": 15, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"FileHandle.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1210, + "column": 15, + "event": "example_access", + "message": "Example 2 (cont.): \"fuse_file_info.fh\" is written to with lock \"FileHandle.mutex\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 335| g_mutex_lock (&global_mutex);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 336| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 337|-> fh = GET_FILE_HANDLE (fi);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 338| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 339| /* If the file handle is still valid, its value won't change. If", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 567, + "column": 9, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'uint_result' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 567, + "column": 9, + "event": "note", + "message": "Value stored to 'uint_result' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 565| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 566| default:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 567|-> uint_result = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 568| g_debug (\"attribute: %s type: %d\\n\", attribute, attribute_type);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 569| g_assert_not_reached ();", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "read_stream", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1272, + "column": 3, + "event": "path", + "message": "Condition \"offset != fh->pos\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1274, + "column": 7, + "event": "path", + "message": "Condition \"g_seekable_can_seek((GSeekable *)(void *)input_stream)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1280, + "column": 11, + "event": "path", + "message": "Condition \"g_seekable_seek((GSeekable *)(void *)input_stream, offset, G_SEEK_SET, NULL, &error)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1287, + "column": 15, + "event": "freed_arg", + "message": "\"g_error_free\" frees \"error\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1289, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1324, + "column": 3, + "event": "path", + "message": "Condition \"result == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1336, + "column": 7, + "event": "path", + "message": "Condition \"error != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1340, + "column": 11, + "event": "deref_arg", + "message": "Calling \"errno_from_error\" dereferences freed pointer \"error\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1338| g_debug (\"read_stream: wanted %zd bytes, but got %zd.\\n\", output_buf_size, n_bytes_read);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1339| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1340|-> result = -errno_from_error (error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1341| g_error_free (error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1342| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "write_stream", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1423, + "column": 3, + "event": "path", + "message": "Condition \"!is_append\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1423, + "column": 3, + "event": "path", + "message": "Condition \"offset != fh->pos\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1425, + "column": 7, + "event": "path", + "message": "Condition \"g_seekable_can_seek((GSeekable *)(void *)output_stream)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1429, + "column": 11, + "event": "path", + "message": "Condition \"g_seekable_seek((GSeekable *)(void *)output_stream, offset, G_SEEK_SET, NULL, &error)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1436, + "column": 15, + "event": "freed_arg", + "message": "\"g_error_free\" frees \"error\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1438, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1447, + "column": 3, + "event": "path", + "message": "Condition \"result == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1459, + "column": 7, + "event": "path", + "message": "Condition \"error\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1461, + "column": 11, + "event": "deref_arg", + "message": "Calling \"errno_from_error\" dereferences freed pointer \"error\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1459| if (error)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1460| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1461|-> result = -errno_from_error (error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1462| g_error_free (error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1463| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "vfs_rename", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1660, + "column": 3, + "event": "path", + "message": "Condition \"vfs_flags & (2U /* 1 << 1 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1663, + "column": 3, + "event": "path", + "message": "Condition \"vfs_flags & (1U /* 1 << 0 */)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1671, + "column": 3, + "event": "path", + "message": "Condition \"old_file\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1671, + "column": 3, + "event": "path", + "message": "Condition \"new_file\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1675, + "column": 7, + "event": "path", + "message": "Condition \"fh\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1681, + "column": 7, + "event": "check_return", + "message": "Calling \"g_file_move(old_file, new_file, flags, NULL, NULL, NULL, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1679| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1680| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1681|-> g_file_move (old_file, new_file, flags, NULL, NULL, NULL, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1682| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1683| if (error)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "truncate_stream", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1921, + "column": 3, + "event": "path", + "message": "Condition \"g_seekable_can_truncate((GSeekable *)(void *)fh->stream)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1925, + "column": 8, + "event": "path", + "message": "Condition \"size == 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1943, + "column": 8, + "event": "path", + "message": "Condition \"file_handle_get_size(fh, ¤t_size)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1945, + "column": 7, + "event": "path", + "message": "Condition \"current_size == size\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1949, + "column": 12, + "event": "path", + "message": "Condition \"current_size < size\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1949, + "column": 12, + "event": "path", + "message": "Condition \"g_seekable_can_seek((GSeekable *)(void *)fh->stream)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1955, + "column": 11, + "event": "path", + "message": "Condition \"result == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1956, + "column": 13, + "event": "check_return", + "message": "Calling \"g_seekable_seek\" without checking return value (as is done elsewhere 13 out of 14 times).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsfusedaemon.c", + "line": 1429, + "column": 11, + "event": "example_checked", + "message": "Example 1: \"g_seekable_seek((GSeekable *)(void *)output_stream, offset, G_SEEK_SET, NULL, &error)\" has its value checked in \"g_seekable_seek((GSeekable *)(void *)output_stream, offset, G_SEEK_SET, NULL, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 476, + "column": 3, + "event": "example_checked", + "message": "Example 2: \"g_seekable_seek(seekable, offset, type, job->cancellable, &error)\" has its value checked in \"g_seekable_seek(seekable, offset, type, job->cancellable, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 519, + "column": 3, + "event": "example_checked", + "message": "Example 3: \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\" has its value checked in \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 3107, + "column": 3, + "event": "example_checked", + "message": "Example 4: \"g_seekable_seek(stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\" has its value checked in \"g_seekable_seek(stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 472, + "column": 3, + "event": "example_checked", + "message": "Example 5: \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\" has its value checked in \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1954| result = pad_file (fh, size - current_size, current_size);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1955| if (result == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1956|-> g_seekable_seek (G_SEEKABLE (fh->stream), orig_pos, G_SEEK_SET, NULL, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1957| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1958| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ALLOC_FREE_MISMATCH", + "cwe": 762, + "function": "g_vfs_decode_uri", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 19, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 73, + "column": 3, + "event": "path", + "message": "Condition \"!((g_ascii_table[(guchar)*p] & G_ASCII_ALPHA) != 0)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 80, + "column": 7, + "event": "path", + "message": "Condition \"c == ':'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 81, + "column": 2, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 94, + "column": 3, + "event": "path", + "message": "Condition \"in < p - 1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 95, + "column": 35, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 94, + "column": 3, + "event": "path", + "message": "Condition \"in < p - 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 101, + "column": 3, + "event": "path", + "message": "Condition \"query_start\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 121, + "column": 7, + "event": "path", + "message": "Condition \"fragment_start\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 141, + "column": 3, + "event": "path", + "message": "Condition \"hier_part_start[0] == '/'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 141, + "column": 3, + "event": "path", + "message": "Condition \"hier_part_start[1] == '/'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 152, + "column": 7, + "event": "path", + "message": "Condition \"authority_end == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 164, + "column": 7, + "event": "path", + "message": "Condition \"userinfo_end\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 180, + "column": 11, + "event": "path", + "message": "Condition \"p != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 183, + "column": 4, + "event": "alloc", + "message": "Allocation of memory which must be freed using \"free\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 183, + "column": 4, + "event": "assign", + "message": "Assigning: \"decoded->userinfo\" = \"g_uri_unescape_segment(userinfo_start, userinfo_end, NULL)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 184, + "column": 4, + "event": "path", + "message": "Condition \"decoded->userinfo == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 189, + "column": 2, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 195, + "column": 7, + "event": "path", + "message": "Condition \"*host_start == '['\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 201, + "column": 4, + "event": "path", + "message": "Condition \"host_end == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 203, + "column": 8, + "event": "free", + "message": "Calling \"g_vfs_decoded_uri_free\" frees \"decoded->userinfo\" using \"g_free\" but it should have been freed using \"free\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 201| \t if (host_end == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 202| \t {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 203|-> \t g_vfs_decoded_uri_free (decoded);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 204| \t return NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 205| \t }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ALLOC_FREE_MISMATCH", + "cwe": 762, + "function": "g_vfs_decode_uri", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 26, + "events": [ + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 73, + "column": 3, + "event": "path", + "message": "Condition \"!((g_ascii_table[(guchar)*p] & G_ASCII_ALPHA) != 0)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 80, + "column": 7, + "event": "path", + "message": "Condition \"c == ':'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 81, + "column": 2, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 94, + "column": 3, + "event": "path", + "message": "Condition \"in < p - 1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 95, + "column": 35, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 94, + "column": 3, + "event": "path", + "message": "Condition \"in < p - 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 101, + "column": 3, + "event": "path", + "message": "Condition \"query_start\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 121, + "column": 7, + "event": "path", + "message": "Condition \"fragment_start\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 141, + "column": 3, + "event": "path", + "message": "Condition \"hier_part_start[0] == '/'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 141, + "column": 3, + "event": "path", + "message": "Condition \"hier_part_start[1] == '/'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 152, + "column": 7, + "event": "path", + "message": "Condition \"authority_end == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 164, + "column": 7, + "event": "path", + "message": "Condition \"userinfo_end\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 180, + "column": 11, + "event": "path", + "message": "Condition \"p != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 183, + "column": 4, + "event": "alloc", + "message": "Allocation of memory which must be freed using \"free\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 183, + "column": 4, + "event": "assign", + "message": "Assigning: \"decoded->userinfo\" = \"g_uri_unescape_segment(userinfo_start, userinfo_end, NULL)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 184, + "column": 4, + "event": "path", + "message": "Condition \"decoded->userinfo == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 189, + "column": 2, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 195, + "column": 7, + "event": "path", + "message": "Condition \"*host_start == '['\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 201, + "column": 4, + "event": "path", + "message": "Condition \"host_end == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 213, + "column": 8, + "event": "path", + "message": "Condition \"*s == '/'\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 216, + "column": 12, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 230, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 236, + "column": 7, + "event": "path", + "message": "Condition \"port_start\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 259, + "column": 7, + "event": "path", + "message": "Condition \"*host_start == '['\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 260, + "column": 70, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 269, + "column": 3, + "event": "path", + "message": "Condition \"decoded->path == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/client/gvfsuriutils.c", + "line": 271, + "column": 7, + "event": "free", + "message": "Calling \"g_vfs_decoded_uri_free\" frees \"decoded->userinfo\" using \"g_free\" but it should have been freed using \"free\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 269| if (decoded->path == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 270| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 271|-> g_vfs_decoded_uri_free (decoded);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 272| return NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 273| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "LOCK_EVASION", + "cwe": 543, + "imp": 1, + "function": "g_mount_spec_get_unique_for", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 85, + "column": 7, + "event": "thread1_checks_field", + "message": "Thread1 uses the value read from field \"is_unique\" in the condition \"spec->is_unique\". It sees that the condition is false. Control is switched to Thread2.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 85, + "column": 7, + "event": "thread2_checks_field", + "message": "Thread2 uses the value read from field \"is_unique\" in the condition \"spec->is_unique\". It sees that the condition is false.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 88, + "column": 3, + "event": "thread2_acquires_lock", + "message": "Thread2 acquires lock \"g__unique_hash_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 97, + "column": 7, + "event": "thread2_modifies_field", + "message": "Thread2 sets \"is_unique\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 88, + "column": 3, + "event": "thread1_acquires_lock", + "message": "Thread1 acquires lock \"g__unique_hash_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 97, + "column": 7, + "event": "thread1_overwrites_value_in_field", + "message": "Thread1 sets \"is_unique\" to a new value. Now the two threads have an inconsistent view of \"is_unique\" and updates to fields correlated with \"is_unique\" may be lost.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 85, + "column": 7, + "event": "use_same_locks_for_read_and_modify", + "message": "Guard the modification of \"is_unique\" and the read used to decide whether to modify \"is_unique\" with the same set of locks.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 95| if (unique_spec == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 96| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 97|-> spec->is_unique = TRUE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 98| g_hash_table_insert (unique_hash, spec, spec);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 99| unique_spec = spec;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "g_mount_spec_new_from_string", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 14, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 489, + "column": 3, + "event": "path", + "message": "Condition \"str != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 489, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 489, + "column": 3, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_14;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 489, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 496, + "column": 3, + "event": "path", + "message": "Condition \"colon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 505, + "column": 3, + "event": "path", + "message": "Condition \"kv_pairs[i] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 510, + "column": 7, + "event": "path", + "message": "Condition \"g_strv_length(tokens) != 2\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 523, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(tokens[0], \"prefix\") == 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 535, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 505, + "column": 3, + "event": "path", + "message": "Condition \"kv_pairs[i] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 538, + "column": 3, + "event": "path", + "message": "Condition \"mount_prefix == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 539, + "column": 5, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_inline\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 539, + "column": 5, + "event": "var_assign", + "message": "Assigning: \"mount_prefix\" = storage returned from \"g_strdup_inline(\"/\")\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 542, + "column": 3, + "event": "noescape", + "message": "Resource \"mount_prefix\" is not freed or pointed-to in \"g_mount_spec_new_from_data\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmountspec.c", + "line": 545, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"mount_prefix\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 543| mount_prefix);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 544| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 545|-> return mount_spec;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 546| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 547| fail:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_mount_tracker_finalize", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gmounttracker.c", + "line": 273, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"tracker->mounts\" without holding lock \"_GMountTracker.lock\". Elsewhere, \"_GMountTracker.mounts\" is written to with \"_GMountTracker.lock\" held 2 out of 2 times.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/common/gmounttracker.c", + "line": 391, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GMountTracker.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmounttracker.c", + "line": 406, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GMountTracker.mounts\" is written to with lock \"_GMountTracker.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmounttracker.c", + "line": 420, + "column": 3, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GMountTracker.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gmounttracker.c", + "line": 433, + "column": 3, + "event": "example_access", + "message": "Example 2 (cont.): \"_GMountTracker.mounts\" is written to with lock \"_GMountTracker.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 271| g_mutex_clear (&tracker->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 272| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 273|-> g_list_free_full (tracker->mounts, (GDestroyNotify)g_mount_info_unref);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 274| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 275| g_clear_object (&tracker->proxy);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "UNINIT", + "cwe": 457, + "imp": 1, + "function": "_g_dbus_append_file_info", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 199, + "column": 3, + "event": "path", + "message": "Condition \"attributes[i] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 205, + "column": 7, + "event": "path", + "message": "Condition \"g_file_info_get_attribute_data(info, attributes[i], &type, &value_p, &status)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 208, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 199, + "column": 3, + "event": "path", + "message": "Condition \"attributes[i] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 205, + "column": 7, + "event": "path", + "message": "Condition \"g_file_info_get_attribute_data(info, attributes[i], &type, &value_p, &status)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 208, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 199, + "column": 3, + "event": "path", + "message": "Condition \"attributes[i] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 203, + "column": 7, + "event": "var_decl", + "message": "Declaring variable \"value_p\" without initializer.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdaemonprotocol.c", + "line": 205, + "column": 7, + "event": "uninit_use_in_call", + "message": "Using uninitialized value \"value_p\" when calling \"g_file_info_get_attribute_data\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 203| gpointer value_p;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 204| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 205|-> if (g_file_info_get_attribute_data (info, attributes[i], &type, &value_p, &status))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 206| g_variant_builder_add_value (&builder, ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 207| _g_dbus_append_file_attribute (attributes[i], status, type, value_p));", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "g_vfs_normalize_encoded_dns_sd_triple", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 308, + "column": 3, + "event": "alloc_arg", + "message": "\"g_vfs_decode_dns_sd_triple\" allocates memory that is stored into \"service_name\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 308, + "column": 3, + "event": "path", + "message": "Condition \"!g_vfs_decode_dns_sd_triple(encoded_triple, &service_name, &service_type, &domain, NULL)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 313, + "column": 5, + "event": "path", + "message": "Jumping to label \"out\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 321, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"service_name\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 319| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 320| out:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 321|-> return ret;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 322| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 323| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "g_vfs_normalize_encoded_dns_sd_triple", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 308, + "column": 3, + "event": "alloc_arg", + "message": "\"g_vfs_decode_dns_sd_triple\" allocates memory that is stored into \"service_type\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 308, + "column": 3, + "event": "path", + "message": "Condition \"!g_vfs_decode_dns_sd_triple(encoded_triple, &service_name, &service_type, &domain, NULL)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 313, + "column": 5, + "event": "path", + "message": "Jumping to label \"out\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsdnssdutils.c", + "line": 321, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"service_type\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 319| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 320| out:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 321|-> return ret;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 322| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 323| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "put_string", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 36, + "column": 3, + "event": "path", + "message": "Condition \"len > 65535UL /* (guint16)65535 */\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 45, + "column": 3, + "event": "check_return", + "message": "Calling \"g_data_output_stream_put_string(out, str, NULL, NULL)\" without checking return value. It wraps a library function that may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 43| g_data_output_stream_put_uint16 (out, len,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 44| \t\t\t\t NULL, NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 45|-> g_data_output_stream_put_string (out, str, NULL, NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 46| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 47| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "TAINTED_STRING", + "cwe": 20, + "function": "gvfs_file_info_demarshal", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 227, + "column": 3, + "event": "path", + "message": "Condition \"i < num_attrs\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 233, + "column": 7, + "event": "path", + "message": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_STRING\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 236, + "column": 4, + "event": "tainted_return_value", + "message": "Function \"read_string\" returns tainted data.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 236, + "column": 4, + "event": "var_assign", + "message": "Assigning: \"str\" = \"read_string(in)\", which taints \"str\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 237, + "column": 4, + "event": "tainted_string", + "message": "Passing tainted string \"*str\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 237, + "column": 4, + "event": "remediation", + "message": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 235| \tcase G_FILE_ATTRIBUTE_TYPE_STRING:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 236| \t str = read_string (in);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 237|-> \t g_file_info_set_attribute_string (info, attr, str);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 238| \t g_free (str);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 239| \t break;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "TAINTED_STRING", + "cwe": 20, + "function": "gvfs_file_info_demarshal", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 12, + "events": [ + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 227, + "column": 3, + "event": "path", + "message": "Condition \"i < num_attrs\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 233, + "column": 7, + "event": "path", + "message": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_STRING\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 239, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 312, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 227, + "column": 3, + "event": "path", + "message": "Condition \"i < num_attrs\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 233, + "column": 7, + "event": "path", + "message": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_STRING\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 239, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 312, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 227, + "column": 3, + "event": "path", + "message": "Condition \"i < num_attrs\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 233, + "column": 7, + "event": "path", + "message": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_BYTE_STRING\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 241, + "column": 4, + "event": "tainted_return_value", + "message": "Function \"read_string\" returns tainted data.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 241, + "column": 4, + "event": "var_assign", + "message": "Assigning: \"str\" = \"read_string(in)\", which taints \"str\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 242, + "column": 4, + "event": "tainted_string", + "message": "Passing tainted string \"*str\" to \"g_file_info_set_attribute_byte_string\", which cannot accept tainted data.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/common/gvfsfileinfo.c", + "line": 242, + "column": 4, + "event": "remediation", + "message": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 240| \tcase G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 241| \t str = read_string (in);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 242|-> \t g_file_info_set_attribute_byte_string (info, attr, str);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 243| \t g_free (str);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 244| \t break;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 0, + "event": "internal warning", + "message": "child 21367 timed out after 30s", + "verbosity_level": 0 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 44, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'linelen' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 44, + "column": 3, + "event": "note", + "message": "Value stored to 'linelen' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 42| state->carry_buf_len = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 43| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 44|-> linelen = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 45| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 46| /* strip leading whitespace */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 170, + "column": 29, + "event": "warning[deadcode.DeadStores]", + "message": "Although the value stored to 'lstyle' is used in the enclosing expression, the value is never actually read from 'lstyle'", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 170, + "column": 29, + "event": "note", + "message": "Although the value stored to 'lstyle' is used in the enclosing expression, the value is never actually read from 'lstyle'", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 168| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 169| state->parsed_one = 1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 170|-> state->lstyle = lstyle = 'E';", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 171| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 172| p = &(line[linelen_sans_wsp]);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 23, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 1782, + "column": 24, + "event": "warning[cpp/PT]", + "message": "Unsanitized input from a command line argument flows into fopen, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitary files.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1780| if (strcmp(argv[1], \"-\") == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1781| need_close_in = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1782|-> else if ((infile = fopen(argv[1], \"r\")) != ((FILE *)0))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1783| need_close_in = 1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1784| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 23, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/ParseFTPList.c", + "line": 1792, + "column": 25, + "event": "warning[cpp/PT]", + "message": "Unsanitized input from a command line argument flows into fopen, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write to arbitary files.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1790| if (strcmp(argv[2], \"-\") == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1791| need_close_out = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1792|-> else if ((outfile = fopen(argv[2], \"w\")) != ((FILE *)0))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1793| need_close_out = 1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1794| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "main", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/daemon-main-generic.c", + "line": 34, + "column": 3, + "event": "check_return", + "message": "Calling \"g_setenv(\"GIO_USE_VFS\", \"local\", 1)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 32| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 33| #ifndef BACKEND_USES_GVFS", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 34|-> g_setenv (\"GIO_USE_VFS\", \"local\", TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 35| #endif", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 36| #ifdef BACKEND_PRE_SETUP_FUNC", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/daemon-main.c", + "line": 383, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'name_owner_id' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/daemon-main.c", + "line": 383, + "column": 3, + "event": "note", + "message": "Value stored to 'name_owner_id' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 381| loop = g_main_loop_new (NULL, FALSE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 382| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 383|-> name_owner_id = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 384| /* We want to own *some* name on the org.gtk.vfs.* namespace so that", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 385| filtering for us works from a sandbox */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_set_attribute", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 758, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 762, + "column": 3, + "event": "check_return", + "message": "Calling \"g_file_set_attribute(file, attribute, type, value_p, flags, job->cancellable, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 760| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 761| file = g_file_new_for_path (filename);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 762|-> g_file_set_attribute (file, attribute, type, value_p, flags,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 763| job->cancellable, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 764| g_object_unref (file);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_move", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 803, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 808, + "column": 3, + "event": "check_return", + "message": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 806| src_file = g_file_new_for_path (source);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 807| dst_file = g_file_new_for_path (destination);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 808|-> g_file_move (src_file, dst_file, flags,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 809| job->cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 810| progress_callback, progress_callback_data,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_copy", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 833, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 838, + "column": 3, + "event": "check_return", + "message": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 836| src_file = g_file_new_for_path (source);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 837| dst_file = g_file_new_for_path (destination);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 838|-> g_file_copy (src_file, dst_file, flags,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 839| job->cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 840| progress_callback, progress_callback_data,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_pull", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 867, + "column": 3, + "event": "path", + "message": "Condition \"!(flags & G_FILE_COPY_ALL_METADATA)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 875, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 881, + "column": 3, + "event": "path", + "message": "Condition \"remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 882, + "column": 5, + "event": "check_return", + "message": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 880| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 881| if (remove_source)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 882|-> g_file_move (src_file, dst_file, flags, job->cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 883| progress_callback, progress_callback_data, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 884| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_pull", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 867, + "column": 3, + "event": "path", + "message": "Condition \"!(flags & G_FILE_COPY_ALL_METADATA)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 875, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 881, + "column": 3, + "event": "path", + "message": "Condition \"remove_source\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 885, + "column": 5, + "event": "check_return", + "message": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 883| progress_callback, progress_callback_data, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 884| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 885|-> g_file_copy (src_file, dst_file, flags, job->cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 886| progress_callback, progress_callback_data, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 887| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_push", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 2, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 909, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 915, + "column": 3, + "event": "path", + "message": "Condition \"remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 916, + "column": 5, + "event": "check_return", + "message": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 914| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 915| if (remove_source)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 916|-> g_file_move (src_file, dst_file, flags, job->cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 917| progress_callback, progress_callback_data, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 918| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_push", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 2, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 909, + "column": 3, + "event": "path", + "message": "Condition \"!check_permission(self, job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 915, + "column": 3, + "event": "path", + "message": "Condition \"remove_source\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 919, + "column": 5, + "event": "check_return", + "message": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 917| progress_callback, progress_callback_data, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 918| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 919|-> g_file_copy (src_file, dst_file, flags, job->cancellable,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 920| progress_callback, progress_callback_data, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 921| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "g_vfs_backend_admin_pre_setup", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1127, + "column": 3, + "event": "path", + "message": "Condition \"error != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1135, + "column": 3, + "event": "path", + "message": "Condition \"pkexec_uid == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1143, + "column": 3, + "event": "path", + "message": "Condition \"*__errno_location() != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1147, + "column": 3, + "event": "check_return", + "message": "Calling \"g_setenv(\"DBUS_SESSION_BUS_ADDRESS\", session_address, 1)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1145| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1146| acquire_caps (uid);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1147|-> g_setenv (\"DBUS_SESSION_BUS_ADDRESS\", session_address, TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1148| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1149| if (runtime_dir)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "g_vfs_backend_admin_pre_setup", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1127, + "column": 3, + "event": "path", + "message": "Condition \"error != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1135, + "column": 3, + "event": "path", + "message": "Condition \"pkexec_uid == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1143, + "column": 3, + "event": "path", + "message": "Condition \"*__errno_location() != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1149, + "column": 3, + "event": "path", + "message": "Condition \"runtime_dir\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendadmin.c", + "line": 1150, + "column": 5, + "event": "check_return", + "message": "Calling \"g_setenv(\"XDG_RUNTIME_DIR\", runtime_dir, 1)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1148| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1149| if (runtime_dir)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1150|-> g_setenv (\"XDG_RUNTIME_DIR\", runtime_dir, TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1151| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "virtual_node_free", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 123, + "column": 3, + "event": "path", + "message": "Switch case value \"VIRTUAL_NODE_FILE\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 126, + "column": 7, + "event": "path", + "message": "Condition \"node->backing_file != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 128, + "column": 11, + "event": "path", + "message": "Condition \"node->owned_file\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 129, + "column": 13, + "event": "check_return", + "message": "Calling \"g_unlink(node->backing_file)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 127| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 128| if (node->owned_file)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 129|-> g_unlink (node->backing_file);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 130| g_free (node->backing_file);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 131| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 476, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 6, + "events": [ + { + "file_name": "/usr/lib64/glib-2.0/include/glibconfig.h", + "line": 9, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtypes.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/galloca.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 32, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 35, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘virtual_dir_lookup’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 183, + "column": 16, + "event": "warning[-Wanalyzer-null-dereference]", + "message": "dereference of NULL ‘dir’", + "verbosity_level": 0 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 183, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 768, + "column": 1, + "event": "note", + "message": "(1) entry to ‘try_set_display_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 777, + "column": 10, + "event": "note", + "message": "(2) calling ‘virtual_node_lookup’ from ‘try_set_display_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 197, + "column": 1, + "event": "note", + "message": "(3) entry to ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 37, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/giochannel.h", + "line": 36, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 56, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(4) inlined call to ‘g_strdup_inline’ from ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 204, + "column": 15, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(5) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘virtual_dir_lookup’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 6, + "event": "note", + "message": "(6) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 6, + "event": "note", + "message": "(7) following ‘true’ branch (when ‘parent’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 13, + "event": "note", + "message": "(8) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 13, + "event": "note", + "message": "(9) ‘dir’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 212, + "column": 15, + "event": "note", + "message": "(10) following ‘false’ branch (when ‘copy’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 245, + "column": 3, + "event": "note", + "message": "(11) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 777, + "column": 10, + "event": "note", + "message": "(12) returning to ‘try_set_display_name’ from ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 778, + "column": 6, + "event": "note", + "message": "(13) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 786, + "column": 7, + "event": "note", + "message": "(14) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 786, + "column": 7, + "event": "note", + "message": "(15) ‘dir’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 786, + "column": 7, + "event": "note", + "message": "(16) calling ‘virtual_dir_lookup’ from ‘try_set_display_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 177, + "column": 1, + "event": "note", + "message": "(17) entry to ‘virtual_dir_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 183, + "column": 16, + "event": "note", + "message": "(18) dereference of NULL ‘dir’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 183, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 181| VirtualNode *node;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 182| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 183|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 184| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 185| for (l = dir->children; l != NULL; l = l->next)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 273, + "column": 13, + "event": "warning[core.NullDereference]", + "message": "Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dir')", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 969, + "column": 7, + "event": "note", + "message": "Assuming 'source_node' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 969, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 977, + "column": 15, + "event": "note", + "message": "Calling 'virtual_node_lookup'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 7, + "event": "note", + "message": "'parent' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 3, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 5, + "event": "note", + "message": "Null pointer value stored to 'dest_dir'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 212, + "column": 10, + "event": "note", + "message": "Assuming 'copy' is equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 212, + "column": 3, + "event": "note", + "message": "Loop condition is false. Execution continues on line 245", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 977, + "column": 15, + "event": "note", + "message": "Returning from 'virtual_node_lookup'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 978, + "column": 7, + "event": "note", + "message": "'dest_node' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 978, + "column": 3, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 980, + "column": 11, + "event": "note", + "message": "Assuming the condition is true", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 980, + "column": 7, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 982, + "column": 8, + "event": "note", + "message": "Assuming field 'type' is not equal to VIRTUAL_NODE_DIRECTORY", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 982, + "column": 4, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 995, + "column": 22, + "event": "note", + "message": "Passing null pointer value via 1st parameter 'dir'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 995, + "column": 6, + "event": "note", + "message": "Calling 'virtual_unlink'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 273, + "column": 13, + "event": "note", + "message": "Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dir')", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 59, + "event": "note", + "message": "expanded from macro 'g_assert'", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 59, + "event": "note", + "message": "expanded from macro 'G_LIKELY'", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 66, + "event": "note", + "message": "expanded from macro '_G_BOOLEAN_EXPR'", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "expanded from macro '_G_BOOLEAN_EXPR_IMPL'", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 271| VirtualNode *node)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 272| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 273|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 274| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 275| dir->children = g_list_remove (dir->children, node);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 476, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘virtual_unlink’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 273, + "column": 16, + "event": "warning[-Wanalyzer-null-dereference]", + "message": "dereference of NULL ‘dir’", + "verbosity_level": 0 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 273, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 956, + "column": 1, + "event": "note", + "message": "(1) entry to ‘try_move’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 968, + "column": 17, + "event": "note", + "message": "(2) calling ‘virtual_node_lookup’ from ‘try_move’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 197, + "column": 1, + "event": "note", + "message": "(3) entry to ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 6, + "event": "note", + "message": "(4) following ‘true’ branch (when ‘parent’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 13, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 13, + "event": "note", + "message": "(6) ‘source_dir’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 968, + "column": 17, + "event": "note", + "message": "(7) returning to ‘try_move’ from ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 969, + "column": 6, + "event": "note", + "message": "(8) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 977, + "column": 15, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 977, + "column": 15, + "event": "note", + "message": "(10) calling ‘virtual_node_lookup’ from ‘try_move’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 197, + "column": 1, + "event": "note", + "message": "(11) entry to ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(12) inlined call to ‘g_strdup_inline’ from ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 204, + "column": 15, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(13) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘virtual_unlink’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 6, + "event": "note", + "message": "(14) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 6, + "event": "note", + "message": "(15) following ‘true’ branch (when ‘parent’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 13, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 13, + "event": "note", + "message": "(17) ‘source_dir’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 212, + "column": 15, + "event": "note", + "message": "(18) following ‘false’ branch (when ‘copy’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 245, + "column": 3, + "event": "note", + "message": "(19) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 977, + "column": 15, + "event": "note", + "message": "(20) returning to ‘try_move’ from ‘virtual_node_lookup’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 978, + "column": 6, + "event": "note", + "message": "(21) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 980, + "column": 17, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 980, + "column": 10, + "event": "note", + "message": "(23) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 982, + "column": 24, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 982, + "column": 14, + "event": "note", + "message": "(25) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 995, + "column": 13, + "event": "note", + "message": "(26) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 995, + "column": 13, + "event": "note", + "message": "(27) ‘source_dir’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 995, + "column": 13, + "event": "note", + "message": "(28) calling ‘virtual_unlink’ from ‘try_move’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 270, + "column": 1, + "event": "note", + "message": "(29) entry to ‘virtual_unlink’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 273, + "column": 16, + "event": "note", + "message": "(30) dereference of NULL ‘dir’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 273, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 271| VirtualNode *node)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 272| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 273|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 274| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 275| dir->children = g_list_remove (dir->children, node);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "virtual_create", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 289, + "column": 3, + "event": "path", + "message": "Condition \"dir->type == VIRTUAL_NODE_DIRECTORY\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 289, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 289, + "column": 3, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_17;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 289, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 291, + "column": 3, + "event": "path", + "message": "Condition \"virtual_dir_lookup(dir, name) != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 296, + "column": 3, + "event": "path", + "message": "Condition \"backing_file != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 306, + "column": 7, + "event": "path", + "message": "Condition \"fd < 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 314, + "column": 7, + "event": "check_return", + "message": "Calling \"g_unlink(template)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 312| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 313| close (fd);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 314|-> g_unlink (template);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 315| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 316| file->backing_file = template;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 759, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'file' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 759, + "column": 3, + "event": "note", + "message": "Value stored to 'file' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 757| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 758| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 759|-> file = virtual_mkdir (dir, basename);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 760| g_free (basename);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 761| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 932, + "column": 7, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'file' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 932, + "column": 7, + "event": "note", + "message": "Value stored to 'file' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 930| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 931| basename = g_path_get_basename (destination);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 932|-> file = virtual_create (G_VFS_BACKEND_BURN (backend),", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 933| dir,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 934| basename,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 1018, + "column": 45, + "event": "warning[core.NullDereference]", + "message": "Access to field 'children' results in a dereference of a null pointer (loaded from variable 'source_dir')", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 968, + "column": 17, + "event": "note", + "message": "Calling 'virtual_node_lookup'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 7, + "event": "note", + "message": "'parent' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 207, + "column": 3, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 208, + "column": 5, + "event": "note", + "message": "Null pointer value stored to 'source_dir'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 212, + "column": 10, + "event": "note", + "message": "Assuming 'copy' is equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 212, + "column": 3, + "event": "note", + "message": "Loop condition is false. Execution continues on line 245", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 968, + "column": 17, + "event": "note", + "message": "Returning from 'virtual_node_lookup'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 969, + "column": 7, + "event": "note", + "message": "Assuming 'source_node' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 969, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 978, + "column": 7, + "event": "note", + "message": "Assuming 'dest_node' is equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 978, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 1005, + "column": 12, + "event": "note", + "message": "Assuming 'dest_dir' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 1005, + "column": 8, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 1016, + "column": 7, + "event": "note", + "message": "'source_dir' is not equal to 'dest_dir'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 1016, + "column": 3, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendburn.c", + "line": 1018, + "column": 45, + "event": "note", + "message": "Access to field 'children' results in a dereference of a null pointer (loaded from variable 'source_dir')", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1016| if (source_dir != dest_dir)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1017| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1018|-> source_dir->children = g_list_remove (source_dir->children, source_node);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1019| dest_dir->children = g_list_append (dest_dir->children, source_node);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1020| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "do_mount", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 286, + "column": 3, + "event": "path", + "message": "Condition \"cdda_backend->gudev_client == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 302, + "column": 3, + "event": "path", + "message": "Condition \"host == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 315, + "column": 3, + "event": "path", + "message": "Condition \"gudev_device != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 315, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"gudev_device\" to null implies that \"gudev_device\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 317, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"gudev_device\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 315| if (gudev_device != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 316| cdda_backend->size = g_udev_device_get_sysfs_attr_as_uint64 (gudev_device, \"size\") * 512;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 317|-> g_object_unref (gudev_device);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 318| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 319| cdda_backend->drive = cdio_cddap_identify (cdda_backend->device_path, 0, NULL);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "get_track_num_from_name", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 436, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_path_get_basename\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 436, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"basename\" = storage returned from \"g_path_get_basename(filename)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 437, + "column": 3, + "event": "noescape", + "message": "Resource \"basename\" is not freed or pointed-to in \"sscanf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 437, + "column": 3, + "event": "path", + "message": "Condition \"sscanf(basename, \"Track %d.wav\", &n) == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 444, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"basename\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 442| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 443| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 444|-> return -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 445| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 446| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "create_header", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 506, + "column": 3, + "event": "assignment", + "message": "Assigning: \"artist\" = \"NULL\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 514, + "column": 7, + "event": "null", + "message": "At condition \"artist != NULL\", the value of \"artist\" must be \"NULL\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 514, + "column": 3, + "event": "dead_error_condition", + "message": "The condition \"artist != NULL\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 515, + "column": 5, + "event": "dead_error_line", + "message": "Execution cannot reach this statement: \"artist_len = 2UL * ((strlen...\".", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 515, + "column": 5, + "event": "effectively_constant", + "message": "Local variable \"artist\" is assigned only once, to a constant value, making it effectively constant throughout its scope. If this is not the intent, examine the logic to see if there is a missing assignment that would make \"artist\" not remain constant.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 513| /* ensure even length and include room for the chunk */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 514| if (artist != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 515|-> artist_len = 2 * ((strlen (artist) + 2) / 2) + 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 516| if (title != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 517| title_len = 2 * ((strlen (title) + 2) / 2) + 8;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "create_header", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 507, + "column": 3, + "event": "assignment", + "message": "Assigning: \"title\" = \"NULL\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 516, + "column": 7, + "event": "null", + "message": "At condition \"title != NULL\", the value of \"title\" must be \"NULL\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 516, + "column": 3, + "event": "dead_error_condition", + "message": "The condition \"title != NULL\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 517, + "column": 5, + "event": "dead_error_line", + "message": "Execution cannot reach this statement: \"title_len = 2UL * ((strlen(...\".", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 517, + "column": 5, + "event": "effectively_constant", + "message": "Local variable \"title\" is assigned only once, to a constant value, making it effectively constant throughout its scope. If this is not the intent, examine the logic to see if there is a missing assignment that would make \"title\" not remain constant.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 515| artist_len = 2 * ((strlen (artist) + 2) / 2) + 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 516| if (title != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 517|-> title_len = 2 * ((strlen (title) + 2) / 2) + 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 518| software_len = 2 * ((strlen (software) + 2) / 2) + 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 519| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 170, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 560, + "column": 7, + "event": "note[cpp/ImproperNullTermination]", + "message": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 558| var = artist_len - 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 559| memcpy (ptr + 4, &var, 4);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 560|-> strncpy (ptr + 8, artist, artist_len); ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 561| ptr += artist_len;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 562| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 170, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 569, + "column": 7, + "event": "note[cpp/ImproperNullTermination]", + "message": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 567| var = title_len - 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 568| memcpy (ptr + 4, &var, 4);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 569|-> strncpy (ptr + 8, title, title_len); ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 570| ptr += title_len;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 571| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 170, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 577, + "column": 3, + "event": "note[cpp/ImproperNullTermination]", + "message": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 575| var = software_len - 8;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 576| memcpy (ptr + 4, &var, 4);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 577|-> strncpy (ptr + 8, software, software_len); ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 578| ptr += software_len;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 579| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 581, + "column": 35, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'ptr' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 581, + "column": 35, + "event": "note", + "message": "Value stored to 'ptr' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 579| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 580| memcpy (ptr, \"data\", 4); ptr += 4;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 581|-> memcpy (ptr, &content_size, 4); ptr += 4;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 582| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 583| g_free (artist);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 672, + "column": 7, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'skip_bytes' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 672, + "column": 7, + "event": "note", + "message": "Value stored to 'skip_bytes' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 670| if (read_handle->cursor >= read_handle->size)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 671| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 672|-> skip_bytes = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 673| bytes_read = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 674| readbuf = NULL;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 738, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'cursor_in_stream' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcdda.c", + "line": 738, + "column": 3, + "event": "note", + "message": "Value stored to 'cursor_in_stream' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 736| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 737| read_handle->cursor += bytes_to_copy;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 738|-> cursor_in_stream = read_handle->cursor - read_handle->header_size;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 739| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 740| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "recompute_files", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 22, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 343, + "column": 2, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 348, + "column": 7, + "event": "path", + "message": "Condition \"volumes != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 350, + "column": 11, + "event": "path", + "message": "Condition \"ll != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 360, + "column": 13, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 350, + "column": 11, + "event": "path", + "message": "Condition \"ll != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 362, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 377, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 343, + "column": 2, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 382, + "column": 2, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 386, + "column": 7, + "event": "path", + "message": "Condition \"drive == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 395, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 400, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 382, + "column": 2, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 405, + "column": 2, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 409, + "column": 7, + "event": "path", + "message": "Condition \"volume == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 409, + "column": 7, + "event": "path", + "message": "Condition \"!g_mount_is_shadowed(mount)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 418, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 423, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 405, + "column": 2, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 409, + "column": 7, + "event": "path", + "message": "Condition \"volume == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 409, + "column": 7, + "event": "var_compare_op", + "message": "Comparing \"volume\" to null implies that \"volume\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 409, + "column": 7, + "event": "path", + "message": "Condition \"!g_mount_is_shadowed(mount)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 420, + "column": 9, + "event": "var_deref_model", + "message": "Passing null pointer \"volume\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 418| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 419| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 420|-> g_object_unref (volume);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 421| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 422| g_object_unref (mount);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "try_mount_mountable", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 12, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 955, + "column": 3, + "event": "path", + "message": "Condition \"file == &root\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 959, + "column": 8, + "event": "path", + "message": "Condition \"file != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 961, + "column": 7, + "event": "path", + "message": "Condition \"file->volume\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 974, + "column": 12, + "event": "path", + "message": "Condition \"file->drive\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 976, + "column": 11, + "event": "path", + "message": "Condition \"!g_drive_has_media(file->drive)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 978, + "column": 15, + "event": "path", + "message": "Condition \"!g_drive_can_poll_for_media(file->drive)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 984, + "column": 26, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_slice_alloc\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 984, + "column": 26, + "event": "var_assign", + "message": "Assigning: \"__p\" = storage returned from \"g_slice_alloc(__s)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 984, + "column": 26, + "event": "noescape", + "message": "Resource \"__p\" is not freed or pointed-to in \"memset\". [Note: The source code implementation of the function has been overridden by a builtin model.]", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 984, + "column": 26, + "event": "leaked_storage", + "message": "Variable \"__p\" going out of scope leaks the storage it points to.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 984, + "column": 19, + "event": "var_assign", + "message": "Assigning: \"data\" = \"({...; __p;})\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 988, + "column": 19, + "event": "path", + "message": "Condition \"!g_drive_is_media_check_automatic(file->drive)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c", + "line": 995, + "column": 17, + "event": "leaked_storage", + "message": "Variable \"data\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 993| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 994| report_no_media_error (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 995|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 996| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 997| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "ms_response_to_file_info", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 47, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1089, + "column": 3, + "event": "path", + "message": "Condition \"basename\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1100, + "column": 3, + "event": "path", + "message": "Condition \"xml_node_iter_next(&iter)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1104, + "column": 7, + "event": "path", + "message": "Condition \"status >= 200\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1104, + "column": 7, + "event": "path", + "message": "Condition \"status < 300\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1107, + "column": 7, + "event": "path", + "message": "Condition \"node\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"!node_is_element(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"node_is_empty(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1114, + "column": 11, + "event": "path", + "message": "Condition \"node_has_name(node, \"resourcetype\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1117, + "column": 13, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1173, + "column": 9, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1107, + "column": 7, + "event": "path", + "message": "Condition \"node\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"!node_is_element(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"node_is_empty(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1114, + "column": 11, + "event": "path", + "message": "Condition \"node_has_name(node, \"resourcetype\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1117, + "column": 13, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1173, + "column": 9, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1107, + "column": 7, + "event": "path", + "message": "Condition \"node\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"!node_is_element(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"node_is_empty(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1114, + "column": 11, + "event": "path", + "message": "Condition \"node_has_name(node, \"resourcetype\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1118, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"displayname\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1118, + "column": 16, + "event": "path", + "message": "Condition \"text\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1122, + "column": 13, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1173, + "column": 9, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1107, + "column": 7, + "event": "path", + "message": "Condition \"node\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"!node_is_element(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"node_is_empty(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1114, + "column": 11, + "event": "path", + "message": "Condition \"node_has_name(node, \"resourcetype\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1118, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"displayname\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1123, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"getetag\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1128, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"creationdate\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1140, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"getcontenttype\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1144, + "column": 15, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_inline\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1144, + "column": 15, + "event": "var_assign", + "message": "Assigning: \"mime_type\" = storage returned from \"g_strdup_inline(text)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1147, + "column": 15, + "event": "noescape", + "message": "Resource \"mime_type\" is not freed or pointed-to in \"strchr\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1148, + "column": 15, + "event": "path", + "message": "Condition \"ptr\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1154, + "column": 13, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1173, + "column": 9, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1107, + "column": 7, + "event": "path", + "message": "Condition \"node\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"!node_is_element(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1109, + "column": 11, + "event": "path", + "message": "Condition \"node_is_empty(node)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1114, + "column": 11, + "event": "path", + "message": "Condition \"node_has_name(node, \"resourcetype\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1118, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"displayname\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1118, + "column": 16, + "event": "path", + "message": "Condition \"text\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1123, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"getetag\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1128, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"creationdate\")\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1140, + "column": 16, + "event": "path", + "message": "Condition \"node_has_name(node, \"getcontenttype\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 1144, + "column": 15, + "event": "overwrite_var", + "message": "Overwriting \"mime_type\" in \"mime_type = g_strdup_inline(text)\" leaks the storage that \"mime_type\" points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1142| char *ptr;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1143| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1144|-> mime_type = g_strdup (text);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1145| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1146| /* Ignore parameters of the content type */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "push_finished", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 3934, + "column": 3, + "event": "path", + "message": "Condition \"g_vfs_job_is_finished(handle->job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 3936, + "column": 8, + "event": "path", + "message": "Condition \"soup_message_get_status(msg) >= 200\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 3936, + "column": 8, + "event": "path", + "message": "Condition \"soup_message_get_status(msg) < 300\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 3940, + "column": 7, + "event": "path", + "message": "Condition \"handle->op_job->remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddav.c", + "line": 3941, + "column": 9, + "event": "check_return", + "message": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3939| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3940| if (handle->op_job->remove_source)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3941|-> g_unlink (handle->op_job->local_path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3942| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3943| g_vfs_job_succeeded (handle->job);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘get_icon_for_type’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 221, + "column": 11, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL ‘type’ where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 261, + "column": 1, + "event": "note", + "message": "(1) entry to ‘link_file_new’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 37, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/giochannel.h", + "line": 36, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 56, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 27, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(2) inlined call to ‘g_strdup_inline’ from ‘link_file_new’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 277, + "column": 16, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(3) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘get_icon_for_type’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 278, + "column": 14, + "event": "note", + "message": "(4) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 280, + "column": 16, + "event": "note", + "message": "(5) calling ‘get_icon_for_type’ from ‘link_file_new’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 214, + "column": 1, + "event": "note", + "message": "(6) entry to ‘get_icon_for_type’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 219, + "column": 17, + "event": "note", + "message": "(7) following ‘true’ branch (when ‘i != 7’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 221, + "column": 40, + "event": "note", + "message": "(8) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 221, + "column": 11, + "event": "note", + "message": "(9) argument 1 (‘type’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 26, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/string.h", + "line": 156, + "column": 12, + "event": "note", + "message": "argument 1 of ‘strcmp’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 219| for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 220| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 221|-> if (strcmp (type, dns_sd_types[i].type) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 222| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 223| const char *icon_name;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘try_query_info.part.0’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 515, + "column": 13, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 496, + "column": 1, + "event": "note", + "message": "(1) entry to ‘try_query_info.part.0’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(2) inlined call to ‘g_strdup_inline’ from ‘try_query_info.part.0’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 514, + "column": 11, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(3) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘try_query_info.part.0’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 515, + "column": 13, + "event": "note", + "message": "(4) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c", + "line": 515, + "column": 13, + "event": "note", + "message": "(5) argument 1 (‘’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "note", + "message": "argument 1 of ‘__builtin_strlen’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 513| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 514| s = g_strdup (job->uri);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 515|-> if (s[strlen(s) - 1] == '/') /* job->uri is guranteed to be longer than 1 byte */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 516| s[strlen(s) - 1] = '\\0';", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 517| display_name = g_path_get_basename (s);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_make_directory", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendftp.c", + "line": 1420, + "column": 3, + "event": "check_return", + "message": "Calling \"g_vfs_ftp_task_send_and_check\" without checking return value (as is done elsewhere 6 out of 7 times).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendftp.c", + "line": 325, + "column": 3, + "event": "example_checked", + "message": "Example 1: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"PWD\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"PWD\")\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendftp.c", + "line": 114, + "column": 3, + "event": "example_checked", + "message": "Example 2: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"FEAT\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"FEAT\")\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendftp.c", + "line": 163, + "column": 3, + "event": "example_checked", + "message": "Example 3: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SITE HELP\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SITE HELP\")\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendftp.c", + "line": 221, + "column": 3, + "event": "example_checked", + "message": "Example 4: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SYST\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SYST\")\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 483, + "column": 3, + "event": "example_checked", + "message": "Example 5: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SIZE %s\", g_vfs_ftp_file_get_ftp_path(file))\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SIZE %s\", g_vfs_ftp_file_get_ftp_path(file))\".", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1418| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1419| file = g_vfs_ftp_file_new_from_gvfs (ftp, filename);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1420|-> g_vfs_ftp_task_send_and_check (&task,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1421| 0,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1422| make_directory_handlers,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘dup_for_gphoto2’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 325, + "column": 3, + "event": "warning[-Wanalyzer-possible-null-argument]", + "message": "use of possibly-NULL ‘mem’ where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2961, + "column": 1, + "event": "note", + "message": "(1) entry to ‘commit_write_handle’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2969, + "column": 6, + "event": "note", + "message": "(2) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2975, + "column": 19, + "event": "note", + "message": "(3) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2997, + "column": 6, + "event": "note", + "message": "(4) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3000, + "column": 39, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3002, + "column": 3, + "event": "note", + "message": "(6) calling ‘dup_for_gphoto2’ from ‘commit_write_handle’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 321, + "column": 1, + "event": "note", + "message": "(7) entry to ‘dup_for_gphoto2’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 324, + "column": 9, + "event": "note", + "message": "(8) this call could return NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 325, + "column": 3, + "event": "note", + "message": "(9) argument 1 (‘mem’) from (8) could be NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "note", + "message": "argument 1 of ‘__builtin_memcpy’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 323| char *mem;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 324| mem = malloc (size);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 325|-> memcpy (mem, gmem, size);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 326| return mem;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 327| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "release_device", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 13, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 519, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->context != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 525, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->camera != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 531, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->gudev_client != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 533, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->udev_device != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 544, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->info_cache != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 549, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->dir_name_cache != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 554, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->file_name_cache != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 560, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 564, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 560, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 568, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 572, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 568, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 576, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"gphoto2_backend->capacity\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.capacity\" is written to with \"_GVfsBackendGphoto2.lock\" held 2 out of 3 times (1 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 409, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 416, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2147, + "column": 15, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2148, + "column": 15, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 574| gphoto2_backend->file_monitor_proxies = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 575| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 576|-> gphoto2_backend->capacity = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 577| gphoto2_backend->free_space = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 578| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "release_device", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 13, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 519, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->context != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 525, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->camera != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 531, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->gudev_client != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 533, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->udev_device != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 544, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->info_cache != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 549, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->dir_name_cache != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 554, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->file_name_cache != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 560, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 564, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 560, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 568, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 572, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 568, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 577, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 409, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 417, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 426, + "column": 3, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 427, + "column": 3, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2157, + "column": 15, + "event": "lock_acquire", + "message": "Example 3: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2158, + "column": 15, + "event": "example_access", + "message": "Example 3 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 575| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 576| gphoto2_backend->capacity = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 577|-> gphoto2_backend->free_space = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 578| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 579| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "setup_for_device", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 11, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 702, + "column": 3, + "event": "path", + "message": "Condition \"1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 702, + "column": 8, + "event": "path", + "message": "Condition \"__str == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 702, + "column": 8, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 702, + "column": 8, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_12;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 702, + "column": 8, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 702, + "column": 3, + "event": "path", + "message": "Condition \"!(1 ? ({...; __result;}) : g_str_has_prefix(gphoto2_backend->gphoto2_port, \"usb:\"))\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 705, + "column": 3, + "event": "path", + "message": "Condition \"(comma = strchr(devname, 44)) == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 716, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->udev_device\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 722, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 726, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_vfs_get_x_content_types\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 726, + "column": 3, + "event": "noescape", + "message": "Resource \"g_vfs_get_x_content_types(gphoto2_backend->udev_device)\" is not freed or pointed-to in \"g_vfs_backend_set_x_content_types\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 726, + "column": 3, + "event": "leaked_storage", + "message": "Failing to save or free storage allocated by \"g_vfs_get_x_content_types(gphoto2_backend->udev_device)\" leaks it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 724| g_debug (\"-> did not find matching udev device\\n\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 725| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 726|-> g_vfs_backend_set_x_content_types (G_VFS_BACKEND (gphoto2_backend),", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 727| g_vfs_get_x_content_types (gphoto2_backend->udev_device));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 728| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "do_mount", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 17, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1287, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->gudev_client == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1305, + "column": 3, + "event": "path", + "message": "Condition \"port == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1317, + "column": 3, + "event": "path", + "message": "Condition \"gphoto2_backend->context == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1326, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1338, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1347, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1358, + "column": 3, + "event": "path", + "message": "Condition \"n == -5\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1367, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1381, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1391, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1399, + "column": 3, + "event": "path", + "message": "Condition \"!ensure_ignore_prefix(gphoto2_backend, (GVfsJob *)(void *)job)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1423, + "column": 3, + "event": "path", + "message": "Condition \"rc == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1425, + "column": 7, + "event": "path", + "message": "Condition \"num_storage_info >= 1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1427, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].fields & GP_STORAGEINFO_ACCESS\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1427, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].access == GP_STORAGEINFO_AC_READWRITE\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1432, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].fields & GP_STORAGEINFO_ACCESS\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1432, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].access == GP_STORAGEINFO_AC_READONLY_WITH_DELETE\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1443, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 409, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 417, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 426, + "column": 3, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 427, + "column": 3, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2157, + "column": 15, + "event": "lock_acquire", + "message": "Example 3: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2158, + "column": 15, + "event": "example_access", + "message": "Example 3 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1441| g_vfs_job_succeeded (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1442| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1443|-> gphoto2_backend->free_space = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1444| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1445| gphoto2_mount_spec = g_mount_spec_new (\"gphoto2\");", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "do_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1853, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"add_ignore_prefix\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1853, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"filename\" = storage returned from \"add_ignore_prefix(gphoto2_backend, given_filename)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1854, + "column": 3, + "event": "noescape", + "message": "Assuming resource \"filename\" is not freed or pointed-to as ellipsis argument to \"g_debug\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1857, + "column": 3, + "event": "path", + "message": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1859, + "column": 7, + "event": "path", + "message": "Condition \"is_regular(gphoto2_backend, as_dir, as_name)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1873, + "column": 7, + "event": "leaked_storage", + "message": "Variable \"filename\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1871| g_free (as_dir);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1872| g_free (as_name);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1873|-> return;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1874| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1875| g_free (as_dir);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "do_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 10, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1857, + "column": 3, + "event": "path", + "message": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1879, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1880, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1881, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1883, + "column": 7, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1894, + "column": 7, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1902, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1928, + "column": 3, + "event": "path", + "message": "Condition \"!using_cached_dir_list\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1931, + "column": 7, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1932, + "column": 7, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1930| #ifndef DEBUG_NO_CACHING", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1931| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1932|-> g_hash_table_insert (gphoto2_backend->dir_name_cache, g_strdup (filename), list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1933| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1934| #endif", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "do_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 12, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1857, + "column": 3, + "event": "path", + "message": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1879, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1880, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1881, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1908, + "column": 7, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1918, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1918, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1927, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1928, + "column": 3, + "event": "path", + "message": "Condition \"!using_cached_dir_list\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1938, + "column": 7, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1939, + "column": 7, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1937| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1938| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1939|-> gp_list_unref (list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1940| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1941| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "do_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 16, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1857, + "column": 3, + "event": "path", + "message": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1881, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1894, + "column": 7, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1902, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1928, + "column": 3, + "event": "path", + "message": "Condition \"!using_cached_dir_list\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1935, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1945, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1946, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1947, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1949, + "column": 7, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1959, + "column": 7, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1967, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1975, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1994, + "column": 3, + "event": "path", + "message": "Condition \"!using_cached_file_list\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1997, + "column": 7, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1998, + "column": 7, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1996| #ifndef DEBUG_NO_CACHING", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1997| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1998|-> g_hash_table_insert (gphoto2_backend->file_name_cache, g_strdup (filename), list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1999| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2000| #endif", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "do_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 24, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1857, + "column": 3, + "event": "path", + "message": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1881, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1894, + "column": 7, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1902, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1918, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1927, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1918, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1927, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1910, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1928, + "column": 3, + "event": "path", + "message": "Condition \"!using_cached_dir_list\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1935, + "column": 5, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1945, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1946, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1947, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1973, + "column": 7, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1975, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1984, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1984, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1993, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1975, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 1994, + "column": 3, + "event": "path", + "message": "Condition \"!using_cached_file_list\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2004, + "column": 7, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2005, + "column": 7, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2003| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2004| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2005|-> gp_list_unref (list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2006| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2007| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "try_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 16, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2043, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2044, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2045, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2051, + "column": 3, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2065, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2065, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2059, + "column": 11, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2060, + "column": 11, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2058| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2059| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2060|-> gp_list_unref (list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2061| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2062| goto error_not_cached;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "try_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2043, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2044, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2045, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2051, + "column": 3, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2066, + "column": 3, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2067, + "column": 3, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2065| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2066| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2067|-> gp_list_unref (list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2068| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2069| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "try_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 24, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2045, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2065, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2057, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2065, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2071, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2072, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2073, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2079, + "column": 3, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2080, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2086, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2086, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2094, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2080, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2086, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2086, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2094, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2080, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2086, + "column": 7, + "event": "unlock", + "message": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2086, + "column": 7, + "event": "path", + "message": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2088, + "column": 11, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2089, + "column": 11, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2087| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2088| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2089|-> gp_list_unref (list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2090| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2091| goto error_not_cached;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "try_enumerate", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2045, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2052, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2071, + "column": 3, + "event": "lock", + "message": "Locking \"&gphoto2_backend->lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2072, + "column": 3, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"list\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2073, + "column": 3, + "event": "path", + "message": "Condition \"list == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2079, + "column": 3, + "event": "unlock", + "message": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2080, + "column": 3, + "event": "path", + "message": "Condition \"n < gp_list_count(list)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2095, + "column": 3, + "event": "lockagain", + "message": "Locking \"&gphoto2_backend->lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2096, + "column": 3, + "event": "use", + "message": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2094| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2095| g_mutex_lock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2096|-> gp_list_unref (list);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2097| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2098| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "do_query_fs_info", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2137, + "column": 3, + "event": "path", + "message": "Condition \"!gphoto2_backend->can_write\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2140, + "column": 3, + "event": "path", + "message": "Condition \"rc == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2142, + "column": 7, + "event": "path", + "message": "Condition \"num_storage_info >= 1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2145, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].fields & GP_STORAGEINFO_MAXCAPACITY\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2150, + "column": 15, + "event": "missing_lock", + "message": "Accessing \"gphoto2_backend->capacity\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.capacity\" is written to with \"_GVfsBackendGphoto2.lock\" held 2 out of 3 times (1 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 409, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 416, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2147, + "column": 15, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2148, + "column": 15, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2148| gphoto2_backend->capacity = storage_info[0].capacitykbytes * 1024;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2149| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2150|-> g_file_info_set_attribute_uint64 (info, ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2151| G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2152| (guint64) gphoto2_backend->capacity);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "do_query_fs_info", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2137, + "column": 3, + "event": "path", + "message": "Condition \"!gphoto2_backend->can_write\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2140, + "column": 3, + "event": "path", + "message": "Condition \"rc == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2142, + "column": 7, + "event": "path", + "message": "Condition \"num_storage_info >= 1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2145, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].fields & GP_STORAGEINFO_MAXCAPACITY\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2155, + "column": 11, + "event": "path", + "message": "Condition \"storage_info[0].fields & GP_STORAGEINFO_FREESPACEKBYTES\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2160, + "column": 15, + "event": "missing_lock", + "message": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 409, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 417, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 426, + "column": 3, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 427, + "column": 3, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2157, + "column": 15, + "event": "lock_acquire", + "message": "Example 3: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2158, + "column": 15, + "event": "example_access", + "message": "Example 3 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2158| gphoto2_backend->free_space = storage_info[0].freekbytes * 1024;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2159| g_mutex_unlock (&gphoto2_backend->lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2160|-> g_file_info_set_attribute_uint64 (info, ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2161| G_FILE_ATTRIBUTE_FILESYSTEM_FREE, ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2162| (guint64) gphoto2_backend->free_space);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "do_slow_file_rename_in_same_dir", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2313, + "column": 3, + "event": "cond_const", + "message": "Condition \"rc != 0\", taking false branch. Now the value of \"rc\" is equal to 0.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2322, + "column": 11, + "event": "const", + "message": "At condition \"rc != 0\", the value of \"rc\" must be equal to 0.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2322, + "column": 7, + "event": "dead_error_condition", + "message": "The condition \"rc != 0\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2324, + "column": 11, + "event": "dead_error_begin", + "message": "Execution cannot reach this statement: \"g_debug(\" file delete fail...\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2322| if (rc != 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2323| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2324|-> g_debug (\" file delete failed as part of slow rename rc=%d\\n\", rc);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2325| goto out;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2326| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3007, + "column": 8, + "event": "warning[unix.Malloc]", + "message": "Potential memory leak", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3242, + "column": 3, + "event": "note", + "message": "Calling 'ensure_not_dirty'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 306, + "column": 49, + "event": "note", + "message": "Assuming 'l' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 306, + "column": 3, + "event": "note", + "message": "Loop condition is true. Entering loop body", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 312, + "column": 11, + "event": "note", + "message": "Assuming field 'is_dirty' is not equal to 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 312, + "column": 7, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 313, + "column": 9, + "event": "note", + "message": "Calling 'commit_write_handle'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2969, + "column": 22, + "event": "note", + "message": "Field 'is_dirty' is not equal to 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2969, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2975, + "column": 7, + "event": "note", + "message": "Assuming field 'delete_before' is 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2975, + "column": 7, + "event": "note", + "message": "Left side of '||' is false", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2976, + "column": 8, + "event": "note", + "message": "Assuming field 'job_is_replace' is 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2976, + "column": 8, + "event": "note", + "message": "Left side of '||' is false", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2976, + "column": 40, + "event": "note", + "message": "Assuming field 'job_is_append_to' is 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2975, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2997, + "column": 7, + "event": "note", + "message": "Assuming 'rc' is equal to 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 2997, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3003, + "column": 30, + "event": "note", + "message": "Calling 'dup_for_gphoto2'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 324, + "column": 9, + "event": "note", + "message": "Memory is allocated", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3003, + "column": 30, + "event": "note", + "message": "Returned allocated memory", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3007, + "column": 8, + "event": "note", + "message": "Potential memory leak", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3005| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3006| #ifdef HAVE_GPHOTO25", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3007|-> rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, write_handle->name, GP_FILE_TYPE_NORMAL, file, gphoto2_backend->context);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3008| #else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3009| gp_file_set_type (file, GP_FILE_TYPE_NORMAL);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "do_close_write", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3041, + "column": 3, + "event": "assign", + "message": "Assigning: \"write_handle\" = \"handle\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3048, + "column": 3, + "event": "path", + "message": "Condition \"rc != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3061, + "column": 3, + "event": "freed_arg", + "message": "\"write_handle_free\" frees \"write_handle\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3062, + "column": 3, + "event": "pass_freed_arg", + "message": "Passing freed pointer \"write_handle\" as an argument to \"g_list_remove\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3060| out:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3061| write_handle_free (write_handle);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3062|-> gphoto2_backend->open_write_handles = g_list_remove (gphoto2_backend->open_write_handles, write_handle);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3063| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3064| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3062, + "column": 41, + "event": "warning[unix.Malloc]", + "message": "Use of memory after it is freed", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3048, + "column": 7, + "event": "note", + "message": "Assuming 'rc' is equal to 0", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3048, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3061, + "column": 3, + "event": "note", + "message": "Calling 'write_handle_free'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 293, + "column": 3, + "event": "note", + "message": "Memory is released", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3061, + "column": 3, + "event": "note", + "message": "Returning; memory was released via 1st parameter", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3062, + "column": 41, + "event": "note", + "message": "Use of memory after it is freed", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3060| out:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3061| write_handle_free (write_handle);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3062|-> gphoto2_backend->open_write_handles = g_list_remove (gphoto2_backend->open_write_handles, write_handle);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3063| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3064| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "do_create_dir_monitor", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3407, + "column": 3, + "event": "alloc_arg", + "message": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"dir\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3409, + "column": 11, + "event": "path", + "message": "Condition \"__s == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3409, + "column": 11, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3419, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"dir\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3417| g_object_unref (proxy->vfs_monitor);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3418| g_vfs_job_succeeded (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3419|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3420| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3421| /* ------------------------------------------------------------------------------------------------- */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "do_create_dir_monitor", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3407, + "column": 3, + "event": "alloc_arg", + "message": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"name\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3409, + "column": 11, + "event": "path", + "message": "Condition \"__s == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3409, + "column": 11, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3419, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"name\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3417| g_object_unref (proxy->vfs_monitor);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3418| g_vfs_job_succeeded (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3419|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3420| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3421| /* ------------------------------------------------------------------------------------------------- */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "do_create_file_monitor", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3457, + "column": 3, + "event": "alloc_arg", + "message": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"dir\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3459, + "column": 11, + "event": "path", + "message": "Condition \"__s == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3459, + "column": 11, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3469, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"dir\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3467| g_object_unref (proxy->vfs_monitor);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3468| g_vfs_job_succeeded (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3469|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3470| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3471| /* ------------------------------------------------------------------------------------------------- */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "do_create_file_monitor", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3457, + "column": 3, + "event": "alloc_arg", + "message": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"name\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3459, + "column": 11, + "event": "path", + "message": "Condition \"__s == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3459, + "column": 11, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c", + "line": 3469, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"name\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3467| g_object_unref (proxy->vfs_monitor);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3468| g_vfs_job_succeeded (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3469|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3470| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3471| /* ------------------------------------------------------------------------------------------------- */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "try_mount", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 294, + "column": 3, + "event": "path", + "message": "Condition \"uri_str\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 297, + "column": 3, + "event": "path", + "message": "Condition \"uri_str\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 299, + "column": 3, + "event": "path", + "message": "Condition \"uri == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 310, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_uri_unescape_string\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 310, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"path\" = storage returned from \"g_uri_unescape_string(g_uri_get_path(uri), \"/\")\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 311, + "column": 3, + "event": "path", + "message": "Condition \"path[0]\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 322, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"path\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 320| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 321| g_vfs_job_succeeded (G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 322|-> return TRUE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 323| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 324| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "TAINTED_STRING", + "cwe": 20, + "function": "file_info_from_message", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 12, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 556, + "column": 3, + "event": "path", + "message": "Condition \"soup_message_headers_get_content_disposition(soup_message_get_response_headers(msg), NULL, ¶ms)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 561, + "column": 7, + "event": "path", + "message": "Condition \"name\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 567, + "column": 3, + "event": "path", + "message": "Condition \"basename == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 579, + "column": 3, + "event": "path", + "message": "Condition \"basename != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 579, + "column": 3, + "event": "path", + "message": "Condition \"g_file_attribute_matcher_matches(matcher, \"standard::display-name\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 589, + "column": 3, + "event": "path", + "message": "Condition \"soup_message_headers_get_encoding(soup_message_get_response_headers(msg)) == SOUP_ENCODING_CONTENT_LENGTH\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 596, + "column": 7, + "event": "path", + "message": "Condition \"ret\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 596, + "column": 7, + "event": "path", + "message": "Condition \"length != -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 599, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 609, + "column": 3, + "event": "tainted_return_value", + "message": "Function \"soup_message_headers_get_content_type\" returns tainted data.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 609, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"text\" = \"soup_message_headers_get_content_type(soup_message_get_response_headers(msg), NULL)\", which taints \"text\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"text\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 615, + "column": 7, + "event": "tainted_string", + "message": "Passing tainted string \"*text\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 615, + "column": 7, + "event": "remediation", + "message": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 613| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 614| g_file_info_set_content_type (info, text);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 615|-> g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, text);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 616| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 617| icon = g_content_type_get_icon (text);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "TAINTED_STRING", + "cwe": 20, + "function": "file_info_from_message", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 15, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 556, + "column": 3, + "event": "path", + "message": "Condition \"soup_message_headers_get_content_disposition(soup_message_get_response_headers(msg), NULL, ¶ms)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 561, + "column": 7, + "event": "path", + "message": "Condition \"name\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 567, + "column": 3, + "event": "path", + "message": "Condition \"basename == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 579, + "column": 3, + "event": "path", + "message": "Condition \"basename != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 579, + "column": 3, + "event": "path", + "message": "Condition \"g_file_attribute_matcher_matches(matcher, \"standard::display-name\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 589, + "column": 3, + "event": "path", + "message": "Condition \"soup_message_headers_get_encoding(soup_message_get_response_headers(msg)) == SOUP_ENCODING_CONTENT_LENGTH\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 596, + "column": 7, + "event": "path", + "message": "Condition \"ret\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 596, + "column": 7, + "event": "path", + "message": "Condition \"length != -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 599, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"text\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 629, + "column": 3, + "event": "path", + "message": "Condition \"text\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 634, + "column": 7, + "event": "path", + "message": "Condition \"gd\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 645, + "column": 3, + "event": "tainted_return_value", + "message": "Function \"soup_message_headers_get_one\" returns tainted data.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 645, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"text\" = \"soup_message_headers_get_one(soup_message_get_response_headers(msg), \"ETag\")\", which taints \"text\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 647, + "column": 3, + "event": "path", + "message": "Condition \"text\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 649, + "column": 7, + "event": "tainted_string", + "message": "Passing tainted string \"*text\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendhttp.c", + "line": 649, + "column": 7, + "event": "remediation", + "message": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 647| if (text)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 648| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 649|-> g_file_info_set_attribute_string (info,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 650| G_FILE_ATTRIBUTE_ETAG_VALUE,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 651| text);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DC.WEAK_CRYPTO", + "cwe": 327, + "function": "inject_error", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c", + "line": 98, + "column": 41, + "event": "dont_call", + "message": "\"random\" should not be used for security-related applications, because linear congruential algorithms are too easy to break.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c", + "line": 98, + "column": 41, + "event": "remediation", + "message": "Use a compliant random number generator, such as \"/dev/random\" or \"/dev/urandom\" on Unix-like systems, and CNG (Cryptography API: Next Generation) on Windows.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 96| GVfsBackendLocalTest *op_backend = G_VFS_BACKEND_LOCALTEST (backend);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 97| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 98|-> if ((op_backend->errorneous > 0) && ((random() % op_backend->errorneous) == 0) && ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 99| \t ((op_backend->inject_op_types < 1) || ((op_backend->inject_op_types & job_type) == job_type)))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 100| {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c", + "line": 299, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'res' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c", + "line": 299, + "column": 3, + "event": "note", + "message": "Value stored to 'res' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 297| file = get_g_file_from_local (filename, G_VFS_JOB (job));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 298| g_assert (file != NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 299|-> res = TRUE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 300| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 301| error = NULL;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 0, + "event": "internal warning", + "message": "child 23304 timed out after 30s", + "verbosity_level": 0 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "do_pull", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 12, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1791, + "column": 3, + "event": "path", + "message": "Condition \"remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1791, + "column": 3, + "event": "path", + "message": "Condition \"flags & G_FILE_COPY_NO_FALLBACK_FOR_MOVE\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1799, + "column": 3, + "event": "path", + "message": "Condition \"entry == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1804, + "column": 10, + "event": "path", + "message": "Condition \"entry->id == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1815, + "column": 3, + "event": "path", + "message": "Condition \"file == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1836, + "column": 3, + "event": "path", + "message": "Condition \"!local_info\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1840, + "column": 10, + "event": "path", + "message": "Condition \"error != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1853, + "column": 3, + "event": "path", + "message": "Condition \"!valid_pull\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1855, + "column": 10, + "event": "path", + "message": "Condition \"dest_exists\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1862, + "column": 5, + "event": "path", + "message": "Condition \"!ret\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1878, + "column": 3, + "event": "path", + "message": "Condition \"ret != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1896, + "column": 3, + "event": "path", + "message": "Condition \"remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 1898, + "column": 5, + "event": "check_return", + "message": "Calling \"LIBMTP_Delete_Object\" without checking return value (as is done elsewhere 4 out of 5 times).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 3193, + "column": 5, + "event": "example_assign", + "message": "Example 1: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 3194, + "column": 5, + "event": "example_checked", + "message": "Example 1 (cont.): \"ret\" has its value checked in \"ret != 0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 2255, + "column": 3, + "event": "example_assign", + "message": "Example 2: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 2256, + "column": 3, + "event": "example_checked", + "message": "Example 2 (cont.): \"ret\" has its value checked in \"ret != 0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 3054, + "column": 5, + "event": "example_assign", + "message": "Example 3: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 3055, + "column": 5, + "event": "example_checked", + "message": "Example 3 (cont.): \"ret\" has its value checked in \"ret != 0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 2157, + "column": 5, + "event": "example_assign", + "message": "Example 4: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendmtp.c", + "line": 2158, + "column": 5, + "event": "example_checked", + "message": "Example 4 (cont.): \"ret\" has its value checked in \"ret != 0\".", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1896| if (remove_source) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1897| g_debug (\"(I) Removing source.\\n\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1898|-> LIBMTP_Delete_Object (device, entry->id);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1899| g_hash_table_foreach (G_VFS_BACKEND_MTP (backend)->monitors,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1900| emit_delete_event,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "COPY_PASTE_ERROR", + "cwe": 398, + "imp": 1, + "function": "recompute_files", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c", + "line": 521, + "column": 8, + "event": "original", + "message": "\"backend->dnssd_monitor\" looks like the original copy.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c", + "line": 599, + "column": 15, + "event": "copy_paste_error", + "message": "\"dnssd_monitor\" in \"backend->dnssd_monitor\" looks like a copy-paste error.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c", + "line": 599, + "column": 15, + "event": "remediation", + "message": "Should it say \"wsdd_monitor\" instead?", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 597| backend);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 598| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 599|-> backend->dnssd_monitor = monitor;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 600| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 601| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_BREAK", + "cwe": 484, + "function": "wsdd_monitor_changed_cb", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c", + "line": 839, + "column": 12, + "event": "unterminated_case", + "message": "The case for value \"G_FILE_MONITOR_EVENT_UNMOUNTED\" is not terminated by a \"break\" statement.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c", + "line": 842, + "column": 7, + "event": "fallthrough", + "message": "The above case falls through to this one.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 837| switch (event_type)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 838| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 839|-> case G_FILE_MONITOR_EVENT_UNMOUNTED:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 840| g_clear_object (&backend->wsdd_monitor);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 841| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ALLOC_FREE_MISMATCH", + "cwe": 762, + "function": "should_include", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 440, + "column": 3, + "event": "path", + "message": "Condition \"g_bookmark_file_get_is_private(bookmarks, uri, NULL)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 444, + "column": 3, + "event": "path", + "message": "Condition \"g_ascii_strncasecmp(uri, \"file:/\", 6) != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 448, + "column": 3, + "event": "alloc", + "message": "Allocation of memory which must be freed using \"free\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 448, + "column": 3, + "event": "assign", + "message": "Assigning: \"mimetype\" = \"g_bookmark_file_get_mime_type(bookmarks, uri, NULL)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 449, + "column": 3, + "event": "path", + "message": "Condition \"g_strcmp0(mimetype, \"inode/directory\") == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 451, + "column": 7, + "event": "free", + "message": "Calling \"g_free\" frees \"mimetype\" using \"g_free\" but it should have been freed using \"free\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 449| if (g_strcmp0 (mimetype, \"inode/directory\") == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 450| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 451|-> g_free (mimetype);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 452| return FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 453| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ALLOC_FREE_MISMATCH", + "cwe": 762, + "function": "should_include", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 440, + "column": 3, + "event": "path", + "message": "Condition \"g_bookmark_file_get_is_private(bookmarks, uri, NULL)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 444, + "column": 3, + "event": "path", + "message": "Condition \"g_ascii_strncasecmp(uri, \"file:/\", 6) != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 448, + "column": 3, + "event": "alloc", + "message": "Allocation of memory which must be freed using \"free\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 448, + "column": 3, + "event": "assign", + "message": "Assigning: \"mimetype\" = \"g_bookmark_file_get_mime_type(bookmarks, uri, NULL)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 449, + "column": 3, + "event": "path", + "message": "Condition \"g_strcmp0(mimetype, \"inode/directory\") == 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 454, + "column": 3, + "event": "free", + "message": "Calling \"g_free\" frees \"mimetype\" using \"g_free\" but it should have been freed using \"free\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 452| return FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 453| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 454|-> g_free (mimetype);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 455| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 456| /* Exists */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "reload_recent_items", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendrecent.c", + "line": 499, + "column": 3, + "event": "check_return", + "message": "Calling \"g_bookmark_file_load_from_file(backend->bookmarks, backend->filename, &error)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 497| g_debug (\"reloading recent items\\n\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 498| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 499|-> g_bookmark_file_load_from_file (backend->bookmarks, backend->filename, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 500| if (error != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 501| {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 0, + "event": "internal warning", + "message": "child 22546 timed out after 30s", + "verbosity_level": 0 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "make_fd_nonblocking", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 233, + "column": 3, + "event": "check_return", + "message": "Calling \"fcntl(fd, 4, 0x800 | fcntl(fd, 3))\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 231| make_fd_nonblocking (int fd)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 232| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 233|-> fcntl (fd, F_SETFL, O_NONBLOCK | fcntl (fd, F_GETFL));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 234| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 235| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "setup_ssh_environment", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 429, + "column": 3, + "event": "path", + "message": "Condition \"!conn\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 448, + "column": 3, + "event": "path", + "message": "Condition \"!iter\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 458, + "column": 7, + "event": "path", + "message": "Condition \"env\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 458, + "column": 7, + "event": "path", + "message": "Condition \"env[0]\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 459, + "column": 9, + "event": "check_return", + "message": "Calling \"g_setenv(\"SSH_AUTH_SOCK\", env, 1)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 457| env = read_dbus_string_dict_value (iter, \"SSH_AUTH_SOCK\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 458| if (env && env[0])", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 459|-> g_setenv (\"SSH_AUTH_SOCK\", env, TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 460| g_free (env);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 461| g_variant_unref (iter);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "put_string", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 749, + "column": 3, + "event": "check_return", + "message": "Calling \"g_data_output_stream_put_string(stream, str, NULL, NULL)\" without checking return value. It wraps a library function that may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 747| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 748| g_data_output_stream_put_uint32 (stream, strlen (str), NULL, NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 749|-> g_data_output_stream_put_string (stream, str, NULL, NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 750| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 751| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "queue_command_buffer", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1668, + "column": 3, + "event": "path", + "message": "Condition \"conn->command_queue == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1668, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"conn->command_queue\" to null implies that \"conn->command_queue\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1670, + "column": 3, + "event": "identity_transfer", + "message": "Passing \"conn->command_queue\" as argument 1 to function \"g_list_append\", which returns that argument.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1670, + "column": 3, + "event": "alias_transfer", + "message": "Assigning: \"conn->command_queue\" = \"g_list_append(conn->command_queue, buffer)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1672, + "column": 3, + "event": "path", + "message": "Condition \"first\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1673, + "column": 5, + "event": "var_deref_model", + "message": "Passing \"conn\" to \"send_command\", which dereferences null \"conn->command_queue\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1671| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1672| if (first)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1673|-> send_command (conn);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1674| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1675| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "queue_command_streams_and_free", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 9, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1761, + "column": 10, + "event": "path", + "message": "Condition \"__s == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1761, + "column": 10, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1761, + "column": 10, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_malloc0_n\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1761, + "column": 10, + "event": "var_assign", + "message": "Assigning: \"__p\" = storage returned from \"g_malloc0_n(__n, __s)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1761, + "column": 10, + "event": "leaked_storage", + "message": "Variable \"__p\" going out of scope leaks the storage it points to.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1761, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"data\" = \"({...; __p;})\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1766, + "column": 19, + "event": "path", + "message": "Condition \"__s == 1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1766, + "column": 19, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1769, + "column": 3, + "event": "path", + "message": "Condition \"i < n_commands\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1779, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"data\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1777| reply);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1778| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1779|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1780| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1781| static gboolean", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "setup_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1901, + "column": 3, + "event": "check_return", + "message": "Calling \"mkdir(control_path, 448U)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1899| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1900| control_path = g_build_filename (g_get_user_runtime_dir (), \"gvfsd-sftp\", NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1901|-> g_mkdir (control_path, 0700);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1902| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1903| args = setup_ssh_commandline (backend, control_path);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "setup_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 2, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1906, + "column": 3, + "event": "open_arg", + "message": "\"spawn_ssh\" opens handle stored into \"slave_fd\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1906, + "column": 3, + "event": "path", + "message": "Condition \"!spawn_ssh(backend, args, &pid, &tty_fd, &stdin_fd, &stdout_fd, &stderr_fd, &slave_fd, error)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1912, + "column": 7, + "event": "leaked_handle", + "message": "Handle variable \"slave_fd\" going out of scope leaks the handle.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1910| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1911| g_strfreev (args);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1912|-> return FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1913| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1914| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "setup_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1906, + "column": 3, + "event": "open_arg", + "message": "\"spawn_ssh\" opens handle stored into \"slave_fd\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1906, + "column": 3, + "event": "path", + "message": "Condition \"!spawn_ssh(backend, args, &pid, &tty_fd, &stdin_fd, &stdout_fd, &stderr_fd, &slave_fd, error)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1927, + "column": 3, + "event": "path", + "message": "Condition \"tty_fd == -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1928, + "column": 53, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1939, + "column": 3, + "event": "path", + "message": "Condition \"!res\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1941, + "column": 7, + "event": "path", + "message": "Condition \"error\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1941, + "column": 7, + "event": "path", + "message": "Condition \"(*error)->code == G_IO_ERROR_INVALID_ARGUMENT\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1950, + "column": 7, + "event": "leaked_handle", + "message": "Handle variable \"slave_fd\" going out of scope leaks the handle.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1948| \t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1949| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1950|-> return FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1951| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1952| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "setup_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1906, + "column": 3, + "event": "open_arg", + "message": "\"spawn_ssh\" opens handle stored into \"slave_fd\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1906, + "column": 3, + "event": "path", + "message": "Condition \"!spawn_ssh(backend, args, &pid, &tty_fd, &stdin_fd, &stdout_fd, &stderr_fd, &slave_fd, error)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1927, + "column": 3, + "event": "path", + "message": "Condition \"tty_fd == -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1928, + "column": 53, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1939, + "column": 3, + "event": "path", + "message": "Condition \"!res\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1962, + "column": 3, + "event": "path", + "message": "Condition \"reply == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 1965, + "column": 7, + "event": "leaked_handle", + "message": "Handle variable \"slave_fd\" going out of scope leaks the handle.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1963| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1964| look_for_stderr_errors (connection, error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1965|-> return FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1966| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1967| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "replace_create_temp_fsetstat_reply", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3694, + "column": 3, + "event": "path", + "message": "Condition \"reply_type == 101\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3695, + "column": 5, + "event": "check_return", + "message": "Calling \"error_from_status\" without checking return value (as is done elsewhere 7 out of 8 times).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3069, + "column": 5, + "event": "example_assign", + "message": "Example 1: Assigning: \"res\" = return value from \"error_from_status(job, reply, -1, -1, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3074, + "column": 3, + "event": "example_checked", + "message": "Example 1 (cont.): \"res\" has its value checked in \"res\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3124, + "column": 5, + "event": "example_assign", + "message": "Example 2: Assigning: \"res\" = return value from \"error_from_status(job, reply, -1, -1, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3129, + "column": 3, + "event": "example_checked", + "message": "Example 2 (cont.): \"res\" has its value checked in \"res\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 2317, + "column": 3, + "event": "example_checked", + "message": "Example 3: \"error_from_status(job, reply, failure_error, allowed_sftp_error, &error)\" has its value checked in \"error_from_status(job, reply, failure_error, allowed_sftp_error, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3203, + "column": 5, + "event": "example_assign", + "message": "Example 4: Assigning: \"res\" = return value from \"error_from_status(job, reply, -1, -1, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3208, + "column": 3, + "event": "example_checked", + "message": "Example 4 (cont.): \"res\" has its value checked in \"res\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 3823, + "column": 7, + "event": "example_checked", + "message": "Example 5: \"error_from_status(job, reply, G_IO_ERROR_EXISTS, -1, &error)\" has its value checked in \"error_from_status(job, reply, G_IO_ERROR_EXISTS, -1, &error)\".", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3693| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3694| if (reply_type == SSH_FXP_STATUS)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3695|-> error_from_status (job, reply, -1, -1, &error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3696| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3697| g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_FAILED,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "push_close_moved_file", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5652, + "column": 3, + "event": "path", + "message": "Condition \"reply_type == 101\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5655, + "column": 7, + "event": "path", + "message": "Condition \"code == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5657, + "column": 11, + "event": "path", + "message": "Condition \"handle->op_job->remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5658, + "column": 13, + "event": "check_return", + "message": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5656| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5657| if (handle->op_job->remove_source)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5658|-> g_unlink (handle->op_job->local_path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5659| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5660| g_vfs_job_succeeded (job);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "push_close_delete_or_succeed", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 2, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5719, + "column": 3, + "event": "path", + "message": "Condition \"handle->tempname\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5730, + "column": 7, + "event": "path", + "message": "Condition \"handle->op_job->remove_source\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 5731, + "column": 9, + "event": "check_return", + "message": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5729| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5730| if (handle->op_job->remove_source)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5731|-> g_unlink (handle->op_job->local_path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5732| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 5733| g_vfs_job_succeeded (handle->job);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "pull_write_cb", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6512, + "column": 3, + "event": "assign", + "message": "Assigning: \"handle\" = \"request->handle\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6517, + "column": 3, + "event": "path", + "message": "Condition \"n_written == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6530, + "column": 3, + "event": "path", + "message": "Condition \"request->write_offset < request->response_len\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6541, + "column": 3, + "event": "path", + "message": "Condition \"handle->size >= 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6544, + "column": 3, + "event": "freed_arg", + "message": "\"pull_try_start_write\" frees \"handle\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6547, + "column": 3, + "event": "path", + "message": "Condition \"request->response_len < request->request_len\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6548, + "column": 5, + "event": "deref_arg", + "message": "Calling \"pull_enqueue_request\" dereferences freed pointer \"handle\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6546| /* If we read short, issue another request for the remaining data. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6547| if (request->response_len < request->request_len)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6548|-> pull_enqueue_request (handle,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6549| request->request_offset + request->response_len,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6550| request->request_len - request->response_len);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "USE_AFTER_FREE", + "cwe": 416, + "imp": 1, + "function": "pull_write_cb", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6512, + "column": 3, + "event": "assign", + "message": "Assigning: \"handle\" = \"request->handle\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6517, + "column": 3, + "event": "path", + "message": "Condition \"n_written == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6530, + "column": 3, + "event": "path", + "message": "Condition \"request->write_offset < request->response_len\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6541, + "column": 3, + "event": "path", + "message": "Condition \"handle->size >= 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6544, + "column": 3, + "event": "freed_arg", + "message": "\"pull_try_start_write\" frees \"handle\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6547, + "column": 3, + "event": "path", + "message": "Condition \"request->response_len < request->request_len\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsftp.c", + "line": 6551, + "column": 8, + "event": "deref_after_free", + "message": "Dereferencing freed pointer \"handle\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6549| request->request_offset + request->response_len,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6550| request->request_len - request->response_len);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6551|-> else if (handle->max_req == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6552| pull_try_finish (handle);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 6553| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmb.c", + "line": 485, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'errsv' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmb.c", + "line": 485, + "column": 3, + "event": "note", + "message": "Value stored to 'errsv' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 483| op_backend->password_save = G_PASSWORD_SAVE_NEVER;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 484| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 485|-> errsv = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 486| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 487| /* If user is not specified, first and second iteration is kerberos resp.", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_vfs_backend_smb_browse_finalize", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c", + "line": 188, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"backend->entries\" without holding lock \"_GVfsBackendSmbBrowse.entries_lock\". Elsewhere, \"_GVfsBackendSmbBrowse.entries\" is written to with \"_GVfsBackendSmbBrowse.entries_lock\" held 1 out of 1 times.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c", + "line": 474, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendSmbBrowse.entries_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c", + "line": 478, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsBackendSmbBrowse.entries\" is written to with lock \"_GVfsBackendSmbBrowse.entries_lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 186| smbc_free_context (backend->smb_context, TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 187| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 188|-> g_list_free_full (backend->entries, (GDestroyNotify)browse_entry_free);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 189| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 190| if (G_OBJECT_CLASS (g_vfs_backend_smb_browse_parent_class)->finalize)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c", + "line": 786, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'errsv' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c", + "line": 786, + "column": 3, + "event": "note", + "message": "Value stored to 'errsv' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 784| g_debug (\"do_mount - URI = %s\\n\", uri);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 785| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 786|-> errsv = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 787| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 788| do", + "verbosity_level": 1 + } + ] + }, + { + "checker": "INFINITE_LOOP", + "cwe": 835, + "function": "trash_backend_worker_thread_queue_and_wait", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendtrash.c", + "line": 95, + "column": 3, + "event": "loop_top", + "message": "Top of the loop.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendtrash.c", + "line": 98, + "column": 5, + "event": "loop_bottom", + "message": "Bottom of the loop.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsbackendtrash.c", + "line": 95, + "column": 3, + "event": "exit_condition", + "message": "If \"data.completed\" is initially false then it will remain false.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 93| &data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 94| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 95|-> while (!data.completed)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 96| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 97| g_cond_wait (&data.cond, &data.mutex);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "g_vfs_channel_init", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfschannel.c", + "line": 201, + "column": 3, + "event": "path", + "message": "Condition \"ret == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfschannel.c", + "line": 211, + "column": 7, + "event": "check_return", + "message": "Calling \"fcntl(socket_fds[0], 4, 2048)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 209| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 210| /* Set as nonblocking to be sure that _async methods don't block. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 211|-> fcntl (socket_fds[0], F_SETFL, O_NONBLOCK);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 212| fcntl (socket_fds[1], F_SETFL, O_NONBLOCK);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 213| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "g_vfs_channel_init", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfschannel.c", + "line": 201, + "column": 3, + "event": "path", + "message": "Condition \"ret == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfschannel.c", + "line": 212, + "column": 7, + "event": "check_return", + "message": "Calling \"fcntl(socket_fds[1], 4, 2048)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 210| /* Set as nonblocking to be sure that _async methods don't block. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 211| fcntl (socket_fds[0], F_SETFL, O_NONBLOCK);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 212|-> fcntl (socket_fds[1], F_SETFL, O_NONBLOCK);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 213| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 214| start_request_reader (channel);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_vfs_daemon_finalize", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 148, + "column": 3, + "event": "path", + "message": "Condition \"daemon->thread_pool != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 152, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"daemon->jobs\" without holding lock \"_GVfsDaemon.lock\". Elsewhere, \"_GVfsDaemon.jobs\" is written to with \"_GVfsDaemon.lock\" held 2 out of 3 times (2 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 638, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 639, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 621, + "column": 3, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 622, + "column": 3, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 150| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 151| /* There may be some jobs outstanding if we've been force unmounted. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 152|-> if (daemon->jobs)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 153| g_warning (\"daemon->jobs != NULL when finalizing daemon!\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 154| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "MISSING_LOCK", + "cwe": 667, + "function": "g_vfs_daemon_init", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 293, + "column": 3, + "event": "path", + "message": "Condition \"daemon->thread_pool != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 293, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 293, + "column": 3, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_10;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 293, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 299, + "column": 3, + "event": "missing_lock", + "message": "Accessing \"daemon->jobs\" without holding lock \"_GVfsDaemon.lock\". Elsewhere, \"_GVfsDaemon.jobs\" is written to with \"_GVfsDaemon.lock\" held 2 out of 3 times (2 of these accesses strongly imply that it is necessary).", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 638, + "column": 3, + "event": "lock_acquire", + "message": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 639, + "column": 3, + "event": "example_access", + "message": "Example 1 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 621, + "column": 3, + "event": "lock_acquire", + "message": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 622, + "column": 3, + "event": "example_access", + "message": "Example 2 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 297| daemon->mount_counter = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 298| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 299|-> daemon->jobs = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 300| daemon->registered_paths =", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 301| g_hash_table_new_full (g_str_hash, g_str_equal,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "handle_get_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 2, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 800, + "column": 3, + "event": "path", + "message": "Condition \"server == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 805, + "column": 7, + "event": "path", + "message": "Jumping to label \"error_out\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsdaemon.c", + "line": 835, + "column": 3, + "event": "check_return", + "message": "Calling \"g_unlink(socket_path)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 833| error_out:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 834| g_free (address1);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 835|-> g_unlink (socket_path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 836| g_free (socket_path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 837| return TRUE;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 476, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘g_vfs_ftp_dir_cache_funcs_resolve_default’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 771, + "column": 35, + "event": "warning[-Wanalyzer-null-dereference]", + "message": "dereference of NULL ‘new_path’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(1) entry to ‘g_vfs_ftp_dir_cache_funcs_resolve_default’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/lib64/glib-2.0/include/glibconfig.h", + "line": 9, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtypes.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/galloca.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 32, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gi18n.h", + "line": 23, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 28, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(2) following ‘true’ branch (when ‘file’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmessages.h", + "line": 661, + "column": 9, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 753, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_return_val_if_fail’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(3) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmessages.h", + "line": 661, + "column": 9, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 754, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_return_val_if_fail’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(4) following ‘true’ branch (when ‘target’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmessages.h", + "line": 661, + "column": 9, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 754, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_return_val_if_fail’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 756, + "column": 13, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/giochannel.h", + "line": 36, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 56, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 210, + "column": 3, + "event": "note", + "message": "(6) inlined call to ‘g_string_append_c_inline’ from ‘g_vfs_ftp_dir_cache_funcs_resolve_default’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 769, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_string_append_c’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(7) following ‘false’ branch (when ‘new_path’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 198, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 205, + "column": 5, + "event": "note", + "message": "(8) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘g_vfs_ftp_dir_cache_funcs_resolve_default’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftpdircache.c", + "line": 771, + "column": 35, + "event": "note", + "message": "(9) dereference of NULL ‘new_path’", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 769| g_string_append_c (new_path, '/'); /* slash at end makes code easier */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 770| /* cleanup: remove all double slashes */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 771|-> while ((match = strstr (new_path->str, \"//\")) != NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 772| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 773| g_string_erase (new_path, match - new_path->str, 1);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "LOCK_EVASION", + "cwe": 543, + "imp": 1, + "function": "g_vfs_ftp_task_acquire_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "thread1_checks_field", + "message": "Thread1 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false. Control is switched to Thread2.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "thread2_checks_field", + "message": "Thread2 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread2_acquires_lock", + "message": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 223, + "column": 11, + "event": "thread2_modifies_field", + "message": "Thread2 sets \"error\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread1_acquires_lock", + "message": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 223, + "column": 11, + "event": "thread1_overwrites_value_in_field", + "message": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "use_same_locks_for_read_and_modify", + "message": "Guard the modification of \"error\" and the read used to decide whether to modify \"error\" with the same set of locks.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 221| if (g_cancellable_is_cancelled (task->cancellable))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 222| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 223|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_CANCELLED,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 224| \t\t _(\"Operation was cancelled\"));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 225| break;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "LOCK_EVASION", + "cwe": 543, + "imp": 1, + "function": "g_vfs_ftp_task_acquire_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread1_acquires_lock", + "message": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 219, + "column": 10, + "event": "thread1_checks_field", + "message": "Thread1 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true. After Thread1 leaves the critical section, control is switched to Thread2.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread2_acquires_lock", + "message": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 219, + "column": 10, + "event": "thread2_checks_field", + "message": "Thread2 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 251, + "column": 11, + "event": "thread2_modifies_field", + "message": "Thread2 sets \"conn\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field, even into (but not to the other side of) preceding locked regions. Control is switched back to Thread1.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 251, + "column": 11, + "event": "thread1_overwrites_value_in_field", + "message": "Thread1 sets \"conn\" to a new value. Now the two threads have an inconsistent view of \"conn\" and updates to fields of \"conn\" or fields correlated with \"conn\" may be lost.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 251, + "column": 11, + "event": "use_same_locks_for_read_and_modify", + "message": "Guard the modification of \"conn\" and the read used to decide whether to modify \"conn\" with the same set of locks.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 249| last_thread = g_thread_self ();", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 250| g_mutex_unlock (&ftp->mutex);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 251|-> task->conn = g_vfs_ftp_connection_new (ftp->addr, task->cancellable, &task->error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 252| if (G_LIKELY (task->conn != NULL))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 253| {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "LOCK_EVASION", + "cwe": 543, + "imp": 1, + "function": "g_vfs_ftp_task_acquire_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread1_acquires_lock", + "message": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 219, + "column": 10, + "event": "thread1_checks_field", + "message": "Thread1 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true. After Thread1 leaves the critical section, control is switched to Thread2.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread2_acquires_lock", + "message": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 219, + "column": 10, + "event": "thread2_checks_field", + "message": "Thread2 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 261, + "column": 15, + "event": "thread2_modifies_field", + "message": "Thread2 sets \"conn\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field, even into (but not to the other side of) preceding locked regions. Control is switched back to Thread1.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 261, + "column": 15, + "event": "thread1_overwrites_value_in_field", + "message": "Thread1 sets \"conn\" to a new value. Now the two threads have an inconsistent view of \"conn\" and updates to fields of \"conn\" or fields correlated with \"conn\" may be lost.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 261, + "column": 15, + "event": "use_same_locks_for_read_and_modify", + "message": "Guard the modification of \"conn\" and the read used to decide whether to modify \"conn\" with the same set of locks.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 259| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 260| g_vfs_ftp_connection_free (task->conn);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 261|-> task->conn = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 262| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 263| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "g_vfs_ftp_task_acquire_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 26, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 208, + "column": 3, + "event": "path", + "message": "Condition \"task != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 208, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 208, + "column": 3, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_14;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 208, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 209, + "column": 3, + "event": "path", + "message": "Condition \"task->conn == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 209, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 209, + "column": 3, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_15;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 209, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 3, + "event": "path", + "message": "Condition \"task->error != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "lock", + "message": "Locking \"&ftp->mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 219, + "column": 3, + "event": "path", + "message": "Condition \"task->conn == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 219, + "column": 3, + "event": "path", + "message": "Condition \"ftp->queue != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 221, + "column": 7, + "event": "path", + "message": "Condition \"g_cancellable_is_cancelled(task->cancellable)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 229, + "column": 7, + "event": "path", + "message": "Condition \"task->conn != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 231, + "column": 11, + "event": "path", + "message": "Condition \"g_vfs_ftp_connection_is_usable(task->conn)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 239, + "column": 7, + "event": "path", + "message": "Condition \"ftp->connections < ftp->max_connections\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 246, + "column": 11, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"maybe_max_connections\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 250, + "column": 11, + "event": "unlock", + "message": "Unlocking \"&ftp->mutex\". \"maybe_max_connections\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 252, + "column": 15, + "event": "path", + "message": "Condition \"task->conn != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 252, + "column": 15, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 252, + "column": 11, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_16;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 257, + "column": 19, + "event": "path", + "message": "Condition \"!(task->error != NULL)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 257, + "column": 15, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_17;})\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 269, + "column": 11, + "event": "path", + "message": "Condition \"last_thread == g_thread_self()\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 269, + "column": 11, + "event": "path", + "message": "Condition \"!g_error_matches(task->error, g_io_error_quark(), G_IO_ERROR_CANCELLED)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 264, + "column": 11, + "event": "lockagain", + "message": "Locking \"&ftp->mutex\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 272, + "column": 15, + "event": "use", + "message": "Using an unreliable value of \"maybe_max_connections\" inside the second locked section. If the data that \"maybe_max_connections\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 270| !g_vfs_ftp_task_error_matches (task, G_IO_ERROR, G_IO_ERROR_CANCELLED))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 271| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 272|-> g_print (\"maybe: %u, max %u (due to %s)\\n\", maybe_max_connections, ftp->max_connections, task->error->message);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 273| ftp->max_connections = MIN (ftp->max_connections, maybe_max_connections);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 274| if (ftp->max_connections == 0)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "LOCK_EVASION", + "cwe": 543, + "imp": 1, + "function": "g_vfs_ftp_task_acquire_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "thread1_checks_field", + "message": "Thread1 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false. Control is switched to Thread2.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "thread2_checks_field", + "message": "Thread2 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread2_acquires_lock", + "message": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 290, + "column": 11, + "event": "thread2_modifies_field", + "message": "Thread2 sets \"error\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread1_acquires_lock", + "message": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 290, + "column": 11, + "event": "thread1_overwrites_value_in_field", + "message": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "use_same_locks_for_read_and_modify", + "message": "Guard the modification of \"error\" and the read used to decide whether to modify \"error\" with the same set of locks.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 288| !g_cond_wait_until (&ftp->cond, &ftp->mutex, end_time))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 289| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 290|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_BUSY,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 291| \t\t _(\"The FTP server is busy. Try again later\"));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 292| break;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "LOCK_EVASION", + "cwe": 543, + "imp": 1, + "function": "g_vfs_ftp_task_acquire_connection", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "thread1_checks_field", + "message": "Thread1 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false. Control is switched to Thread2.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "thread2_checks_field", + "message": "Thread2 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread2_acquires_lock", + "message": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 296, + "column": 5, + "event": "thread2_modifies_field", + "message": "Thread2 sets \"error\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 215, + "column": 3, + "event": "thread1_acquires_lock", + "message": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 296, + "column": 5, + "event": "thread1_overwrites_value_in_field", + "message": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost.", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsftptask.c", + "line": 211, + "column": 7, + "event": "use_same_locks_for_read_and_modify", + "message": "Guard the modification of \"error\" and the read used to decide whether to modify \"error\" with the same set of locks.", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 294| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 295| if (!ftp->queue)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 296|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 297| _(\"Backend currently unmounting\"));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 298| g_mutex_unlock (&ftp->mutex);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "g_vfs_http_input_stream_seek", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfshttpinputstream.c", + "line": 464, + "column": 10, + "event": "dead_error_condition", + "message": "The \"switch\" governing value \"type\" cannot be \"G_SEEK_END\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfshttpinputstream.c", + "line": 464, + "column": 10, + "event": "dead_error_begin", + "message": "Execution cannot reach this statement: \"case G_SEEK_END:\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 462| break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 463| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 464|-> case G_SEEK_END:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 465| g_return_val_if_reached (FALSE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 466| break;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "insert_string", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfskeyring.c", + "line": 50, + "column": 3, + "event": "path", + "message": "Condition \"*attributes == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfskeyring.c", + "line": 53, + "column": 3, + "event": "path", + "message": "Condition \"!g_utf8_validate(value, -1, NULL)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfskeyring.c", + "line": 57, + "column": 7, + "event": "assign_zero", + "message": "Assigning: \"*attributes\" = \"NULL\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfskeyring.c", + "line": 60, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"*attributes\" to \"g_hash_table_insert\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 58| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 59| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 60|-> g_hash_table_insert (*attributes,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 61| \t\t g_strdup (key),", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 62| \t\t g_strdup (value));", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 87, + "column": 7, + "event": "warning[unix.Malloc]", + "message": "Use of memory after it is freed", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 84, + "column": 10, + "event": "note", + "message": "Assuming field 'subscribers' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 84, + "column": 3, + "event": "note", + "message": "Loop condition is true. Entering loop body", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 87, + "column": 7, + "event": "note", + "message": "Calling 'unsubscribe'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 158, + "column": 3, + "event": "note", + "message": "Memory is released", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 87, + "column": 7, + "event": "note", + "message": "Returning; memory was released via 1st parameter", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 84, + "column": 25, + "event": "note", + "message": "Field 'subscribers' is not equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 84, + "column": 3, + "event": "note", + "message": "Loop condition is true. Entering loop body", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/gvfsmonitor.c", + "line": 87, + "column": 7, + "event": "note", + "message": "Use of memory after it is freed", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 85| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 86| subscriber = monitor->priv->subscribers->data;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 87|-> unsubscribe (subscriber);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 88| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 89| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "on_name_acquired", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 76, + "column": 3, + "event": "path", + "message": "Condition \"!no_fuse\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 82, + "column": 7, + "event": "path", + "message": "Condition \"g_strcmp0(g_get_user_runtime_dir(), g_get_user_cache_dir()) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 83, + "column": 71, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 87, + "column": 7, + "event": "path", + "message": "Condition \"!g_file_test(fuse_path, G_FILE_TEST_EXISTS)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 88, + "column": 9, + "event": "check_return", + "message": "Calling \"mkdir(fuse_path, 448U)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 86| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 87| if (!g_file_test (fuse_path, G_FILE_TEST_EXISTS))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 88|-> g_mkdir (fuse_path, 0700);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 89| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 90| /* The -f (foreground) option prevent libfuse to call daemon(). */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "main", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 177, + "column": 3, + "event": "assignment", + "message": "Assigning: \"show_version\" = \"0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 204, + "column": 7, + "event": "const", + "message": "At condition \"show_version\", the value of \"show_version\" must be equal to 0.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 204, + "column": 3, + "event": "dead_error_condition", + "message": "The condition \"show_version\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 206, + "column": 7, + "event": "dead_error_begin", + "message": "Execution cannot reach this statement: \"g_print(\"gvfs 1.54.0\\n\");\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 204| if (show_version)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 205| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 206|-> g_print (PACKAGE_STRING \"\\n\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 207| return 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 208| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "main", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 179, + "column": 3, + "event": "path", + "message": "Condition \"g_getenv(\"GVFS_DISABLE_FUSE\") != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 183, + "column": 3, + "event": "path", + "message": "Condition \"!g_option_context_parse(context, &argc, &argv, &error)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 199, + "column": 3, + "event": "path", + "message": "Condition \"g_getenv(\"GVFS_DEBUG\")\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 204, + "column": 3, + "event": "path", + "message": "Condition \"show_version\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 213, + "column": 3, + "event": "path", + "message": "Condition \"daemon == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 218, + "column": 3, + "event": "check_return", + "message": "Calling \"mkdir(socket_dir, 448U)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 216| /* This is needed for gvfsd-admin to ensure correct ownership. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 217| socket_dir = gvfs_get_socket_dir ();", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 218|-> g_mkdir (socket_dir, 0700);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 219| g_free (socket_dir);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 220| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "main", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 174, + "column": 3, + "event": "assignment", + "message": "Assigning: \"replace\" = \"0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 225, + "column": 7, + "event": "const", + "message": "At condition \"replace\", the value of \"replace\" must be equal to 0.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 225, + "column": 3, + "event": "dead_error_condition", + "message": "The condition \"replace\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/main.c", + "line": 226, + "column": 5, + "event": "dead_error_line", + "message": "Execution cannot reach this statement: \"flags |= G_BUS_NAME_OWNER_F...\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 224| flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 225| if (replace)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 226|-> flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 227| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 228| name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_register_mount", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 702, + "column": 3, + "event": "path", + "message": "Condition \"find_vfs_mount(id, arg_obj_path) != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 708, + "column": 8, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_mount_spec_from_dbus\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 708, + "column": 8, + "event": "var_assign", + "message": "Assigning: \"mount_spec\" = storage returned from \"g_mount_spec_from_dbus(arg_mount_spec)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 708, + "column": 8, + "event": "path", + "message": "Condition \"(mount_spec = g_mount_spec_from_dbus(arg_mount_spec)) == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 714, + "column": 8, + "event": "noescape", + "message": "Resource \"mount_spec\" is not freed or pointed-to in \"match_vfs_mount\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 714, + "column": 8, + "event": "path", + "message": "Condition \"match_vfs_mount(mount_spec) != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 719, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/mount.c", + "line": 764, + "column": 3, + "event": "leaked_storage", + "message": "Variable \"mount_spec\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 762| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 763| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 764|-> return TRUE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 765| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 766| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "INTEGER_OVERFLOW", + "cwe": 190, + "imp": 1, + "function": "n_read", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 11, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 253, + "column": 3, + "event": "path", + "message": "Switch case default.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 271, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 273, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 253, + "column": 3, + "event": "path", + "message": "Switch case default.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 271, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 273, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "tainted_data_argument", + "message": "The check \"n < count\" contains the tainted expression \"n\" which causes \"count\" to be considered tainted.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 3, + "event": "overflow", + "message": "The expression \"count - n\" is deemed underflowed because at least one of its arguments has underflowed.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 3, + "event": "overflow_sink", + "message": "\"count - n\", which might have underflowed, is passed to \"read(fd, buf + n, count - n)\". [Note: The source code implementation of the function has been overridden by a builtin model.]", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 250| \tint i;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 251| \twhile (n < count) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 252|-> \t\ti = read(fd, buf + n, count - n);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 253| \t\tswitch (i) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 254| \t\tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 22, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 250| \tint i;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 251| \twhile (n < count) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 252|-> \t\ti = read(fd, buf + n, count - n);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 253| \t\tswitch (i) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 254| \t\tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 33, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 250| \tint i;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 251| \twhile (n < count) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 252|-> \t\ti = read(fd, buf + n, count - n);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 253| \t\tswitch (i) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 254| \t\tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "INTEGER_OVERFLOW", + "cwe": 190, + "function": "n_read", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 13, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 253, + "column": 3, + "event": "path", + "message": "Switch case default.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 271, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 273, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 3, + "event": "tainted_data_return", + "message": "Called function \"read(fd, buf + n, count - n)\", and a possible return value may be less than zero.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 3, + "event": "cast_overflow", + "message": "An assign that casts to a different type, which might trigger an overflow.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 253, + "column": 3, + "event": "path", + "message": "Switch case default.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 270, + "column": 4, + "event": "overflow", + "message": "The expression \"n += i\" might be negative, but is used in a context that treats it as unsigned.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 271, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 273, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 253, + "column": 3, + "event": "path", + "message": "Switch case value \"0\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 255, + "column": 4, + "event": "return_overflow", + "message": "\"n\", which might have underflowed, is returned from the function.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 253| \t\tswitch (i) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 254| \t\tcase 0:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 255|-> \t\t\treturn n;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 256| \t\t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 257| \t\tcase -1:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "INTEGER_OVERFLOW", + "cwe": 190, + "imp": 1, + "function": "n_write", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 13, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 286, + "column": 3, + "event": "path", + "message": "Switch case value \"-1\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 291, + "column": 4, + "event": "path", + "message": "Switch case value \"4\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 297, + "column": 5, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 301, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 306, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 286, + "column": 3, + "event": "path", + "message": "Switch case default.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 304, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 306, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "tainted_data_argument", + "message": "The check \"n < count\" contains the tainted expression \"n\" which causes \"count\" to be considered tainted.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 285, + "column": 3, + "event": "overflow", + "message": "The expression \"count - n\" is deemed underflowed because at least one of its arguments has underflowed.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 285, + "column": 3, + "event": "overflow_sink", + "message": "\"count - n\", which might have underflowed, is passed to \"write(fd, buf + n, count - n)\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 283| \tint i;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 284| \twhile (n < count) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 285|-> \t\ti = write(fd, buf + n, count - n);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 286| \t\tswitch (i) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 287| \t\tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "INTEGER_OVERFLOW", + "cwe": 190, + "function": "n_write", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 15, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 286, + "column": 3, + "event": "path", + "message": "Switch case value \"-1\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 291, + "column": 4, + "event": "path", + "message": "Switch case value \"4\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 297, + "column": 5, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 301, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 306, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 285, + "column": 3, + "event": "tainted_data_return", + "message": "Called function \"write(fd, buf + n, count - n)\", and a possible return value may be less than zero.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 285, + "column": 3, + "event": "cast_overflow", + "message": "An assign that casts to a different type, which might trigger an overflow.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 286, + "column": 3, + "event": "path", + "message": "Switch case default.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 303, + "column": 4, + "event": "overflow", + "message": "The expression \"n += i\" might be negative, but is used in a context that treats it as unsigned.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 304, + "column": 4, + "event": "path", + "message": "Breaking from switch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 306, + "column": 2, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 284, + "column": 2, + "event": "path", + "message": "Condition \"n < count\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 286, + "column": 3, + "event": "path", + "message": "Switch case value \"0\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 288, + "column": 4, + "event": "return_overflow", + "message": "\"n\", which might have underflowed, is returned from the function.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 286| \t\tswitch (i) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 287| \t\tcase 0:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 288|-> \t\t\treturn n;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 289| \t\t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 290| \t\tcase -1:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘pid_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(25) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 23, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(35) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(36) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(37) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(38) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(39) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(40) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(41) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(42) ‘pid_pipe[0]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘pid_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(25) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 23, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(35) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(36) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(37) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(38) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(39) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(40) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(41) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(42) ‘pid_pipe[1]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘stderr_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(23) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(29) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(30) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(31) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(32) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(35) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(37) ‘stderr_pipe[0]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘stderr_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(23) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(29) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(30) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(31) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(32) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(35) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(37) ‘stderr_pipe[1]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘stdin_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(25) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(35) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(37) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(38) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(39) ‘stdin_pipe[0]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘stdin_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(25) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(35) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(37) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(38) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(39) ‘stdin_pipe[1]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘stdout_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(23) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(26) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(27) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(28) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(29) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(30) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(31) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(32) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(35) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(37) ‘stdout_pipe[0]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 775, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "warning[-Wanalyzer-fd-leak]", + "message": "leak of file descriptor ‘stdout_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(23) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(26) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(27) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(28) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(29) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(30) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(31) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(32) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(35) following ‘case -1:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 469, + "column": 9, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 472, + "column": 24, + "event": "note", + "message": "(37) ‘stdout_pipe[1]’ leaks here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 470| \t\t/* Error fork()ing. Bail. */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 471| \t\t*child = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 472|-> \t\treturn -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 473| \t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 474| \tcase 0:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 457, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 489, + "column": 25, + "event": "warning[-Wanalyzer-use-of-uninitialized-value]", + "message": "use of uninitialized value ‘pid_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 428, + "column": 13, + "event": "note", + "message": "(21) region created on stack here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(22) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(35) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(37) following ‘case 0:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 474, + "column": 9, + "event": "note", + "message": "(38) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 488, + "column": 19, + "event": "note", + "message": "(39) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 489, + "column": 25, + "event": "note", + "message": "(40) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 489, + "column": 25, + "event": "note", + "message": "(41) use of uninitialized value ‘pid_pipe[0]’ here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 487| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 488| \t\tif(reapchild) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 489|-> \t\t\tclose(pid_pipe[0]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 490| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 491| \t\t\t/* Fork a intermediate child. This is needed to not", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 526, + "column": 17, + "event": "warning[-Wanalyzer-fd-use-without-check]", + "message": "‘dup2’ on possibly invalid file descriptor ‘0’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(25) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(26) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(27) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(28) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(29) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(30) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(31) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(32) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(33) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(34) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(35) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(36) following ‘case 0:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 474, + "column": 9, + "event": "note", + "message": "(37) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 488, + "column": 19, + "event": "note", + "message": "(38) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(39) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 515, + "column": 31, + "event": "note", + "message": "(40) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 516, + "column": 42, + "event": "note", + "message": "(41) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 516, + "column": 28, + "event": "note", + "message": "(42) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 517, + "column": 42, + "event": "note", + "message": "(43) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 516, + "column": 47, + "event": "note", + "message": "(44) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 518, + "column": 45, + "event": "note", + "message": "(45) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 517, + "column": 47, + "event": "note", + "message": "(46) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 519, + "column": 46, + "event": "note", + "message": "(47) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 518, + "column": 50, + "event": "note", + "message": "(48) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 520, + "column": 46, + "event": "note", + "message": "(49) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 519, + "column": 51, + "event": "note", + "message": "(50) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 521, + "column": 33, + "event": "note", + "message": "(51) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 521, + "column": 33, + "event": "note", + "message": "(52) closed here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 515, + "column": 31, + "event": "note", + "message": "(53) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 526, + "column": 17, + "event": "note", + "message": "(54) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 526, + "column": 17, + "event": "note", + "message": "(55) ‘0’ could be invalid", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 524| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 525| \t\t/* Set up stdin/out/err */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 526|-> \t\tdup2(stdin_pipe[0], STDIN_FILENO);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 527| \t\tclose (stdin_pipe[0]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 528| \t\tdup2(stdout_pipe[1], STDOUT_FILENO);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 457, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 562, + "column": 25, + "event": "warning[-Wanalyzer-use-of-uninitialized-value]", + "message": "use of uninitialized value ‘pid_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 428, + "column": 13, + "event": "note", + "message": "(21) region created on stack here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(22) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(27) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(35) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(37) following ‘default:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 551, + "column": 9, + "event": "note", + "message": "(38) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 561, + "column": 20, + "event": "note", + "message": "(39) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 562, + "column": 25, + "event": "note", + "message": "(40) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 562, + "column": 25, + "event": "note", + "message": "(41) use of uninitialized value ‘pid_pipe[1]’ here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 560| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 561| \t\tif (reapchild) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 562|-> \t\t\tclose(pid_pipe[1]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 563| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 564| \t\t\t/* Reap the intermediate child */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 1341, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 616, + "column": 9, + "event": "warning[-Wanalyzer-fd-double-close]", + "message": "double ‘close’ of file descriptor ‘stderr_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(25) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 23, + "event": "note", + "message": "(26) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(27) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(28) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(29) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(30) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(31) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(32) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(33) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(34) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(35) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(36) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(37) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(38) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(39) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(40) following ‘default:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 551, + "column": 9, + "event": "note", + "message": "(41) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 559, + "column": 17, + "event": "note", + "message": "(42) first ‘close’ here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 561, + "column": 20, + "event": "note", + "message": "(43) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 562, + "column": 25, + "event": "note", + "message": "(44) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 579, + "column": 29, + "event": "note", + "message": "(45) calling ‘n_read’ from ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 246, + "column": 1, + "event": "note", + "message": "(46) entry to ‘n_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 18, + "event": "note", + "message": "(47) following ‘true’ branch (when ‘n < count’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 21, + "event": "note", + "message": "(48) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 579, + "column": 29, + "event": "note", + "message": "(49) returning to ‘_pty_fork_on_pty_name’ from ‘n_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 616, + "column": 9, + "event": "note", + "message": "(50) second ‘close’ here; first ‘close’ was at (42)", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 614| bail_slavefd:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 615| \tclose(stderr_pipe[0]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 616|-> \tclose(stderr_pipe[1]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 617| bail_stderr:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 618| \tclose(stdout_pipe[0]);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 1341, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 619, + "column": 9, + "event": "warning[-Wanalyzer-fd-double-close]", + "message": "double ‘close’ of file descriptor ‘stdout_pipe[1]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(25) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 23, + "event": "note", + "message": "(26) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(27) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(28) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(29) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(30) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(31) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(35) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(36) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(37) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(38) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(39) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(40) following ‘default:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 551, + "column": 9, + "event": "note", + "message": "(41) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 558, + "column": 17, + "event": "note", + "message": "(42) first ‘close’ here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 561, + "column": 20, + "event": "note", + "message": "(43) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 562, + "column": 25, + "event": "note", + "message": "(44) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 579, + "column": 29, + "event": "note", + "message": "(45) calling ‘n_read’ from ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 246, + "column": 1, + "event": "note", + "message": "(46) entry to ‘n_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 18, + "event": "note", + "message": "(47) following ‘true’ branch (when ‘n < count’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 21, + "event": "note", + "message": "(48) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 579, + "column": 29, + "event": "note", + "message": "(49) returning to ‘_pty_fork_on_pty_name’ from ‘n_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 619, + "column": 9, + "event": "note", + "message": "(50) second ‘close’ here; first ‘close’ was at (42)", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 617| bail_stderr:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 618| \tclose(stdout_pipe[0]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 619|-> \tclose(stdout_pipe[1]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 620| bail_stdout:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 621| \tclose(stdin_pipe[0]);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 1341, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 621, + "column": 9, + "event": "warning[-Wanalyzer-fd-double-close]", + "message": "double ‘close’ of file descriptor ‘stdin_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(21) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 26, + "event": "note", + "message": "(25) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 23, + "event": "note", + "message": "(26) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(27) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(28) opened here as read-write", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(29) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(30) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 13, + "event": "note", + "message": "(32) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 449, + "column": 12, + "event": "note", + "message": "(33) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 13, + "event": "note", + "message": "(35) when ‘pipe’ succeeds", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 453, + "column": 12, + "event": "note", + "message": "(36) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 462, + "column": 21, + "event": "note", + "message": "(37) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 463, + "column": 12, + "event": "note", + "message": "(38) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 467, + "column": 15, + "event": "note", + "message": "(39) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 468, + "column": 9, + "event": "note", + "message": "(40) following ‘default:’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 551, + "column": 9, + "event": "note", + "message": "(41) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 557, + "column": 17, + "event": "note", + "message": "(42) first ‘close’ here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 561, + "column": 20, + "event": "note", + "message": "(43) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 562, + "column": 25, + "event": "note", + "message": "(44) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 579, + "column": 29, + "event": "note", + "message": "(45) calling ‘n_read’ from ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 246, + "column": 1, + "event": "note", + "message": "(46) entry to ‘n_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 251, + "column": 18, + "event": "note", + "message": "(47) following ‘true’ branch (when ‘n < count’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 252, + "column": 21, + "event": "note", + "message": "(48) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 579, + "column": 29, + "event": "note", + "message": "(49) returning to ‘_pty_fork_on_pty_name’ from ‘n_read’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 621, + "column": 9, + "event": "note", + "message": "(50) second ‘close’ here; first ‘close’ was at (42)", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 619| \tclose(stdout_pipe[1]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 620| bail_stdout:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 621|-> \tclose(stdin_pipe[0]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 622| \tclose(stdin_pipe[1]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 623| bail_stdin:", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 457, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 625, + "column": 17, + "event": "warning[-Wanalyzer-use-of-uninitialized-value]", + "message": "use of uninitialized value ‘pid_pipe[0]’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 905, + "column": 1, + "event": "note", + "message": "(1) entry to ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 15, + "event": "note", + "message": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 745, + "column": 1, + "event": "note", + "message": "(3) entry to ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 12, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 663, + "column": 1, + "event": "note", + "message": "(7) entry to ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 17, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘i == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 29, + "event": "note", + "message": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 20, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 22, + "event": "note", + "message": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 725, + "column": 16, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 56, + "event": "note", + "message": "(14) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 759, + "column": 22, + "event": "note", + "message": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 735, + "column": 16, + "event": "note", + "message": "(16) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘_pty_fork_on_pty_name’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 45, + "event": "note", + "message": "(17) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 764, + "column": 29, + "event": "note", + "message": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 416, + "column": 1, + "event": "note", + "message": "(20) entry to ‘_pty_fork_on_pty_name’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 428, + "column": 13, + "event": "note", + "message": "(21) region created on stack here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 434, + "column": 12, + "event": "note", + "message": "(22) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(23) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 440, + "column": 12, + "event": "note", + "message": "(24) following ‘false’ branch (when ‘reapchild == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(25) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 13, + "event": "note", + "message": "(26) when ‘pipe’ fails", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 445, + "column": 12, + "event": "note", + "message": "(27) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 447, + "column": 17, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 624, + "column": 11, + "event": "note", + "message": "(29) following ‘true’ branch (when ‘reapchild != 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 625, + "column": 17, + "event": "note", + "message": "(30) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 625, + "column": 17, + "event": "note", + "message": "(31) use of uninitialized value ‘pid_pipe[0]’ here", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 623| bail_stdin:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 624| \tif(reapchild) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 625|-> \t\tclose(pid_pipe[0]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 626| \t\tclose(pid_pipe[1]);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 627| \t}", + "verbosity_level": 1 + } + ] + }, + { + "checker": "UNUSED_VALUE", + "cwe": 563, + "function": "_pty_ptsname", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 670, + "column": 9, + "event": "value_overwrite", + "message": "Overwriting previous write to \"buf\" with value from \"g_malloc0(len)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 679, + "column": 10, + "event": "assigned_pointer", + "message": "Assigning value \"NULL\" to \"buf\" here, but that stored value is overwritten before it can be used.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 677| \t\tdefault:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 678| \t\t\tg_free(buf);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 679|-> \t\t\tbuf = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 680| \t\t\tbreak;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 681| \t\t}", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "_pty_getpt", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 717, + "column": 2, + "event": "check_return", + "message": "Calling \"fcntl(fd, 4, flags)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 715| \tflags = fcntl(fd, F_GETFL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 716| \tflags &= ~(O_NONBLOCK);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 717|-> \tfcntl(fd, F_SETFL, flags);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 718| \treturn fd;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 719| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 760, + "column": 4, + "event": "warning[unix.Malloc]", + "message": "Potential leak of memory pointed to by 'buf'", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 913, + "column": 8, + "event": "note", + "message": "Calling '_pty_open_unix98'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 6, + "event": "note", + "message": "Assuming the condition is true", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 2, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 15, + "event": "note", + "message": "Calling '_pty_ptsname'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 670, + "column": 9, + "event": "note", + "message": "Memory is allocated", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 672, + "column": 3, + "event": "note", + "message": "Control jumps to 'case 0:' at line 673", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 15, + "event": "note", + "message": "Returned allocated memory", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 7, + "event": "note", + "message": "Left side of '||' is false", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 8, + "event": "note", + "message": "Assuming the condition is true", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 758, + "column": 31, + "event": "note", + "message": "Left side of '||' is true", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 760, + "column": 4, + "event": "note", + "message": "Potential leak of memory pointed to by 'buf'", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 758| \t\t (_pty_grantpt(fd) != 0) ||", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 759| \t\t (_pty_unlockpt(fd) != 0)) {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 760|-> \t\t\tclose(fd);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 761| \t\t\tfd = -1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 762| \t\t} else {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "_pty_open_unix98", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 755, + "column": 2, + "event": "path", + "message": "Condition \"fd != -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"_pty_ptsname\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"buf\" = storage returned from \"_pty_ptsname(fd)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 3, + "event": "path", + "message": "Condition \"(buf = _pty_ptsname(fd)) == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 3, + "event": "path", + "message": "Condition \"_pty_grantpt(fd) != 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 757, + "column": 3, + "event": "path", + "message": "Condition \"_pty_unlockpt(fd) != 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 762, + "column": 3, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/pty_open.c", + "line": 777, + "column": 2, + "event": "leaked_storage", + "message": "Variable \"buf\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 775| \t\t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 776| \t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 777|-> \treturn fd;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 778| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 779| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "trash_dir_set_files", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 12, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 80, + "column": 3, + "event": "path", + "message": "Condition \"new\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"new == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"*old == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "var_compare_op", + "message": "Comparing \"*old\" to null implies that \"*old\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"(result = (new == NULL) - (*old == NULL)) == 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 87, + "column": 7, + "event": "path", + "message": "Condition \"result < 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 90, + "column": 11, + "event": "identity_transfer", + "message": "Passing \"*old\" as argument 1 to function \"g_slist_prepend\", which returns that argument.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 90, + "column": 11, + "event": "alias_transfer", + "message": "Assigning: \"*old\" = \"g_slist_prepend(*old, new->data)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 91, + "column": 11, + "event": "alias_transfer", + "message": "Assigning: \"old\" = \"&(*old)->next\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 94, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 109, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 80, + "column": 3, + "event": "path", + "message": "Condition \"new\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 80, + "column": 3, + "event": "var_deref_op", + "message": "Dereferencing null pointer \"old\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 78| new = items;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 79| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 80|-> while (new || *old)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 81| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 82| int result;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "trash_dir_set_files", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 13, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 80, + "column": 3, + "event": "path", + "message": "Condition \"new\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"new == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"*old == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "var_compare_op", + "message": "Comparing \"*old\" to null implies that \"*old\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"(result = (new == NULL) - (*old == NULL)) == 0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 87, + "column": 7, + "event": "path", + "message": "Condition \"result < 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 90, + "column": 11, + "event": "identity_transfer", + "message": "Passing \"*old\" as argument 1 to function \"g_slist_prepend\", which returns that argument.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 90, + "column": 11, + "event": "alias_transfer", + "message": "Assigning: \"*old\" = \"g_slist_prepend(*old, new->data)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 91, + "column": 11, + "event": "alias_transfer", + "message": "Assigning: \"old\" = \"&(*old)->next\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 94, + "column": 9, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 109, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 80, + "column": 3, + "event": "path", + "message": "Condition \"new\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "path", + "message": "Condition \"new == NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashdir.c", + "line": 84, + "column": 7, + "event": "var_deref_op", + "message": "Dereferencing null pointer \"old\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 82| int result;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 83| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 84|-> if ((result = (new == NULL) - (*old == NULL)) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 85| result = compare_basename (new->data, (*old)->data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 86| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "ATOMICITY", + "cwe": 667, + "function": "trash_expunge_thread", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 71, + "column": 3, + "event": "lock", + "message": "Locking \"&trash_expunge_lock\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 75, + "column": 7, + "event": "path", + "message": "Condition \"g_hash_table_size(trash_expunge_queue)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 79, + "column": 11, + "event": "def", + "message": "Assigning data that might be protected by the lock to \"directory\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 83, + "column": 11, + "event": "unlock", + "message": "Unlocking \"&trash_expunge_lock\". \"directory\" might now be unreliable because other threads can now change the data that it depends on.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 85, + "column": 11, + "event": "lockagain", + "message": "Locking \"&trash_expunge_lock\" again.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 87, + "column": 11, + "event": "use", + "message": "Using an unreliable value of \"directory\" inside the second locked section. If the data that \"directory\" depends on was changed by another thread, this use might be incorrect.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 85| g_mutex_lock (&trash_expunge_lock);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 86| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 87|-> g_object_unref (directory);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 88| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 89| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "trash_expunge", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 15, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 106, + "column": 6, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 106, + "column": 6, + "event": "path", + "message": "Condition \"!({...; gapg_temp_newval;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 106, + "column": 6, + "event": "path", + "message": "Condition \"g_once_init_enter(&trash_expunge_initialised)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 106, + "column": 6, + "event": "path", + "message": "Condition \"({...; !({...; gapg_temp_newval;}) && g_once_init_enter(&trash_expunge_initialised);})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 106, + "column": 6, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 106, + "column": 3, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_10;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 110, + "column": 7, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 115, + "column": 3, + "event": "path", + "message": "Condition \"!g_hash_table_lookup(trash_expunge_queue, directory)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 120, + "column": 3, + "event": "path", + "message": "Condition \"trash_expunge_alive == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 124, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_thread_new\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 124, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"thread\" = storage returned from \"g_thread_new(\"trash-expunge\", trash_expunge_thread, NULL)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 125, + "column": 7, + "event": "path", + "message": "Condition \"thread != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 125, + "column": 7, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 125, + "column": 7, + "event": "path", + "message": "Condition \"({...; _g_boolean_var_11;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 125, + "column": 7, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c", + "line": 127, + "column": 5, + "event": "leaked_storage", + "message": "Variable \"thread\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 125| g_assert (thread != NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 126| trash_expunge_alive = TRUE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 127|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 128| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 129| g_cond_signal (&trash_expunge_wait);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 476, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/daemon/trashlib/trashwatcher.c", + "line": 116, + "column": 8, + "event": "warning[cpp/DerefNull]", + "message": "A pointer is possibly assigned the return value of a standard library function that may return NULL and is not checked before use. NULL pointer use can lead to program crashes.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 114| slash++;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 115| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 116|-> *slash = '\\0';", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 117| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 118| entry = g_unix_mount_for (pathname, NULL);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 479, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'name_owner_id' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 479, + "column": 3, + "event": "note", + "message": "Value stored to 'name_owner_id' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 477| replace = FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 478| show_version = FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 479|-> name_owner_id = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 480| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 481| error = NULL;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "main", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 478, + "column": 3, + "event": "assignment", + "message": "Assigning: \"show_version\" = \"0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 498, + "column": 7, + "event": "const", + "message": "At condition \"show_version\", the value of \"show_version\" must be equal to 0.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 498, + "column": 3, + "event": "dead_error_condition", + "message": "The condition \"show_version\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 500, + "column": 7, + "event": "dead_error_begin", + "message": "Execution cannot reach this statement: \"g_print(\"gvfs 1.54.0\\n\");\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 498| if (show_version)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 499| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 500|-> g_print(PACKAGE_STRING \"\\n\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 501| return 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 502| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "DEADCODE", + "cwe": 561, + "function": "main", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 477, + "column": 3, + "event": "assignment", + "message": "Assigning: \"replace\" = \"0\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 524, + "column": 7, + "event": "const", + "message": "At condition \"replace\", the value of \"replace\" must be equal to 0.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 524, + "column": 3, + "event": "dead_error_condition", + "message": "The condition \"replace\" cannot be true.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/meta-daemon.c", + "line": 525, + "column": 5, + "event": "dead_error_line", + "message": "Execution cannot reach this statement: \"flags |= G_BUS_NAME_OWNER_F...\".", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 523| flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 524| if (replace)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 525|-> flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 526| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 527| skeleton = gvfs_metadata_skeleton_new ();", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-get-tree.c", + "line": 47, + "column": 14, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 45| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 46| tree_path = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 47|-> tree = meta_lookup_cache_lookup_path (cache, argv[i], statbuf.st_dev,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 48| \t\t\t\t\t FALSE, &tree_path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 49| if (tree)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-get.c", + "line": 153, + "column": 14, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 151| \t return 1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 152| \t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 153|-> tree = meta_lookup_cache_lookup_path (lookup,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 154| \t\t\t\t\t path,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 155| \t\t\t\t\t statbuf.st_dev,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-ls.c", + "line": 65, + "column": 10, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 63| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 64| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 65|-> tree = meta_tree_open (argv[1], TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 66| if (tree == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 67| {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 23, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-ls.c", + "line": 65, + "column": 10, + "event": "warning[cpp/PT]", + "message": "Unsanitized input from a command line argument flows into open, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitrary files.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 63| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 64| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 65|-> tree = meta_tree_open (argv[1], TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 66| if (tree == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 67| {", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-set.c", + "line": 82, + "column": 14, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 80| \t return 1;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 81| \t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 82|-> tree = meta_lookup_cache_lookup_path (lookup,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 83| \t\t\t\t\t path,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 84| \t\t\t\t\t statbuf.st_dev,", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 122, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/meta-set.c", + "line": 183, + "column": 9, + "event": "warning[cpp/BufferOverflow]", + "message": "Unsanitized input from a command line argument flows into memcpy, where it is used to manipulate application memory. This may result in a buffer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 181| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 182| \t{", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 183|-> \t if (!meta_tree_set_stringv (tree, tree_path, key, &argv[3]))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 184| \t {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 185| \t g_printerr (\"Unable to set key\\n\");", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "metafile_key_set_value", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 412, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"metafile_key_lookup\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 412, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"data\" = storage returned from \"metafile_key_lookup(metafile, key, 1)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 413, + "column": 3, + "event": "noescape", + "message": "Resource \"data\" is not freed or pointed-to in \"metadata_clear\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 416, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"data\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 414| data->is_list = FALSE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 415| data->value = g_strdup (value);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 416|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 417| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 418| void", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "metafile_key_list_set", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 424, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"metafile_key_lookup\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 424, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"data\" = storage returned from \"metafile_key_lookup(metafile, key, 1)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 425, + "column": 3, + "event": "path", + "message": "Condition \"!data->is_list\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 427, + "column": 7, + "event": "noescape", + "message": "Resource \"data\" is not freed or pointed-to in \"metadata_clear\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 432, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"data\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 430| g_list_free_full (data->values, g_free);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 431| data->values = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 432|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 433| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 434| void", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "metafile_key_list_add", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 441, + "column": 3, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"metafile_key_lookup\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 441, + "column": 3, + "event": "var_assign", + "message": "Assigning: \"data\" = storage returned from \"metafile_key_lookup(metafile, key, 1)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 442, + "column": 3, + "event": "path", + "message": "Condition \"!data->is_list\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 444, + "column": 7, + "event": "noescape", + "message": "Resource \"data\" is not freed or pointed-to in \"metadata_clear\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 449, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"data\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 447| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 448| data->values = g_list_append (data->values, g_strdup (value));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 449|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 450| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 451| static void", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 821, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 819| key = GPOINTER_TO_UINT (g_hash_table_lookup (key_hash, data->key));", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 820| if (data->is_list)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 821|-> \tkey |= KEY_IS_LIST_MASK;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 822| append_uint32 (out, key, NULL);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 823| if (data->is_list)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "meta_builder_write", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 8, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1199, + "column": 3, + "event": "path", + "message": "Condition \"fd == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1202, + "column": 3, + "event": "path", + "message": "Condition \"!write_all_data_and_close(fd, out->str, out->len)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1205, + "column": 3, + "event": "path", + "message": "Condition \"!meta_builder_create_new_journal(filename, random_tag)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1210, + "column": 3, + "event": "path", + "message": "Condition \"rename(tmp_name, filename) == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1221, + "column": 3, + "event": "path", + "message": "Condition \"fd_dir > -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1229, + "column": 3, + "event": "path", + "message": "Condition \"fd2 != -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1237, + "column": 7, + "event": "path", + "message": "Condition \"data != (void *)0xffffffffffffffff\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1239, + "column": 14, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1245, + "column": 4, + "event": "check_return", + "message": "Calling \"g_unlink(old_log)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1243| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1244| \t old_log = meta_builder_get_journal_filename (filename, old_tag);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1245|-> \t g_unlink (old_log);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1246| \t g_free (old_log);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1247| \t}", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "meta_builder_write", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 5, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1199, + "column": 3, + "event": "path", + "message": "Condition \"fd == -1\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1202, + "column": 3, + "event": "path", + "message": "Condition \"!write_all_data_and_close(fd, out->str, out->len)\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1205, + "column": 3, + "event": "path", + "message": "Condition \"!meta_builder_create_new_journal(filename, random_tag)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1206, + "column": 5, + "event": "path", + "message": "Jumping to label \"out\".", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1255, + "column": 3, + "event": "path", + "message": "Condition \"fd != -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metabuilder.c", + "line": 1256, + "column": 5, + "event": "check_return", + "message": "Calling \"g_unlink(tmp_name)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1254| out:", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1255| if (fd != -1)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1256|-> g_unlink (tmp_name);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1257| g_string_free (out, TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1258| g_free (tmp_name);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "meta_tree_init", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 385, + "column": 3, + "event": "path", + "message": "Condition \"fd == -1\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 389, + "column": 7, + "event": "path", + "message": "Condition \"tree->for_write\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 389, + "column": 7, + "event": "path", + "message": "Condition \"!retried\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 395, + "column": 4, + "event": "check_return", + "message": "Calling \"g_mkdir_with_parents(dir, 448)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 393| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 394| \t dir = g_path_get_dirname (tree->filename);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 395|-> \t g_mkdir_with_parents (dir, 0700);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 396| \t g_free (dir);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 397| ", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 832, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 830| guint32 key_id;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 831| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 832|-> key_id = GUINT32_FROM_BE (dataent->key) & ~KEY_IS_LIST_MASK;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 833| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 834| return key->id - key_id;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 1500, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1498| if (ent == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1499| type = META_KEY_TYPE_NONE;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1500|-> else if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1501| type = META_KEY_TYPE_STRINGV;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1502| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 1580, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1578| if (ent == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1579| res = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1580|-> else if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1581| res = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1582| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 1658, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1656| if (ent == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1657| res = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1658|-> else if ((GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1659| res = NULL;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1660| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2065, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2063| ent = &data->keys[i];", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2064| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2065|-> key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2066| if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2067| \ttype = META_KEY_TYPE_STRINGV;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2066, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2064| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2065| key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2066|-> if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2067| \ttype = META_KEY_TYPE_STRINGV;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2068| else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2212, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2210| \t ent = &data->keys[i];", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2211| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2212|-> \t key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2213| \t if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2214| \t type = META_KEY_TYPE_STRINGV;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CPPCHECK_WARNING", + "cwe": 190, + "language": "c/c++", + "tool": "cppcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2213, + "event": "error[integerOverflow]", + "message": "Signed integer overflow for expression '1<<31'.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2211| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2212| \t key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2213|-> \t if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2214| \t type = META_KEY_TYPE_STRINGV;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2215| \t else", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘get_dirname’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2794, + "column": 7, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL ‘path’ where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3324, + "column": 1, + "event": "note", + "message": "(1) entry to ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3281, + "column": 1, + "event": "note", + "message": "(3) entry to ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3290, + "column": 15, + "event": "note", + "message": "(4) calling ‘canonicalize_filename’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2663, + "column": 1, + "event": "note", + "message": "(5) entry to ‘canonicalize_filename’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2669, + "column": 6, + "event": "note", + "message": "(6) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 37, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/giochannel.h", + "line": 36, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 56, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.h", + "line": 26, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 12, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(7) inlined call to ‘g_strdup_inline’ from ‘canonicalize_filename’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2676, + "column": 13, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 7, + "event": "note", + "message": "(8) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(9) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘get_dirname’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2678, + "column": 19, + "event": "note", + "message": "(10) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2680, + "column": 6, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2695, + "column": 10, + "event": "note", + "message": "(12) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3290, + "column": 15, + "event": "note", + "message": "(13) returning to ‘expand_parents’ from ‘canonicalize_filename’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3291, + "column": 12, + "event": "note", + "message": "(14) calling ‘get_dirname’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2788, + "column": 1, + "event": "note", + "message": "(15) entry to ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 6, + "event": "note", + "message": "(16) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2794, + "column": 7, + "event": "note", + "message": "(17) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2794, + "column": 7, + "event": "note", + "message": "(18) argument 2 (‘path’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 6, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/string.h", + "line": 156, + "column": 12, + "event": "note", + "message": "argument 2 of ‘strcmp’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2792| parent = g_path_get_dirname (path);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2793| if (strcmp (parent, \".\") == 0 ||", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2794|-> strcmp (parent, path) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2795| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2796| g_free (parent);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2914, + "column": 17, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2912| gssize rc;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2913| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2914|-> if (len - bytes_read < 100)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2915| \t{", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2916| \t len = len + 4096;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2920, + "column": 22, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2918| \t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2919| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2920|-> rc = read (fd, data + bytes_read,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2921| \t\t len - bytes_read);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2922| if (rc < 0)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2920, + "column": 29, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2918| \t}", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2919| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2920|-> rc = read (fd, data + bytes_read,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2921| \t\t len - bytes_read);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2922| if (rc < 0)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2921, + "column": 10, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2919| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2920| rc = read (fd, data + bytes_read,", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2921|-> \t\t len - bytes_read);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2922| if (rc < 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2923| \t{", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2937, + "column": 13, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2935| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2936| /* zero terminate */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2937|-> if (len - bytes_read < 1)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2938| data = g_realloc (data, bytes_read + 1);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2939| data[bytes_read] = 0;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2953, + "column": 11, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2951| s = strchr (escaped, ' ');", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2952| if (s)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2953|-> len = s - escaped;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2954| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2955| len = strlen (escaped);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2953, + "column": 15, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2951| s = strchr (escaped, ' ');", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2952| if (s)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2953|-> len = s - escaped;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2954| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2955| len = strlen (escaped);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 476, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘mountinfo_unescape’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2972, + "column": 12, + "event": "warning[-Wanalyzer-possible-null-dereference]", + "message": "dereference of possibly-NULL ‘s’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3324, + "column": 1, + "event": "note", + "message": "(1) entry to ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3281, + "column": 1, + "event": "note", + "message": "(3) entry to ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3292, + "column": 6, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3294, + "column": 23, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(6) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3372, + "column": 14, + "event": "note", + "message": "(7) calling ‘get_tree_for_device’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2848, + "column": 1, + "event": "note", + "message": "(8) entry to ‘get_tree_for_device’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2853, + "column": 6, + "event": "note", + "message": "(9) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2881, + "column": 15, + "event": "note", + "message": "(10) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3372, + "column": 14, + "event": "note", + "message": "(11) returning to ‘meta_lookup_cache_lookup_path’ from ‘get_tree_for_device’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3374, + "column": 6, + "event": "note", + "message": "(12) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3376, + "column": 20, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3376, + "column": 20, + "event": "note", + "message": "(14) calling ‘find_mountpoint_for’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3143, + "column": 1, + "event": "note", + "message": "(15) entry to ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3152, + "column": 15, + "event": "note", + "message": "(16) calling ‘get_dirname’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2788, + "column": 1, + "event": "note", + "message": "(17) entry to ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 6, + "event": "note", + "message": "(18) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2794, + "column": 7, + "event": "note", + "message": "(19) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 33, + "event": "note", + "message": "(20) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(21) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3152, + "column": 15, + "event": "note", + "message": "(22) returning to ‘find_mountpoint_for’ from ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3153, + "column": 6, + "event": "note", + "message": "(23) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/lib64/glib-2.0/include/glibconfig.h", + "line": 9, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtypes.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/galloca.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 32, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 18, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(25) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 13, + "event": "note", + "message": "(26) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(27) following ‘true’ branch (when the strings are equal)...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3162, + "column": 12, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3162, + "column": 6, + "event": "note", + "message": "(29) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(30) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3165, + "column": 9, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 314, + "column": 48, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘mountinfo_unescape’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(32) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3166, + "column": 10, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(33) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3171, + "column": 10, + "event": "note", + "message": "(35) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3173, + "column": 11, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3175, + "column": 56, + "event": "note", + "message": "(37) inlined call to ‘get_extra_prefix_for_mount’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3123, + "column": 10, + "event": "note", + "message": "(38) calling ‘find_mountinfo_root_for_mountpoint’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘mountinfo_unescape’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3088, + "column": 1, + "event": "note", + "message": "(39) entry to ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3097, + "column": 3, + "event": "note", + "message": "(40) calling ‘update_mountinfo’ from ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3049, + "column": 1, + "event": "note", + "message": "(41) entry to ‘update_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3064, + "column": 6, + "event": "note", + "message": "(42) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3067, + "column": 6, + "event": "note", + "message": "(43) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3067, + "column": 6, + "event": "note", + "message": "(44) following ‘true’ branch (when ‘first == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3069, + "column": 14, + "event": "note", + "message": "(45) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3073, + "column": 10, + "event": "note", + "message": "(46) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3077, + "column": 3, + "event": "note", + "message": "(47) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3078, + "column": 14, + "event": "note", + "message": "(48) calling ‘read_contents’ from ‘update_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2900, + "column": 1, + "event": "note", + "message": "(49) entry to ‘read_contents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2914, + "column": 10, + "event": "note", + "message": "(50) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2920, + "column": 12, + "event": "note", + "message": "(51) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3078, + "column": 14, + "event": "note", + "message": "(52) returning to ‘update_mountinfo’ from ‘read_contents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3080, + "column": 6, + "event": "note", + "message": "(53) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3082, + "column": 25, + "event": "note", + "message": "(54) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3082, + "column": 25, + "event": "note", + "message": "(55) calling ‘parse_mountinfo’ from ‘update_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2979, + "column": 1, + "event": "note", + "message": "(56) entry to ‘parse_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2989, + "column": 23, + "event": "note", + "message": "(57) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2992, + "column": 14, + "event": "note", + "message": "(58) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2992, + "column": 14, + "event": "note", + "message": "(59) when ‘strchr’ returns non-NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2994, + "column": 10, + "event": "note", + "message": "(60) following ‘true’ branch (when ‘line’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2997, + "column": 18, + "event": "note", + "message": "(61) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2997, + "column": 18, + "event": "note", + "message": "(62) when ‘strchr’ returns non-NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2998, + "column": 14, + "event": "note", + "message": "(63) following ‘true’ branch (when ‘line’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3001, + "column": 22, + "event": "note", + "message": "(64) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3001, + "column": 22, + "event": "note", + "message": "(65) when ‘strchr’ returns non-NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3003, + "column": 18, + "event": "note", + "message": "(66) following ‘true’ branch (when ‘line’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3006, + "column": 26, + "event": "note", + "message": "(67) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3006, + "column": 26, + "event": "note", + "message": "(68) when ‘strchr’ returns NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3016, + "column": 34, + "event": "note", + "message": "(69) calling ‘mountinfo_unescape’ from ‘parse_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2945, + "column": 1, + "event": "note", + "message": "(70) entry to ‘mountinfo_unescape’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2951, + "column": 7, + "event": "note", + "message": "(71) when ‘strchr’ returns NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2952, + "column": 6, + "event": "note", + "message": "(72) following ‘false’ branch (when ‘s’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2955, + "column": 11, + "event": "note", + "message": "(73) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2956, + "column": 9, + "event": "note", + "message": "(74) this call could return NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2959, + "column": 24, + "event": "note", + "message": "(75) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2961, + "column": 10, + "event": "note", + "message": "(76) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2972, + "column": 12, + "event": "note", + "message": "(77) ‘s’ could be NULL: unchecked value from (74)", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2970| else", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2971| \tc = *escaped++;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2972|-> *s++ = c;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2973| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2974| *s = 0;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 476, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2974, + "column": 6, + "event": "warning[-Wanalyzer-possible-null-dereference]", + "message": "dereference of possibly-NULL ‘s’", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3324, + "column": 1, + "event": "note", + "message": "(1) entry to ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3281, + "column": 1, + "event": "note", + "message": "(3) entry to ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3292, + "column": 6, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3294, + "column": 23, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(6) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3372, + "column": 14, + "event": "note", + "message": "(7) calling ‘get_tree_for_device’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2848, + "column": 1, + "event": "note", + "message": "(8) entry to ‘get_tree_for_device’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2853, + "column": 6, + "event": "note", + "message": "(9) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2881, + "column": 15, + "event": "note", + "message": "(10) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3372, + "column": 14, + "event": "note", + "message": "(11) returning to ‘meta_lookup_cache_lookup_path’ from ‘get_tree_for_device’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3374, + "column": 6, + "event": "note", + "message": "(12) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3376, + "column": 20, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3376, + "column": 20, + "event": "note", + "message": "(14) calling ‘find_mountpoint_for’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3143, + "column": 1, + "event": "note", + "message": "(15) entry to ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3152, + "column": 15, + "event": "note", + "message": "(16) calling ‘get_dirname’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2788, + "column": 1, + "event": "note", + "message": "(17) entry to ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 6, + "event": "note", + "message": "(18) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2794, + "column": 7, + "event": "note", + "message": "(19) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 33, + "event": "note", + "message": "(20) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(21) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3152, + "column": 15, + "event": "note", + "message": "(22) returning to ‘find_mountpoint_for’ from ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3153, + "column": 6, + "event": "note", + "message": "(23) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 18, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(25) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 13, + "event": "note", + "message": "(26) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(27) following ‘true’ branch (when the strings are equal)...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3162, + "column": 12, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3162, + "column": 6, + "event": "note", + "message": "(29) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(30) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3165, + "column": 9, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 314, + "column": 48, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘mountinfo_unescape’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(32) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3166, + "column": 10, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(33) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3171, + "column": 10, + "event": "note", + "message": "(35) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3173, + "column": 11, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3175, + "column": 56, + "event": "note", + "message": "(37) inlined call to ‘get_extra_prefix_for_mount’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3123, + "column": 10, + "event": "note", + "message": "(38) calling ‘find_mountinfo_root_for_mountpoint’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘mountinfo_unescape’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3088, + "column": 1, + "event": "note", + "message": "(39) entry to ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3097, + "column": 3, + "event": "note", + "message": "(40) calling ‘update_mountinfo’ from ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3049, + "column": 1, + "event": "note", + "message": "(41) entry to ‘update_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3064, + "column": 6, + "event": "note", + "message": "(42) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3067, + "column": 6, + "event": "note", + "message": "(43) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3067, + "column": 6, + "event": "note", + "message": "(44) following ‘true’ branch (when ‘first == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3069, + "column": 14, + "event": "note", + "message": "(45) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3073, + "column": 10, + "event": "note", + "message": "(46) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3077, + "column": 3, + "event": "note", + "message": "(47) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3078, + "column": 14, + "event": "note", + "message": "(48) calling ‘read_contents’ from ‘update_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2900, + "column": 1, + "event": "note", + "message": "(49) entry to ‘read_contents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2914, + "column": 10, + "event": "note", + "message": "(50) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2920, + "column": 12, + "event": "note", + "message": "(51) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3078, + "column": 14, + "event": "note", + "message": "(52) returning to ‘update_mountinfo’ from ‘read_contents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3080, + "column": 6, + "event": "note", + "message": "(53) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3082, + "column": 25, + "event": "note", + "message": "(54) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3082, + "column": 25, + "event": "note", + "message": "(55) calling ‘parse_mountinfo’ from ‘update_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2979, + "column": 1, + "event": "note", + "message": "(56) entry to ‘parse_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2989, + "column": 23, + "event": "note", + "message": "(57) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2992, + "column": 14, + "event": "note", + "message": "(58) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2992, + "column": 14, + "event": "note", + "message": "(59) when ‘strchr’ returns non-NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2994, + "column": 10, + "event": "note", + "message": "(60) following ‘true’ branch (when ‘line’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2997, + "column": 18, + "event": "note", + "message": "(61) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2997, + "column": 18, + "event": "note", + "message": "(62) when ‘strchr’ returns non-NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2998, + "column": 14, + "event": "note", + "message": "(63) following ‘true’ branch (when ‘line’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3001, + "column": 22, + "event": "note", + "message": "(64) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3001, + "column": 22, + "event": "note", + "message": "(65) when ‘strchr’ returns non-NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3003, + "column": 18, + "event": "note", + "message": "(66) following ‘true’ branch (when ‘line’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3006, + "column": 26, + "event": "note", + "message": "(67) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3006, + "column": 26, + "event": "note", + "message": "(68) when ‘strchr’ returns NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3016, + "column": 34, + "event": "note", + "message": "(69) calling ‘mountinfo_unescape’ from ‘parse_mountinfo’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2945, + "column": 1, + "event": "note", + "message": "(70) entry to ‘mountinfo_unescape’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2951, + "column": 7, + "event": "note", + "message": "(71) when ‘strchr’ returns NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2952, + "column": 6, + "event": "note", + "message": "(72) following ‘false’ branch (when ‘s’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2955, + "column": 11, + "event": "note", + "message": "(73) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2956, + "column": 9, + "event": "note", + "message": "(74) this call could return NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2959, + "column": 24, + "event": "note", + "message": "(75) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2974, + "column": 6, + "event": "note", + "message": "(76) ...to here (77) ‘s’ could be NULL: unchecked value from (74)", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2972| *s++ = c;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2973| }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2974|-> *s = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2975| return res;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2976| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3082, + "column": 25, + "event": "warning[cpp/IntegerOverflow]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3080| if (contents)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3081| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3082|-> mountinfo_roots = parse_mountinfo (contents);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3083| g_free (contents);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3084| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3103, + "column": 15, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL ‘mountpoint’ where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3324, + "column": 1, + "event": "note", + "message": "(1) entry to ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3281, + "column": 1, + "event": "note", + "message": "(3) entry to ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3292, + "column": 6, + "event": "note", + "message": "(4) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3294, + "column": 23, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(6) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3372, + "column": 14, + "event": "note", + "message": "(7) calling ‘get_tree_for_device’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2848, + "column": 1, + "event": "note", + "message": "(8) entry to ‘get_tree_for_device’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2853, + "column": 6, + "event": "note", + "message": "(9) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2881, + "column": 15, + "event": "note", + "message": "(10) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3372, + "column": 14, + "event": "note", + "message": "(11) returning to ‘meta_lookup_cache_lookup_path’ from ‘get_tree_for_device’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3374, + "column": 6, + "event": "note", + "message": "(12) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3376, + "column": 20, + "event": "note", + "message": "(13) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3376, + "column": 20, + "event": "note", + "message": "(14) calling ‘find_mountpoint_for’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3143, + "column": 1, + "event": "note", + "message": "(15) entry to ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3152, + "column": 15, + "event": "note", + "message": "(16) calling ‘get_dirname’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2788, + "column": 1, + "event": "note", + "message": "(17) entry to ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 6, + "event": "note", + "message": "(18) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2794, + "column": 7, + "event": "note", + "message": "(19) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 33, + "event": "note", + "message": "(20) following ‘false’ branch (when the strings are non-equal)...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(21) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3152, + "column": 15, + "event": "note", + "message": "(22) returning to ‘find_mountpoint_for’ from ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3153, + "column": 6, + "event": "note", + "message": "(23) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 18, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(25) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3159, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 13, + "event": "note", + "message": "(26) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 8, + "event": "note", + "message": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(27) following ‘true’ branch (when the strings are equal)...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1244, + "column": 43, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtestutils.h", + "line": 276, + "column": 49, + "event": "note", + "message": "in expansion of macro ‘G_LIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3160, + "column": 3, + "event": "note", + "message": "in expansion of macro ‘g_assert’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3162, + "column": 12, + "event": "note", + "message": "(28) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3162, + "column": 6, + "event": "note", + "message": "(29) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(30) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3165, + "column": 9, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 314, + "column": 48, + "event": "note", + "message": "(31) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(32) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3166, + "column": 10, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(33) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(34) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3171, + "column": 10, + "event": "note", + "message": "(35) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3173, + "column": 11, + "event": "note", + "message": "(36) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3174, + "column": 41, + "event": "note", + "message": "(37) ‘last’ is NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3175, + "column": 56, + "event": "note", + "message": "(38) inlined call to ‘get_extra_prefix_for_mount’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3123, + "column": 10, + "event": "note", + "message": "(39) calling ‘find_mountinfo_root_for_mountpoint’ from ‘find_mountpoint_for’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3088, + "column": 1, + "event": "note", + "message": "(40) entry to ‘find_mountinfo_root_for_mountpoint’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3099, + "column": 6, + "event": "note", + "message": "(41) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "cc1", + "line": 0, + "event": "note", + "message": "(42) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3101, + "column": 49, + "event": "note", + "message": "(43) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3103, + "column": 15, + "event": "note", + "message": "(44) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3103, + "column": 15, + "event": "note", + "message": "(45) argument 2 (‘mountpoint’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/string.h", + "line": 156, + "column": 12, + "event": "note", + "message": "argument 2 of ‘strcmp’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3101| for (i = 0; mountinfo_roots[i].mountpoint != NULL; i++)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3102| \t{", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3103|-> \t if (strcmp (mountinfo_roots[i].mountpoint, mountpoint) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3104| \t {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3105| \t res = g_strdup (mountinfo_roots[i].root);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘path_has_prefix’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3265, + "column": 7, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL ‘path’ where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3324, + "column": 1, + "event": "note", + "message": "(1) entry to ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3281, + "column": 1, + "event": "note", + "message": "(3) entry to ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3290, + "column": 15, + "event": "note", + "message": "(4) calling ‘canonicalize_filename’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2663, + "column": 1, + "event": "note", + "message": "(5) entry to ‘canonicalize_filename’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2669, + "column": 6, + "event": "note", + "message": "(6) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 324, + "column": 21, + "event": "note", + "message": "(7) inlined call to ‘g_strdup_inline’ from ‘canonicalize_filename’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2676, + "column": 13, + "event": "note", + "message": "in expansion of macro ‘g_strdup’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 7, + "event": "note", + "message": "(8) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 311, + "column": 6, + "event": "note", + "message": "(9) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘path_has_prefix’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2678, + "column": 19, + "event": "note", + "message": "(10) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2680, + "column": 6, + "event": "note", + "message": "(11) following ‘false’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2695, + "column": 10, + "event": "note", + "message": "(12) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3290, + "column": 15, + "event": "note", + "message": "(13) returning to ‘expand_parents’ from ‘canonicalize_filename’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3291, + "column": 12, + "event": "note", + "message": "(14) calling ‘get_dirname’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2788, + "column": 1, + "event": "note", + "message": "(15) entry to ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2793, + "column": 6, + "event": "note", + "message": "(16) following ‘true’ branch (when the strings are equal)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 2796, + "column": 7, + "event": "note", + "message": "(17) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3291, + "column": 12, + "event": "note", + "message": "(18) returning to ‘expand_parents’ from ‘get_dirname’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3292, + "column": 6, + "event": "note", + "message": "(19) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3294, + "column": 23, + "event": "note", + "message": "(20) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3355, + "column": 14, + "event": "note", + "message": "(21) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3360, + "column": 6, + "event": "note", + "message": "(22) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3361, + "column": 46, + "event": "note", + "message": "(23) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3361, + "column": 7, + "event": "note", + "message": "(24) calling ‘path_has_prefix’ from ‘meta_lookup_cache_lookup_path’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3255, + "column": 1, + "event": "note", + "message": "(25) entry to ‘path_has_prefix’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3260, + "column": 6, + "event": "note", + "message": "(26) following ‘false’ branch (when ‘prefix’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3263, + "column": 16, + "event": "note", + "message": "(27) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3265, + "column": 7, + "event": "note", + "message": "(28) argument 1 (‘path’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/string.h", + "line": 159, + "column": 12, + "event": "note", + "message": "argument 1 of ‘strncmp’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3263| prefix_len = strlen (prefix);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3264| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3265|-> if (strncmp (path, prefix, prefix_len) == 0 &&", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3266| (prefix_len == 0 || /* empty prefix always matches */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3267| prefix[prefix_len - 1] == '/' || /* last char in prefix was a /, so it must be in path too */", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "meta_lookup_cache_lookup_path", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 4, + "events": [ + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3340, + "column": 7, + "event": "path", + "message": "Condition \"0\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3340, + "column": 7, + "event": "path", + "message": "Condition \"!({...; gapg_temp_newval;})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3340, + "column": 7, + "event": "path", + "message": "Condition \"g_once_init_enter(&homedir_datap)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3340, + "column": 3, + "event": "path", + "message": "Condition \"({...; !({...; gapg_temp_newval;}) && g_once_init_enter(&homedir_datap);})\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/metadata/metatree.c", + "line": 3345, + "column": 7, + "event": "check_return", + "message": "Calling \"stat(g_get_home_dir(), &statbuf)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3343| struct stat statbuf;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3344| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3345|-> g_stat (g_get_home_dir(), &statbuf);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3346| homedir_data_storage.device = statbuf.st_dev;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 3347| e = canonicalize_filename (g_get_home_dir());", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 457, + "column": 50, + "event": "warning[core.NullDereference]", + "message": "Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 453, + "column": 3, + "event": "note", + "message": "Null pointer value stored to 'error'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 454, + "column": 18, + "event": "note", + "message": "Calling 'get_goa_client_sync'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 331, + "column": 7, + "event": "note", + "message": "'?' condition is false", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gthread.h", + "line": 271, + "column": 13, + "event": "note", + "message": "expanded from macro 'g_once_init_enter'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 331, + "column": 7, + "event": "note", + "message": "Assuming the condition is false", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gthread.h", + "line": 272, + "column": 6, + "event": "note", + "message": "expanded from macro 'g_once_init_enter'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 331, + "column": 7, + "event": "note", + "message": "Left side of '&&' is false", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gthread.h", + "line": 272, + "column": 39, + "event": "note", + "message": "expanded from macro 'g_once_init_enter'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 331, + "column": 3, + "event": "note", + "message": "Taking false branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 337, + "column": 7, + "event": "note", + "message": "'_error' is equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 337, + "column": 22, + "event": "note", + "message": "Left side of '&&' is false", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 340, + "column": 3, + "event": "note", + "message": "Returning without writing to '*error'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 454, + "column": 18, + "event": "note", + "message": "Returning from 'get_goa_client_sync'", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 455, + "column": 13, + "event": "note", + "message": "Field 'client' is equal to NULL", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 455, + "column": 3, + "event": "note", + "message": "Taking true branch", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c", + "line": 457, + "column": 50, + "event": "note", + "message": "Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 455| if (self->client == NULL)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 456| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 457|-> g_warning (\"Failed to connect to GOA: %s\", error->message);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 458| g_error_free (error);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 459| return;", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "drive_to_dbus", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 19, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 570, + "column": 3, + "event": "path", + "message": "Condition \"icon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 570, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"icon\" to null implies that \"icon\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 575, + "column": 3, + "event": "path", + "message": "Condition \"symbolic_icon\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 576, + "column": 58, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 592, + "column": 3, + "event": "path", + "message": "Condition \"name == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 596, + "column": 3, + "event": "path", + "message": "Condition \"sort_key == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 600, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 607, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 600, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 619, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 634, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 662, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 660| g_list_free_full (volumes, g_object_unref);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 661| g_free (icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 662|-> g_object_unref (icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 663| g_free (symbolic_icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 664| g_object_unref (symbolic_icon);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "drive_to_dbus", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 19, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 570, + "column": 3, + "event": "path", + "message": "Condition \"icon\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 571, + "column": 40, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 575, + "column": 3, + "event": "path", + "message": "Condition \"symbolic_icon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 575, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"symbolic_icon\" to null implies that \"symbolic_icon\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 592, + "column": 3, + "event": "path", + "message": "Condition \"name == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 596, + "column": 3, + "event": "path", + "message": "Condition \"sort_key == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 600, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 607, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 600, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 619, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 610, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 634, + "column": 5, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 625, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 664, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 662| g_object_unref (icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 663| g_free (symbolic_icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 664|-> g_object_unref (symbolic_icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 665| g_free (name);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 666| g_free (id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "volume_to_dbus", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 23, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 716, + "column": 3, + "event": "path", + "message": "Condition \"icon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 716, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"icon\" to null implies that \"icon\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 721, + "column": 3, + "event": "path", + "message": "Condition \"symbolic_icon\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 722, + "column": 58, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 727, + "column": 3, + "event": "path", + "message": "Condition \"activation_root == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 728, + "column": 35, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 734, + "column": 3, + "event": "path", + "message": "Condition \"drive == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 735, + "column": 29, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 739, + "column": 3, + "event": "path", + "message": "Condition \"mount == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 740, + "column": 29, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 745, + "column": 3, + "event": "path", + "message": "Condition \"name == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 747, + "column": 3, + "event": "path", + "message": "Condition \"uuid == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 751, + "column": 3, + "event": "path", + "message": "Condition \"sort_key == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 759, + "column": 7, + "event": "path", + "message": "Condition \"id_value == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 760, + "column": 9, + "event": "path", + "message": "Continuing loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 771, + "column": 3, + "event": "path", + "message": "Condition \"always_call_mount\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 795, + "column": 3, + "event": "path", + "message": "Condition \"mount != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 798, + "column": 3, + "event": "path", + "message": "Condition \"drive != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 801, + "column": 3, + "event": "path", + "message": "Condition \"activation_root != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 805, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 803| g_free (activation_uri);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 804| g_free (icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 805|-> g_object_unref (icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 806| g_free (symbolic_icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 807| g_object_unref (symbolic_icon);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "volume_to_dbus", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 23, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 716, + "column": 3, + "event": "path", + "message": "Condition \"icon\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 717, + "column": 40, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 721, + "column": 3, + "event": "path", + "message": "Condition \"symbolic_icon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 721, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"symbolic_icon\" to null implies that \"symbolic_icon\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 727, + "column": 3, + "event": "path", + "message": "Condition \"activation_root == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 728, + "column": 35, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 734, + "column": 3, + "event": "path", + "message": "Condition \"drive == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 735, + "column": 29, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 739, + "column": 3, + "event": "path", + "message": "Condition \"mount == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 740, + "column": 29, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 745, + "column": 3, + "event": "path", + "message": "Condition \"name == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 747, + "column": 3, + "event": "path", + "message": "Condition \"uuid == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 751, + "column": 3, + "event": "path", + "message": "Condition \"sort_key == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 759, + "column": 7, + "event": "path", + "message": "Condition \"id_value == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 760, + "column": 9, + "event": "path", + "message": "Continuing loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 755, + "column": 3, + "event": "path", + "message": "Condition \"identifiers[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 771, + "column": 3, + "event": "path", + "message": "Condition \"always_call_mount\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 795, + "column": 3, + "event": "path", + "message": "Condition \"mount != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 798, + "column": 3, + "event": "path", + "message": "Condition \"drive != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 801, + "column": 3, + "event": "path", + "message": "Condition \"activation_root != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 807, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 805| g_object_unref (icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 806| g_free (symbolic_icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 807|-> g_object_unref (symbolic_icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 808| g_free (name);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 809| g_free (id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "mount_to_dbus", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 14, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 853, + "column": 3, + "event": "path", + "message": "Condition \"icon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 853, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"icon\" to null implies that \"icon\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 858, + "column": 3, + "event": "path", + "message": "Condition \"symbolic_icon\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 859, + "column": 58, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 867, + "column": 3, + "event": "path", + "message": "Condition \"volume == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 868, + "column": 30, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 872, + "column": 3, + "event": "path", + "message": "Condition \"name == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 874, + "column": 3, + "event": "path", + "message": "Condition \"uuid == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 878, + "column": 3, + "event": "path", + "message": "Condition \"sort_key == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 883, + "column": 3, + "event": "path", + "message": "Condition \"x_content_types != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 885, + "column": 7, + "event": "path", + "message": "Condition \"x_content_types[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 886, + "column": 87, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 885, + "column": 7, + "event": "path", + "message": "Condition \"x_content_types[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 909, + "column": 3, + "event": "path", + "message": "Condition \"volume != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 915, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 913| g_free (uuid);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 914| g_free (icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 915|-> g_object_unref (icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 916| g_free (symbolic_icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 917| g_object_unref (symbolic_icon);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "FORWARD_NULL", + "cwe": 476, + "function": "mount_to_dbus", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 14, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 853, + "column": 3, + "event": "path", + "message": "Condition \"icon\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 854, + "column": 40, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 858, + "column": 3, + "event": "path", + "message": "Condition \"symbolic_icon\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 858, + "column": 3, + "event": "var_compare_op", + "message": "Comparing \"symbolic_icon\" to null implies that \"symbolic_icon\" might be null.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 867, + "column": 3, + "event": "path", + "message": "Condition \"volume == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 868, + "column": 30, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 872, + "column": 3, + "event": "path", + "message": "Condition \"name == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 874, + "column": 3, + "event": "path", + "message": "Condition \"uuid == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 878, + "column": 3, + "event": "path", + "message": "Condition \"sort_key == NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 883, + "column": 3, + "event": "path", + "message": "Condition \"x_content_types != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 885, + "column": 7, + "event": "path", + "message": "Condition \"x_content_types[n] != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 886, + "column": 87, + "event": "path", + "message": "Jumping back to the beginning of the loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 885, + "column": 7, + "event": "path", + "message": "Condition \"x_content_types[n] != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 909, + "column": 3, + "event": "path", + "message": "Condition \"volume != NULL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 917, + "column": 3, + "event": "var_deref_model", + "message": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 915| g_object_unref (icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 916| g_free (symbolic_icon_data);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 917|-> g_object_unref (symbolic_icon);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 918| g_free (name);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 919| g_free (id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_mount_unmount", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1019, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1024, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_printf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1024, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"mount_id\" = storage returned from \"g_strdup_printf(\"%p\", mount)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1025, + "column": 7, + "event": "noescape", + "message": "Resource \"mount_id\" is not freed or pointed-to in \"strcmp\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1025, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(mount_id, arg_id) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1026, + "column": 9, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1026, + "column": 9, + "event": "leaked_storage", + "message": "Variable \"mount_id\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1024| mount_id = g_strdup_printf (\"%p\", mount);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1025| if (strcmp (mount_id, arg_id) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1026|-> break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1027| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1028| g_free (mount_id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_volume_mount", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1256, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1261, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_printf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1261, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"volume_id\" = storage returned from \"g_strdup_printf(\"%p\", volume)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1262, + "column": 7, + "event": "noescape", + "message": "Resource \"volume_id\" is not freed or pointed-to in \"strcmp\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1262, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(volume_id, arg_id) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1263, + "column": 9, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1263, + "column": 9, + "event": "leaked_storage", + "message": "Variable \"volume_id\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1261| volume_id = g_strdup_printf (\"%p\", volume);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1262| if (strcmp (volume_id, arg_id) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1263|-> break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1264| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1265| g_free (volume_id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_drive_eject", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1363, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1368, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_printf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1368, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1369, + "column": 7, + "event": "noescape", + "message": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1369, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1370, + "column": 9, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1370, + "column": 9, + "event": "leaked_storage", + "message": "Variable \"drive_id\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1368| drive_id = g_strdup_printf (\"%p\", drive);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1369| if (strcmp (drive_id, arg_id) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1370|-> break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1371| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1372| g_free (drive_id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_drive_stop", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1470, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1475, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_printf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1475, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1476, + "column": 7, + "event": "noescape", + "message": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1476, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1477, + "column": 9, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1477, + "column": 9, + "event": "leaked_storage", + "message": "Variable \"drive_id\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1475| drive_id = g_strdup_printf (\"%p\", drive);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1476| if (strcmp (drive_id, arg_id) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1477|-> break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1478| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1479| g_free (drive_id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_drive_start", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1577, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1582, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_printf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1582, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1583, + "column": 7, + "event": "noescape", + "message": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1583, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1584, + "column": 9, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1584, + "column": 9, + "event": "leaked_storage", + "message": "Variable \"drive_id\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1582| drive_id = g_strdup_printf (\"%p\", drive);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1583| if (strcmp (drive_id, arg_id) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1584|-> break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1585| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1586| g_free (drive_id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "handle_drive_poll_for_media", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 6, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1680, + "column": 3, + "event": "path", + "message": "Condition \"l != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1685, + "column": 7, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_printf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1685, + "column": 7, + "event": "var_assign", + "message": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1686, + "column": 7, + "event": "noescape", + "message": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1686, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1687, + "column": 9, + "event": "path", + "message": "Breaking from loop.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1687, + "column": 9, + "event": "leaked_storage", + "message": "Variable \"drive_id\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1685| drive_id = g_strdup_printf (\"%p\", drive);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1686| if (strcmp (drive_id, arg_id) == 0)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1687|-> break;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1688| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1689| g_free (drive_id);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CHECKED_RETURN", + "cwe": 252, + "function": "g_vfs_proxy_volume_monitor_daemon_init", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 1914, + "column": 3, + "event": "check_return", + "message": "Calling \"g_setenv(\"GVFS_REMOTE_VOLUME_MONITOR_IGNORE\", \"1\", 1)\" without checking return value. This library function may fail and return an error code.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1912| * see remote-volume-monitor-module.c", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1913| */", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1914|-> g_setenv (\"GVFS_REMOTE_VOLUME_MONITOR_IGNORE\", \"1\", TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1915| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1916| setlocale (LC_ALL, \"\");", + "verbosity_level": 1 + } + ] + }, + { + "checker": "CLANG_WARNING", + "language": "c/c++", + "tool": "clang", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 2047, + "column": 3, + "event": "warning[deadcode.DeadStores]", + "message": "Value stored to 'name_owner_id' is never read", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c", + "line": 2047, + "column": 3, + "event": "note", + "message": "Value stored to 'name_owner_id' is never read", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2045| guint name_owner_id;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2046| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2047|-> name_owner_id = 0;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2048| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 2049| loop = g_main_loop_new (NULL, FALSE);", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "child_watch_cb", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 3, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c", + "line": 312, + "column": 3, + "event": "path", + "message": "Condition \"g_io_channel_read_to_end(data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c", + "line": 317, + "column": 3, + "event": "alloc_arg", + "message": "\"g_io_channel_read_to_end\" allocates memory that is stored into \"buf\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c", + "line": 317, + "column": 3, + "event": "path", + "message": "Condition \"g_io_channel_read_to_end(data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL\", taking false branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c", + "line": 332, + "column": 1, + "event": "leaked_storage", + "message": "Variable \"buf\" going out of scope leaks the storage it points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 330| g_task_return_boolean (task, TRUE);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 331| g_object_unref (task);", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 332|-> }", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 333| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 334| static gboolean", + "verbosity_level": 1 + } + ] + }, + { + "checker": "RESOURCE_LEAK", + "cwe": 772, + "imp": 1, + "function": "gvfs_udisks2_volume_get_identifier", + "language": "c/c++", + "tool": "coverity", + "key_event_idx": 7, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 898, + "column": 3, + "event": "path", + "message": "Condition \"volume->block != NULL\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 903, + "column": 7, + "event": "path", + "message": "Condition \"strcmp(kind, \"unix-device\") == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 904, + "column": 9, + "event": "alloc_fn", + "message": "Storage is returned from allocation function \"g_strdup_inline\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 904, + "column": 9, + "event": "var_assign", + "message": "Assigning: \"ret\" = storage returned from \"g_strdup_inline(volume->device_file)\".", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 904, + "column": 45, + "event": "path", + "message": "Falling through to end of if statement.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 910, + "column": 3, + "event": "path", + "message": "Condition \"strcmp(kind, \"class\") == 0\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 912, + "column": 7, + "event": "path", + "message": "Condition \"gvfs_udisks2_volume_is_network_class(volume)\", taking true branch.", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c", + "line": 913, + "column": 9, + "event": "overwrite_var", + "message": "Overwriting \"ret\" in \"ret = g_strdup_inline(\"network\")\" leaks the storage that \"ret\" points to.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 911| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 912| if (gvfs_udisks2_volume_is_network_class (volume))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 913|-> ret = g_strdup (\"network\");", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 914| else if (gvfs_udisks2_volume_is_loop_class (volume))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 915| ret = g_strdup (\"loop\");", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 1, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 0, + "event": "scope_hint", + "message": "In function ‘mount_point_matches_mount_entry’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1104, + "column": 13, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1662, + "column": 1, + "event": "note", + "message": "(1) entry to ‘update_mounts’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1702, + "column": 3, + "event": "note", + "message": "(2) calling ‘diff_sorted_lists’ from ‘update_mounts’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 460, + "column": 1, + "event": "note", + "message": "(3) entry to ‘diff_sorted_lists’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 470, + "column": 6, + "event": "note", + "message": "(4) following ‘true’ branch (when ‘unchanged’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 471, + "column": 16, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 496, + "column": 16, + "event": "note", + "message": "(6) following ‘true’ branch (when ‘list1’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 498, + "column": 18, + "event": "note", + "message": "(7) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 501, + "column": 16, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘list2’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 503, + "column": 16, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 501, + "column": 16, + "event": "note", + "message": "(10) following ‘false’ branch (when ‘list2’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 506, + "column": 1, + "event": "note", + "message": "(11) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1702, + "column": 3, + "event": "note", + "message": "(12) returning to ‘update_mounts’ from ‘diff_sorted_lists’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1719, + "column": 21, + "event": "note", + "message": "(13) following ‘true’ branch (when ‘l’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1721, + "column": 24, + "event": "note", + "message": "(14) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1732, + "column": 18, + "event": "note", + "message": "(15) calling ‘find_fstab_volume_for_mount_entry’ from ‘update_mounts’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1120, + "column": 1, + "event": "note", + "message": "(16) entry to ‘find_fstab_volume_for_mount_entry’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1126, + "column": 38, + "event": "note", + "message": "(17) following ‘true’ branch (when ‘l’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1128, + "column": 26, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1129, + "column": 11, + "event": "note", + "message": "(19) calling ‘mount_point_matches_mount_entry’ from ‘find_fstab_volume_for_mount_entry’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1093, + "column": 1, + "event": "note", + "message": "(20) entry to ‘mount_point_matches_mount_entry’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/lib64/glib-2.0/include/glibconfig.h", + "line": 9, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gtypes.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/galloca.h", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 32, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 34, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(21) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1245, + "column": 45, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 190, + "column": 11, + "event": "note", + "message": "in expansion of macro ‘G_UNLIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1103, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘g_str_has_suffix’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstring.h", + "line": 37, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/giochannel.h", + "line": 36, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib.h", + "line": 56, + "event": "included_from", + "message": "Included from here.", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 191, + "column": 21, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1103, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘g_str_has_suffix’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1104, + "column": 13, + "event": "note", + "message": "(23) argument 1 (‘’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "note", + "message": "argument 1 of ‘__builtin_strlen’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1102| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1103| if (g_str_has_suffix (mp_path, \"/\"))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1104|-> mp_path[strlen(mp_path) - 1] = '\\0';", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1105| if (g_str_has_suffix (mp_entry, \"/\"))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1106| mp_entry[strlen(mp_entry) - 1] = '\\0';", + "verbosity_level": 1 + } + ] + }, + { + "checker": "GCC_ANALYZER_WARNING", + "cwe": 688, + "language": "c/c++", + "tool": "gcc-analyzer", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1106, + "column": 14, + "event": "warning[-Wanalyzer-null-argument]", + "message": "use of NULL where non-null expected", + "verbosity_level": 0 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1662, + "column": 1, + "event": "note", + "message": "(1) entry to ‘update_mounts’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1702, + "column": 3, + "event": "note", + "message": "(2) calling ‘diff_sorted_lists’ from ‘update_mounts’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 460, + "column": 1, + "event": "note", + "message": "(3) entry to ‘diff_sorted_lists’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 470, + "column": 6, + "event": "note", + "message": "(4) following ‘true’ branch (when ‘unchanged’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 471, + "column": 16, + "event": "note", + "message": "(5) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 496, + "column": 16, + "event": "note", + "message": "(6) following ‘true’ branch (when ‘list1’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 498, + "column": 18, + "event": "note", + "message": "(7) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 501, + "column": 16, + "event": "note", + "message": "(8) following ‘true’ branch (when ‘list2’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 503, + "column": 16, + "event": "note", + "message": "(9) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 501, + "column": 16, + "event": "note", + "message": "(10) following ‘false’ branch (when ‘list2’ is NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 506, + "column": 1, + "event": "note", + "message": "(11) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1702, + "column": 3, + "event": "note", + "message": "(12) returning to ‘update_mounts’ from ‘diff_sorted_lists’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1719, + "column": 21, + "event": "note", + "message": "(13) following ‘true’ branch (when ‘l’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1721, + "column": 24, + "event": "note", + "message": "(14) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1732, + "column": 18, + "event": "note", + "message": "(15) calling ‘find_fstab_volume_for_mount_entry’ from ‘update_mounts’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1120, + "column": 1, + "event": "note", + "message": "(16) entry to ‘find_fstab_volume_for_mount_entry’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1126, + "column": 38, + "event": "note", + "message": "(17) following ‘true’ branch (when ‘l’ is non-NULL)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1128, + "column": 26, + "event": "note", + "message": "(18) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1129, + "column": 11, + "event": "note", + "message": "(19) calling ‘mount_point_matches_mount_entry’ from ‘find_fstab_volume_for_mount_entry’", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1093, + "column": 1, + "event": "note", + "message": "(20) entry to ‘mount_point_matches_mount_entry’", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 196, + "column": 16, + "event": "note", + "message": "(21) following ‘false’ branch (when ‘__str_len == 0’)...", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1103, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘g_str_has_suffix’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(22) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1245, + "column": 45, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 190, + "column": 11, + "event": "note", + "message": "in expansion of macro ‘G_UNLIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1105, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘g_str_has_suffix’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1237, + "column": 7, + "event": "note", + "message": "(23) following ‘true’ branch...", + "verbosity_level": 2 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1243, + "column": 31, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gmacros.h", + "line": 1245, + "column": 45, + "event": "note", + "message": "in expansion of macro ‘_G_BOOLEAN_EXPR’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 190, + "column": 11, + "event": "note", + "message": "in expansion of macro ‘G_UNLIKELY’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1105, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘g_str_has_suffix’", + "verbosity_level": 1 + }, + { + "file_name": "/usr/include/glib-2.0/glib/gstrfuncs.h", + "line": 191, + "column": 21, + "event": "note", + "message": "(24) ...to here", + "verbosity_level": 2 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1105, + "column": 7, + "event": "note", + "message": "in expansion of macro ‘g_str_has_suffix’", + "verbosity_level": 1 + }, + { + "file_name": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c", + "line": 1106, + "column": 14, + "event": "note", + "message": "(25) argument 1 (‘’) NULL where non-null expected", + "verbosity_level": 2 + }, + { + "file_name": "", + "line": 0, + "event": "note", + "message": "argument 1 of ‘__builtin_strlen’ must be non-null", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1104| mp_path[strlen(mp_path) - 1] = '\\0';", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1105| if (g_str_has_suffix (mp_entry, \"/\"))", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1106|-> mp_entry[strlen(mp_entry) - 1] = '\\0';", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1107| ", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 1108| if (g_strcmp0 (mp_path, mp_entry) != 0)", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/test/benchmark-posix-big-files.c", + "line": 129, + "column": 34, + "event": "note[cpp/IntegerOverflow/test]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 127| if (errno == EINTR)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 128| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 129|-> i -= BUFFER_SIZE - bytes_read;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 130| continue;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 131| }", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SNYK_CODE_WARNING", + "cwe": 190, + "tool": "snyk-code", + "key_event_idx": 0, + "events": [ + { + "file_name": "gvfs-1.54.0/test/benchmark-posix-small-files.c", + "line": 129, + "column": 34, + "event": "note[cpp/IntegerOverflow/test]", + "message": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability.", + "verbosity_level": 0 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 127| if (errno == EINTR)", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 128| {", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 129|-> i -= BUFFER_SIZE - bytes_read;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 130| continue;", + "verbosity_level": 1 + }, + { + "file_name": "", + "line": 0, + "event": "#", + "message": " 131| }", + "verbosity_level": 1 + } + ] + } + ] +} diff --git a/tests/csgrep/0124-sarif-writer-imp-stdout.txt b/tests/csgrep/0124-sarif-writer-imp-stdout.txt new file mode 100644 index 00000000..5960c84f --- /dev/null +++ b/tests/csgrep/0124-sarif-writer-imp-stdout.txt @@ -0,0 +1,82959 @@ +{ + "$schema": "https://json.schemastore.org/sarif-2.1.0.json", + "version": "", + "inlineExternalProperties": [ + { + "externalizedProperties": { + "analyzer-version-clang": "17.0.6", + "analyzer-version-coverity": "2023.12.0", + "analyzer-version-cppcheck": "2.9", + "analyzer-version-gcc": "14.0.1", + "analyzer-version-gcc-analyzer": "14.0.1", + "analyzer-version-shellcheck": "0.9.0", + "analyzer-version-snyk-code": "1.1233.0", + "analyzer-version-unicontrol": "0.0.2", + "cov-compilation-unit-count": 219, + "cov-compilation-unit-ratio": 99, + "cov-lines-processed": 190089, + "cov-time-elapsed-analysis": "00:00:37", + "enabled-plugins": "clang, coverity, cppcheck, gcc, shellcheck, snyk, unicontrol", + "exit-code": 0, + "host": "osh-worker-004.osh-001.prod.iad2.dc.redhat.com", + "known-false-positives": "/usr/share/csmock/known-false-positives.js", + "mock-config": "rhel-10-beta-x86_64", + "project-name": "gvfs-1.54.0-2.el10", + "snyk-scanned-files-coverage": 99, + "snyk-scanned-files-success": 324, + "snyk-scanned-files-total": 326, + "store-results-to": "/tmp/tmpy50j2zwh/gvfs-1.54.0-2.el10.tar.xz", + "time-created": "2024-04-16 09:57:52", + "time-finished": "2024-04-16 10:32:36", + "tool": "csmock", + "tool-args": "'/usr/bin/csmock' '-r' 'rhel-10-beta-x86_64' '-t' 'snyk,cppcheck,gcc,unicontrol,coverity,clang,shellcheck' '-o' '/tmp/tmpy50j2zwh/gvfs-1.54.0-2.el10.tar.xz' '--keep-going' '--use-host-cppcheck' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '/tmp/tmpy50j2zwh/gvfs-1.54.0-2.el10.src.rpm'", + "tool-version": "csmock-3.5.3.20240409.155451.gc41dad7.internal-1.el9" + } + } + ], + "runs": [ + { + "tool": { + "driver": { + "name": "csmock", + "version": "", + "rules": [ + { + "id": "ALLOC_FREE_MISMATCH: free", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-762" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/762.html" + } + }, + { + "id": "ATOMICITY: use", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-667" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/667.html" + } + }, + { + "id": "CHECKED_RETURN: check_return", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-252" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/252.html" + } + }, + { + "id": "CLANG_WARNING: internal warning", + "properties": { + "tags": [ + "clang" + ] + } + }, + { + "id": "CLANG_WARNING: warning[core.NullDereference]", + "properties": { + "tags": [ + "clang" + ] + } + }, + { + "id": "CLANG_WARNING: warning[deadcode.DeadStores]", + "properties": { + "tags": [ + "clang" + ] + } + }, + { + "id": "CLANG_WARNING: warning[unix.Malloc]", + "properties": { + "tags": [ + "clang" + ] + } + }, + { + "id": "COPY_PASTE_ERROR: copy_paste_error", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-398" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/398.html" + } + }, + { + "id": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "tags": [ + "cppcheck" + ], + "cwe": [ + "CWE-190" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/190.html" + } + }, + { + "id": "CPPCHECK_WARNING: internal warning", + "properties": { + "tags": [ + "cppcheck" + ] + } + }, + { + "id": "DC.WEAK_CRYPTO: dont_call", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-327" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/327.html" + } + }, + { + "id": "DEADCODE: dead_error_begin", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-561" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/561.html" + } + }, + { + "id": "DEADCODE: dead_error_line", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-561" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/561.html" + } + }, + { + "id": "FORWARD_NULL: var_deref_model", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-476" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/476.html" + } + }, + { + "id": "FORWARD_NULL: var_deref_op", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-476" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/476.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-double-close]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-1341" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/1341.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-775" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/775.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-use-without-check]", + "properties": { + "tags": [ + "gcc-analyzer" + ] + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-688" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/688.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-dereference]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-476" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/476.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-possible-null-argument]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-688" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/688.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-possible-null-dereference]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-476" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/476.html" + } + }, + { + "id": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-use-of-uninitialized-value]", + "properties": { + "tags": [ + "gcc-analyzer" + ], + "cwe": [ + "CWE-457" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/457.html" + } + }, + { + "id": "INFINITE_LOOP: loop_top", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-835" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/835.html" + } + }, + { + "id": "INTEGER_OVERFLOW: overflow_sink", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-190" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/190.html" + } + }, + { + "id": "INTEGER_OVERFLOW: return_overflow", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-190" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/190.html" + } + }, + { + "id": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-543" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/543.html" + } + }, + { + "id": "MISSING_BREAK: unterminated_case", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-484" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/484.html" + } + }, + { + "id": "MISSING_LOCK: missing_lock", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-667" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/667.html" + } + }, + { + "id": "RESOURCE_LEAK: leaked_handle", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-772" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/772.html" + } + }, + { + "id": "RESOURCE_LEAK: leaked_storage", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-772" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/772.html" + } + }, + { + "id": "RESOURCE_LEAK: overwrite_var", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-772" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/772.html" + } + }, + { + "id": "SNYK_CODE_WARNING: note[cpp/ImproperNullTermination]", + "properties": { + "tags": [ + "snyk-code" + ], + "cwe": [ + "CWE-170" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/170.html" + } + }, + { + "id": "SNYK_CODE_WARNING: note[cpp/IntegerOverflow/test]", + "properties": { + "tags": [ + "snyk-code" + ], + "cwe": [ + "CWE-190" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/190.html" + } + }, + { + "id": "SNYK_CODE_WARNING: warning[cpp/BufferOverflow]", + "properties": { + "tags": [ + "snyk-code" + ], + "cwe": [ + "CWE-122" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/122.html" + } + }, + { + "id": "SNYK_CODE_WARNING: warning[cpp/DerefNull]", + "properties": { + "tags": [ + "snyk-code" + ], + "cwe": [ + "CWE-476" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/476.html" + } + }, + { + "id": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "tags": [ + "snyk-code" + ], + "cwe": [ + "CWE-190" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/190.html" + } + }, + { + "id": "SNYK_CODE_WARNING: warning[cpp/PT]", + "properties": { + "tags": [ + "snyk-code" + ], + "cwe": [ + "CWE-23" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/23.html" + } + }, + { + "id": "TAINTED_STRING: tainted_string", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-20" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/20.html" + } + }, + { + "id": "UNINIT: uninit_use_in_call", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-457" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/457.html" + } + }, + { + "id": "UNUSED_VALUE: assigned_pointer", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-563" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/563.html" + } + }, + { + "id": "USE_AFTER_FREE: deref_after_free", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-416" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/416.html" + } + }, + { + "id": "USE_AFTER_FREE: deref_arg", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-416" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/416.html" + } + }, + { + "id": "USE_AFTER_FREE: pass_freed_arg", + "properties": { + "tags": [ + "coverity" + ], + "cwe": [ + "CWE-416" + ] + }, + "help": { + "text": "https://cwe.mitre.org/data/definitions/416.html" + } + } + ] + } + }, + "results": [ + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-dereference]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 415, + "endLine": 415, + "startColumn": 64, + "endColumn": 64, + "snippet": { + "text": "Problem detected in this context:\n 413| \n 414| mount_info1 = _g_daemon_vfs_get_mount_info_sync (daemon_file1->mount_spec,\n 415|-> daemon_file1->path,\n 416| cancellable,\n 417| &local_error);" + } + } + } + } + ], + "message": { + "text": "dereference of NULL ‘file1’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + } + }, + "message": { + "text": "In function ‘create_proxy_for_file2’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 415, + "endLine": 415, + "startColumn": 64, + "endColumn": 64 + } + }, + "message": { + "text": "dereference of NULL ‘file1’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-dereference]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 1111, + "endLine": 1111, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘g_daemon_file_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 1125, + "endLine": 1125, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(2) inlined call to ‘get_pid_for_file’ from ‘g_daemon_file_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 93, + "endLine": 93, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(3) following ‘true’ branch (when ‘file’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "(4) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + } + }, + "message": { + "text": "In function ‘create_proxy_for_file2’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 1127, + "endLine": 1127, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(5) inlined call to ‘create_proxy_for_file’ from ‘g_daemon_file_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 507, + "endLine": 507, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(6) calling ‘create_proxy_for_file2’ from ‘g_daemon_file_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + } + }, + "message": { + "text": "In function ‘create_proxy_for_file2’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 388, + "endLine": 388, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘create_proxy_for_file2’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 403, + "endLine": 403, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(8) ‘file1’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 405, + "endLine": 405, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(9) following ‘true’ branch (when ‘path1_out’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 406, + "endLine": 406, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(10) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 407, + "endLine": 407, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(11) following ‘false’ branch (when ‘path2_out’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(12) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfile.c" + }, + "region": { + "startLine": 415, + "endLine": 415, + "startColumn": 64, + "endColumn": 64 + } + }, + "message": { + "text": "(13) dereference of NULL ‘file1’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 413| " + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 414| mount_info1 = _g_daemon_vfs_get_mount_info_sync (daemon_file1->mount_spec," + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 415|-> daemon_file1->path," + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 416| cancellable," + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 417| &local_error);" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 189, + "endLine": 189, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 187| {\n 188| g_mutex_lock (&enumerator->next_files_mutex);\n 189|-> if ((enumerator->infos || enumerator->done) && \n 190| enumerator->next_files_mainloop != NULL)\n 191| {" + } + } + } + } + ], + "message": { + "text": "Accessing \"enumerator->done\" without holding lock \"g__infos_lock\". Elsewhere, \"_GDaemonFileEnumerator.done\" is written to with \"g__infos_lock\" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 189, + "endLine": 189, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"enumerator->infos\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 189, + "endLine": 189, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"enumerator->done\" without holding lock \"g__infos_lock\". Elsewhere, \"_GDaemonFileEnumerator.done\" is written to with \"g__infos_lock\" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"g__infos_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GDaemonFileEnumerator.done\" is written to with lock \"g__infos_lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 187| {" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 188| g_mutex_lock (&enumerator->next_files_mutex);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 189|-> if ((enumerator->infos || enumerator->done) && " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 190| enumerator->next_files_mainloop != NULL)" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 191| {" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 517| }\n 518| \n 519|-> if (! daemon->infos && ! daemon->done)\n 520| {\n 521| /* Wait for incoming data */" + } + } + } + } + ], + "message": { + "text": "Accessing \"daemon->done\" without holding lock \"g__infos_lock\". Elsewhere, \"_GDaemonFileEnumerator.done\" is written to with \"g__infos_lock\" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 506, + "endLine": 506, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"daemon->sync_connection == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!daemon->infos\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"daemon->done\" without holding lock \"g__infos_lock\". Elsewhere, \"_GDaemonFileEnumerator.done\" is written to with \"g__infos_lock\" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"g__infos_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GDaemonFileEnumerator.done\" is written to with lock \"g__infos_lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 517| }" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 518| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 519|-> if (! daemon->infos && ! daemon->done)" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 520| {" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 521| /* Wait for incoming data */" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 531, + "endLine": 531, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 529| \t\t\t\t\t\t\t\t\tG_VFS_DBUS_TIMEOUT_MSECS,\n 530| \t\t\t\t\t\t\t\t\tsync_timeout, daemon);\n 531|-> g_main_loop_run (daemon->next_files_mainloop);\n 532| g_main_context_pop_thread_default (daemon->next_files_context);\n 533| " + } + } + } + } + ], + "message": { + "text": "Accessing \"daemon->next_files_mainloop\" without holding lock \"_GDaemonFileEnumerator.next_files_mutex\". Elsewhere, \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with \"_GDaemonFileEnumerator.next_files_mutex\" held 2 out of 2 times (1 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 506, + "endLine": 506, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"daemon->sync_connection == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!daemon->infos\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!daemon->done\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 531, + "endLine": 531, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Accessing \"daemon->next_files_mainloop\" without holding lock \"_GDaemonFileEnumerator.next_files_mutex\". Elsewhere, \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with \"_GDaemonFileEnumerator.next_files_mutex\" held 2 out of 2 times (1 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 522, + "endLine": 522, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GDaemonFileEnumerator.next_files_mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 523, + "endLine": 523, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with lock \"_GDaemonFileEnumerator.next_files_mutex\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 534, + "endLine": 534, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GDaemonFileEnumerator.next_files_mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileenumerator.c" + }, + "region": { + "startLine": 539, + "endLine": 539, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GDaemonFileEnumerator.next_files_mainloop\" is written to with lock \"_GDaemonFileEnumerator.next_files_mutex\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 529| \t\t\t\t\t\t\t\t\tG_VFS_DBUS_TIMEOUT_MSECS," + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 530| \t\t\t\t\t\t\t\t\tsync_timeout, daemon);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 531|-> g_main_loop_run (daemon->next_files_mainloop);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 532| g_main_context_pop_thread_default (daemon->next_files_context);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 533| " + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileinputstream.c" + }, + "region": { + "startLine": 529, + "endLine": 529, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 527| else\n 528| \t{\n 529|-> \t res = 0;\n 530| \t g_assert_not_reached ();\n 531| \t}" + } + } + } + } + ], + "message": { + "text": "Value stored to 'res' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileinputstream.c" + }, + "region": { + "startLine": 529, + "endLine": 529, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Value stored to 'res' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileinputstream.c" + }, + "region": { + "startLine": 529, + "endLine": 529, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Value stored to 'res' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 527| else" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 528| \t{" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 529|-> \t res = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 530| \t g_assert_not_reached ();" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 531| \t}" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileoutputstream.c" + }, + "region": { + "startLine": 480, + "endLine": 480, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 478| else\n 479| \t{\n 480|-> \t res = 0;\n 481| \t g_assert_not_reached ();\n 482| \t}" + } + } + } + } + ], + "message": { + "text": "Value stored to 'res' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileoutputstream.c" + }, + "region": { + "startLine": 480, + "endLine": 480, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Value stored to 'res' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonfileoutputstream.c" + }, + "region": { + "startLine": 480, + "endLine": 480, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Value stored to 'res' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 478| else" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 479| \t{" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 480|-> \t res = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 481| \t g_assert_not_reached ();" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 482| \t}" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1336, + "endLine": 1336, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1334| }\n 1335| \n 1336|-> return res;\n 1337| }\n 1338| " + } + } + } + } + ], + "message": { + "text": "Variable \"cache\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1225, + "endLine": 1225, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_file_info_has_namespace(info, \"metadata\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1229, + "endLine": 1229, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"lstat(filename, &statbuf) != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1246, + "endLine": 1246, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Storage is returned from allocation function \"meta_lookup_cache_new\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1246, + "endLine": 1246, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Assigning: \"cache\" = storage returned from \"meta_lookup_cache_new()\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1247, + "endLine": 1247, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Resource \"cache\" is not freed or pointed-to in \"meta_lookup_cache_lookup_path\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1252, + "endLine": 1252, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!tree\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1263, + "endLine": 1263, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"proxy == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1270, + "endLine": 1270, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1336, + "endLine": 1336, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"cache\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1334| }" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1335| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1336|-> return res;" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1337| }" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1338| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1336, + "endLine": 1336, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1334| }\n 1335| \n 1336|-> return res;\n 1337| }\n 1338| " + } + } + } + } + ], + "message": { + "text": "Variable \"tree_path\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1225, + "endLine": 1225, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_file_info_has_namespace(info, \"metadata\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1229, + "endLine": 1229, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"lstat(filename, &statbuf) != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1247, + "endLine": 1247, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "\"meta_lookup_cache_lookup_path\" allocates memory that is stored into \"tree_path\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1252, + "endLine": 1252, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!tree\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1263, + "endLine": 1263, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"proxy == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1270, + "endLine": 1270, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1336, + "endLine": 1336, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"tree_path\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1334| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1335| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1336|-> return res;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1337| }" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1338| " + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: deref_arg", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1422, + "endLine": 1422, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1420| if (tree2)\n 1421| {\n 1422|-> meta_tree_unref (tree2);\n 1423| g_free (tree_path2);\n 1424| }" + } + } + } + } + ], + "message": { + "text": "Calling \"meta_tree_unref\" dereferences freed pointer \"tree2\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree2\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree1 == tree2\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Equality between \"tree1\" and \"tree2\" implies that they are aliases." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1401, + "endLine": 1401, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"proxy\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1414, + "endLine": 1414, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1416, + "endLine": 1416, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "\"meta_tree_unref\" frees \"tree1\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1420, + "endLine": 1420, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree2\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1422, + "endLine": 1422, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"meta_tree_unref\" dereferences freed pointer \"tree2\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "deref_arg" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1420| if (tree2)" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1421| {" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1422|-> meta_tree_unref (tree2);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1423| g_free (tree_path2);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1424| }" + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: pass_freed_arg", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1422, + "endLine": 1422, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1420| if (tree2)\n 1421| {\n 1422|-> meta_tree_unref (tree2);\n 1423| g_free (tree_path2);\n 1424| }" + } + } + } + } + ], + "message": { + "text": "Passing freed pointer \"tree2\" as an argument to \"meta_tree_unref\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree2\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree1 == tree2\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1398, + "endLine": 1398, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Equality between \"tree1\" and \"tree2\" implies that they are aliases." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1401, + "endLine": 1401, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"proxy\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1414, + "endLine": 1414, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1416, + "endLine": 1416, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "\"meta_tree_unref\" frees \"tree1\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1420, + "endLine": 1420, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tree2\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvfs.c" + }, + "region": { + "startLine": 1422, + "endLine": 1422, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Passing freed pointer \"tree2\" as an argument to \"meta_tree_unref\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "pass_freed_arg" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1420| if (tree2)" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1421| {" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1422|-> meta_tree_unref (tree2);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1423| g_free (tree_path2);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1424| }" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvolumemonitor.c" + }, + "region": { + "startLine": 200, + "endLine": 200, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 198| GMountInfo *info;\n 199| \n 200|-> _the_daemon_volume_monitor = daemon_monitor;\n 201| \n 202| daemon_monitor->mount_tracker = g_mount_tracker_new (_g_daemon_vfs_get_async_bus (), TRUE);" + } + } + } + } + ], + "message": { + "text": "Accessing \"_the_daemon_volume_monitor\" without holding lock \"g__daemon_vm_lock\". Elsewhere, \"_the_daemon_volume_monitor\" is written to with \"g__daemon_vm_lock\" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvolumemonitor.c" + }, + "region": { + "startLine": 200, + "endLine": 200, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"_the_daemon_volume_monitor\" without holding lock \"g__daemon_vm_lock\". Elsewhere, \"_the_daemon_volume_monitor\" is written to with \"g__daemon_vm_lock\" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvolumemonitor.c" + }, + "region": { + "startLine": 245, + "endLine": 245, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"g__daemon_vm_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gdaemonvolumemonitor.c" + }, + "region": { + "startLine": 246, + "endLine": 246, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_the_daemon_volume_monitor\" is written to with lock \"g__daemon_vm_lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 198| GMountInfo *info;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 199| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 200|-> _the_daemon_volume_monitor = daemon_monitor;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 201| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 202| daemon_monitor->mount_tracker = g_mount_tracker_new (_g_daemon_vfs_get_async_bus (), TRUE);" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 337, + "endLine": 337, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 335| g_mutex_lock (&global_mutex);\n 336| \n 337|-> fh = GET_FILE_HANDLE (fi);\n 338| \n 339| /* If the file handle is still valid, its value won't change. If" + } + } + } + } + ], + "message": { + "text": "Accessing \"fi->fh\" without holding lock \"FileHandle.mutex\". Elsewhere, \"fuse_file_info.fh\" is written to with \"FileHandle.mutex\" held 2 out of 2 times (2 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 337, + "endLine": 337, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"fi->fh\" without holding lock \"FileHandle.mutex\". Elsewhere, \"fuse_file_info.fh\" is written to with \"FileHandle.mutex\" held 2 out of 2 times (2 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1071, + "endLine": 1071, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"FileHandle.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1073, + "endLine": 1073, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"fuse_file_info.fh\" is written to with lock \"FileHandle.mutex\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1208, + "endLine": 1208, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"FileHandle.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1210, + "endLine": 1210, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 2 (cont.): \"fuse_file_info.fh\" is written to with lock \"FileHandle.mutex\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 335| g_mutex_lock (&global_mutex);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 336| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 337|-> fh = GET_FILE_HANDLE (fi);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 338| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 339| /* If the file handle is still valid, its value won't change. If" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 567, + "endLine": 567, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 565| \n 566| default:\n 567|-> uint_result = 0;\n 568| g_debug (\"attribute: %s type: %d\\n\", attribute, attribute_type);\n 569| g_assert_not_reached ();" + } + } + } + } + ], + "message": { + "text": "Value stored to 'uint_result' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 567, + "endLine": 567, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Value stored to 'uint_result' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 567, + "endLine": 567, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Value stored to 'uint_result' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 565| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 566| default:" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 567|-> uint_result = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 568| g_debug (\"attribute: %s type: %d\\n\", attribute, attribute_type);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 569| g_assert_not_reached ();" + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: deref_arg", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1340, + "endLine": 1340, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 1338| g_debug (\"read_stream: wanted %zd bytes, but got %zd.\\n\", output_buf_size, n_bytes_read);\n 1339| \n 1340|-> result = -errno_from_error (error);\n 1341| g_error_free (error);\n 1342| }" + } + } + } + } + ], + "message": { + "text": "Calling \"errno_from_error\" dereferences freed pointer \"error\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1272, + "endLine": 1272, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"offset != fh->pos\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1274, + "endLine": 1274, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_seekable_can_seek((GSeekable *)(void *)input_stream)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1280, + "endLine": 1280, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"g_seekable_seek((GSeekable *)(void *)input_stream, offset, G_SEEK_SET, NULL, &error)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1287, + "endLine": 1287, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "\"g_error_free\" frees \"error\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1289, + "endLine": 1289, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1324, + "endLine": 1324, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"result == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1336, + "endLine": 1336, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"error != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1340, + "endLine": 1340, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Calling \"errno_from_error\" dereferences freed pointer \"error\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "deref_arg" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1338| g_debug (\"read_stream: wanted %zd bytes, but got %zd.\\n\", output_buf_size, n_bytes_read);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1339| " + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1340|-> result = -errno_from_error (error);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1341| g_error_free (error);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1342| }" + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: deref_arg", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1461, + "endLine": 1461, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 1459| if (error)\n 1460| {\n 1461|-> result = -errno_from_error (error);\n 1462| g_error_free (error);\n 1463| }" + } + } + } + } + ], + "message": { + "text": "Calling \"errno_from_error\" dereferences freed pointer \"error\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1423, + "endLine": 1423, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!is_append\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1423, + "endLine": 1423, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"offset != fh->pos\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1425, + "endLine": 1425, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_seekable_can_seek((GSeekable *)(void *)output_stream)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1429, + "endLine": 1429, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"g_seekable_seek((GSeekable *)(void *)output_stream, offset, G_SEEK_SET, NULL, &error)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1436, + "endLine": 1436, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "\"g_error_free\" frees \"error\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1438, + "endLine": 1438, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1447, + "endLine": 1447, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"result == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1459, + "endLine": 1459, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"error\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1461, + "endLine": 1461, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Calling \"errno_from_error\" dereferences freed pointer \"error\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "deref_arg" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1459| if (error)" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1460| {" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1461|-> result = -errno_from_error (error);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1462| g_error_free (error);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1463| }" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1681, + "endLine": 1681, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1679| }\n 1680| \n 1681|-> g_file_move (old_file, new_file, flags, NULL, NULL, NULL, &error);\n 1682| \n 1683| if (error)" + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_move(old_file, new_file, flags, NULL, NULL, NULL, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1660, + "endLine": 1660, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"vfs_flags & (2U /* 1 << 1 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1663, + "endLine": 1663, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"vfs_flags & (1U /* 1 << 0 */)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1671, + "endLine": 1671, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"old_file\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1671, + "endLine": 1671, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"new_file\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1675, + "endLine": 1675, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"fh\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1681, + "endLine": 1681, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"g_file_move(old_file, new_file, flags, NULL, NULL, NULL, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1679| }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1680| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1681|-> g_file_move (old_file, new_file, flags, NULL, NULL, NULL, &error);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1682| " + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1683| if (error)" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1956, + "endLine": 1956, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 1954| result = pad_file (fh, size - current_size, current_size);\n 1955| if (result == 0)\n 1956|-> g_seekable_seek (G_SEEKABLE (fh->stream), orig_pos, G_SEEK_SET, NULL, &error);\n 1957| }\n 1958| }" + } + } + } + } + ], + "message": { + "text": "Calling \"g_seekable_seek\" without checking return value (as is done elsewhere 13 out of 14 times)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1921, + "endLine": 1921, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_seekable_can_truncate((GSeekable *)(void *)fh->stream)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1925, + "endLine": 1925, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"size == 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1943, + "endLine": 1943, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"file_handle_get_size(fh, ¤t_size)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1945, + "endLine": 1945, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"current_size == size\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1949, + "endLine": 1949, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "Condition \"current_size < size\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1949, + "endLine": 1949, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "Condition \"g_seekable_can_seek((GSeekable *)(void *)fh->stream)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1955, + "endLine": 1955, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"result == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1956, + "endLine": 1956, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Calling \"g_seekable_seek\" without checking return value (as is done elsewhere 13 out of 14 times)." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsfusedaemon.c" + }, + "region": { + "startLine": 1429, + "endLine": 1429, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Example 1: \"g_seekable_seek((GSeekable *)(void *)output_stream, offset, G_SEEK_SET, NULL, &error)\" has its value checked in \"g_seekable_seek((GSeekable *)(void *)output_stream, offset, G_SEEK_SET, NULL, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 476, + "endLine": 476, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: \"g_seekable_seek(seekable, offset, type, job->cancellable, &error)\" has its value checked in \"g_seekable_seek(seekable, offset, type, job->cancellable, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 3: \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\" has its value checked in \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3107, + "endLine": 3107, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 4: \"g_seekable_seek(stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\" has its value checked in \"g_seekable_seek(stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 5: \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\" has its value checked in \"g_seekable_seek((GSeekable *)(void *)stream, offset, type, ((GVfsJob *)(void *)job)->cancellable, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1954| result = pad_file (fh, size - current_size, current_size);" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1955| if (result == 0)" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1956|-> g_seekable_seek (G_SEEKABLE (fh->stream), orig_pos, G_SEEK_SET, NULL, &error);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1957| }" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1958| }" + } + } + ] + }, + { + "ruleId": "ALLOC_FREE_MISMATCH: free", + "properties": { + "cwe": "CWE-762" + }, + "locations": [ + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 203, + "endLine": 203, + "startColumn": 8, + "endColumn": 8, + "snippet": { + "text": "Problem detected in this context:\n 201| \t if (host_end == NULL)\n 202| \t {\n 203|-> \t g_vfs_decoded_uri_free (decoded);\n 204| \t return NULL;\n 205| \t }" + } + } + } + } + ], + "message": { + "text": "Calling \"g_vfs_decoded_uri_free\" frees \"decoded->userinfo\" using \"g_free\" but it should have been freed using \"free\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 73, + "endLine": 73, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!((g_ascii_table[(guchar)*p] & G_ASCII_ALPHA) != 0)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"c == ':'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 81, + "endLine": 81, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"in < p - 1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 95, + "endLine": 95, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"in < p - 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 101, + "endLine": 101, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"query_start\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 121, + "endLine": 121, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"fragment_start\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 141, + "endLine": 141, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"hier_part_start[0] == '/'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 141, + "endLine": 141, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"hier_part_start[1] == '/'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 152, + "endLine": 152, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"authority_end == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 164, + "endLine": 164, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"userinfo_end\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 180, + "endLine": 180, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"p != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Allocation of memory which must be freed using \"free\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Assigning: \"decoded->userinfo\" = \"g_uri_unescape_segment(userinfo_start, userinfo_end, NULL)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 184, + "endLine": 184, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Condition \"decoded->userinfo == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 189, + "endLine": 189, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 195, + "endLine": 195, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"*host_start == '['\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 201, + "endLine": 201, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Condition \"host_end == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 203, + "endLine": 203, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Calling \"g_vfs_decoded_uri_free\" frees \"decoded->userinfo\" using \"g_free\" but it should have been freed using \"free\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "free" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 201| \t if (host_end == NULL)" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 202| \t {" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 203|-> \t g_vfs_decoded_uri_free (decoded);" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 204| \t return NULL;" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 205| \t }" + } + } + ] + }, + { + "ruleId": "ALLOC_FREE_MISMATCH: free", + "properties": { + "cwe": "CWE-762" + }, + "locations": [ + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 269| if (decoded->path == NULL)\n 270| {\n 271|-> g_vfs_decoded_uri_free (decoded);\n 272| return NULL;\n 273| }" + } + } + } + } + ], + "message": { + "text": "Calling \"g_vfs_decoded_uri_free\" frees \"decoded->userinfo\" using \"g_free\" but it should have been freed using \"free\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 73, + "endLine": 73, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!((g_ascii_table[(guchar)*p] & G_ASCII_ALPHA) != 0)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"c == ':'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 81, + "endLine": 81, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"in < p - 1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 95, + "endLine": 95, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"in < p - 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 101, + "endLine": 101, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"query_start\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 121, + "endLine": 121, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"fragment_start\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 141, + "endLine": 141, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"hier_part_start[0] == '/'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 141, + "endLine": 141, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"hier_part_start[1] == '/'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 152, + "endLine": 152, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"authority_end == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 164, + "endLine": 164, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"userinfo_end\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 180, + "endLine": 180, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"p != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Allocation of memory which must be freed using \"free\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Assigning: \"decoded->userinfo\" = \"g_uri_unescape_segment(userinfo_start, userinfo_end, NULL)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 184, + "endLine": 184, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Condition \"decoded->userinfo == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 189, + "endLine": 189, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 195, + "endLine": 195, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"*host_start == '['\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 201, + "endLine": 201, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Condition \"host_end == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 213, + "endLine": 213, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"*s == '/'\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 216, + "endLine": 216, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 230, + "endLine": 230, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 236, + "endLine": 236, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"port_start\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 259, + "endLine": 259, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"*host_start == '['\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 260, + "endLine": 260, + "startColumn": 70, + "endColumn": 70 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 269, + "endLine": 269, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"decoded->path == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/client/gvfsuriutils.c" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"g_vfs_decoded_uri_free\" frees \"decoded->userinfo\" using \"g_free\" but it should have been freed using \"free\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "free" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 269| if (decoded->path == NULL)" + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 270| {" + } + }, + { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 271|-> g_vfs_decoded_uri_free (decoded);" + } + }, + { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 272| return NULL;" + } + }, + { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 273| }" + } + } + ] + }, + { + "ruleId": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "cwe": "CWE-543" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 97, + "endLine": 97, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 95| if (unique_spec == NULL)\n 96| {\n 97|-> spec->is_unique = TRUE;\n 98| g_hash_table_insert (unique_hash, spec, spec);\n 99| unique_spec = spec;" + } + } + } + } + ], + "message": { + "text": "Thread1 sets \"is_unique\" to a new value. Now the two threads have an inconsistent view of \"is_unique\" and updates to fields correlated with \"is_unique\" may be lost." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 85, + "endLine": 85, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread1 uses the value read from field \"is_unique\" in the condition \"spec->is_unique\". It sees that the condition is false. Control is switched to Thread2." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_checks_field" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 85, + "endLine": 85, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread2 uses the value read from field \"is_unique\" in the condition \"spec->is_unique\". It sees that the condition is false." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_checks_field" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 88, + "endLine": 88, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread2 acquires lock \"g__unique_hash_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_acquires_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 97, + "endLine": 97, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread2 sets \"is_unique\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_modifies_field" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 88, + "endLine": 88, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread1 acquires lock \"g__unique_hash_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_acquires_lock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 97, + "endLine": 97, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread1 sets \"is_unique\" to a new value. Now the two threads have an inconsistent view of \"is_unique\" and updates to fields correlated with \"is_unique\" may be lost." + } + }, + "nestingLevel": 0, + "kinds": [ + "thread1_overwrites_value_in_field" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 85, + "endLine": 85, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Guard the modification of \"is_unique\" and the read used to decide whether to modify \"is_unique\" with the same set of locks." + } + }, + "nestingLevel": 1, + "kinds": [ + "use_same_locks_for_read_and_modify" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 95| if (unique_spec == NULL)" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 96| {" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 97|-> spec->is_unique = TRUE;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 98| g_hash_table_insert (unique_hash, spec, spec);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 99| unique_spec = spec;" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 545, + "endLine": 545, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 543| mount_prefix);\n 544| \n 545|-> return mount_spec;\n 546| \n 547| fail:" + } + } + } + } + ], + "message": { + "text": "Variable \"mount_prefix\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"str != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_14;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 496, + "endLine": 496, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"colon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 505, + "endLine": 505, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"kv_pairs[i] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 510, + "endLine": 510, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_strv_length(tokens) != 2\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 523, + "endLine": 523, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(tokens[0], \"prefix\") == 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 535, + "endLine": 535, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 505, + "endLine": 505, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"kv_pairs[i] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 538, + "endLine": 538, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"mount_prefix == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 539, + "endLine": 539, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_inline\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 539, + "endLine": 539, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Assigning: \"mount_prefix\" = storage returned from \"g_strdup_inline(\"/\")\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 542, + "endLine": 542, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Resource \"mount_prefix\" is not freed or pointed-to in \"g_mount_spec_new_from_data\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmountspec.c" + }, + "region": { + "startLine": 545, + "endLine": 545, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"mount_prefix\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 543| mount_prefix);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 544| " + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 545|-> return mount_spec;" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 546| " + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 547| fail:" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmounttracker.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 271| g_mutex_clear (&tracker->lock);\n 272| \n 273|-> g_list_free_full (tracker->mounts, (GDestroyNotify)g_mount_info_unref);\n 274| \n 275| g_clear_object (&tracker->proxy);" + } + } + } + } + ], + "message": { + "text": "Accessing \"tracker->mounts\" without holding lock \"_GMountTracker.lock\". Elsewhere, \"_GMountTracker.mounts\" is written to with \"_GMountTracker.lock\" held 2 out of 2 times." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmounttracker.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"tracker->mounts\" without holding lock \"_GMountTracker.lock\". Elsewhere, \"_GMountTracker.mounts\" is written to with \"_GMountTracker.lock\" held 2 out of 2 times." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmounttracker.c" + }, + "region": { + "startLine": 391, + "endLine": 391, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GMountTracker.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmounttracker.c" + }, + "region": { + "startLine": 406, + "endLine": 406, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GMountTracker.mounts\" is written to with lock \"_GMountTracker.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmounttracker.c" + }, + "region": { + "startLine": 420, + "endLine": 420, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GMountTracker.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gmounttracker.c" + }, + "region": { + "startLine": 433, + "endLine": 433, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GMountTracker.mounts\" is written to with lock \"_GMountTracker.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 271| g_mutex_clear (&tracker->lock);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 272| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 273|-> g_list_free_full (tracker->mounts, (GDestroyNotify)g_mount_info_unref);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 274| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 275| g_clear_object (&tracker->proxy);" + } + } + ] + }, + { + "ruleId": "UNINIT: uninit_use_in_call", + "properties": { + "cwe": "CWE-457" + }, + "level": "error", + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 203| gpointer value_p;\n 204| \n 205|-> if (g_file_info_get_attribute_data (info, attributes[i], &type, &value_p, &status))\n 206| g_variant_builder_add_value (&builder, \n 207| _g_dbus_append_file_attribute (attributes[i], status, type, value_p));" + } + } + } + } + ], + "message": { + "text": "Using uninitialized value \"value_p\" when calling \"g_file_info_get_attribute_data\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 199, + "endLine": 199, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"attributes[i] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_file_info_get_attribute_data(info, attributes[i], &type, &value_p, &status)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 199, + "endLine": 199, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"attributes[i] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_file_info_get_attribute_data(info, attributes[i], &type, &value_p, &status)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 199, + "endLine": 199, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"attributes[i] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 203, + "endLine": 203, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Declaring variable \"value_p\" without initializer." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_decl" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdaemonprotocol.c" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Using uninitialized value \"value_p\" when calling \"g_file_info_get_attribute_data\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "uninit_use_in_call" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 203| gpointer value_p;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 204| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 205|-> if (g_file_info_get_attribute_data (info, attributes[i], &type, &value_p, &status))" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 206| g_variant_builder_add_value (&builder, " + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 207| _g_dbus_append_file_attribute (attributes[i], status, type, value_p));" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 321, + "endLine": 321, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 319| \n 320| out:\n 321|-> return ret;\n 322| }\n 323| " + } + } + } + } + ], + "message": { + "text": "Variable \"service_name\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 308, + "endLine": 308, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"g_vfs_decode_dns_sd_triple\" allocates memory that is stored into \"service_name\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 308, + "endLine": 308, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!g_vfs_decode_dns_sd_triple(encoded_triple, &service_name, &service_type, &domain, NULL)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 313, + "endLine": 313, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping to label \"out\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 321, + "endLine": 321, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"service_name\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 319| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 320| out:" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 321|-> return ret;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 322| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 323| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 321, + "endLine": 321, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 319| \n 320| out:\n 321|-> return ret;\n 322| }\n 323| " + } + } + } + } + ], + "message": { + "text": "Variable \"service_type\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 308, + "endLine": 308, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"g_vfs_decode_dns_sd_triple\" allocates memory that is stored into \"service_type\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 308, + "endLine": 308, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!g_vfs_decode_dns_sd_triple(encoded_triple, &service_name, &service_type, &domain, NULL)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 313, + "endLine": 313, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping to label \"out\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsdnssdutils.c" + }, + "region": { + "startLine": 321, + "endLine": 321, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"service_type\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 319| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 320| out:" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 321|-> return ret;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 322| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 323| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 45, + "endLine": 45, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 43| g_data_output_stream_put_uint16 (out, len,\n 44| \t\t\t\t NULL, NULL);\n 45|-> g_data_output_stream_put_string (out, str, NULL, NULL);\n 46| }\n 47| " + } + } + } + } + ], + "message": { + "text": "Calling \"g_data_output_stream_put_string(out, str, NULL, NULL)\" without checking return value. It wraps a library function that may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 36, + "endLine": 36, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"len > 65535UL /* (guint16)65535 */\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 45, + "endLine": 45, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_data_output_stream_put_string(out, str, NULL, NULL)\" without checking return value. It wraps a library function that may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 43| g_data_output_stream_put_uint16 (out, len," + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 44| \t\t\t\t NULL, NULL);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 45|-> g_data_output_stream_put_string (out, str, NULL, NULL);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 46| }" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 47| " + } + } + ] + }, + { + "ruleId": "TAINTED_STRING: tainted_string", + "properties": { + "cwe": "CWE-20" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 237, + "endLine": 237, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 235| \tcase G_FILE_ATTRIBUTE_TYPE_STRING:\n 236| \t str = read_string (in);\n 237|-> \t g_file_info_set_attribute_string (info, attr, str);\n 238| \t g_free (str);\n 239| \t break;" + } + } + } + } + ], + "message": { + "text": "Passing tainted string \"*str\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 227, + "endLine": 227, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"i < num_attrs\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 233, + "endLine": 233, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_STRING\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 236, + "endLine": 236, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Function \"read_string\" returns tainted data." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_return_value" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 236, + "endLine": 236, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Assigning: \"str\" = \"read_string(in)\", which taints \"str\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 237, + "endLine": 237, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Passing tainted string \"*str\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data." + } + }, + "nestingLevel": 0, + "kinds": [ + "tainted_string" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 237, + "endLine": 237, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters." + } + }, + "nestingLevel": 1, + "kinds": [ + "remediation" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 235| \tcase G_FILE_ATTRIBUTE_TYPE_STRING:" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 236| \t str = read_string (in);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 237|-> \t g_file_info_set_attribute_string (info, attr, str);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 238| \t g_free (str);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 239| \t break;" + } + } + ] + }, + { + "ruleId": "TAINTED_STRING: tainted_string", + "properties": { + "cwe": "CWE-20" + }, + "locations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 242, + "endLine": 242, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 240| \tcase G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:\n 241| \t str = read_string (in);\n 242|-> \t g_file_info_set_attribute_byte_string (info, attr, str);\n 243| \t g_free (str);\n 244| \t break;" + } + } + } + } + ], + "message": { + "text": "Passing tainted string \"*str\" to \"g_file_info_set_attribute_byte_string\", which cannot accept tainted data." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 227, + "endLine": 227, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"i < num_attrs\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 233, + "endLine": 233, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_STRING\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 239, + "endLine": 239, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 312, + "endLine": 312, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 227, + "endLine": 227, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"i < num_attrs\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 233, + "endLine": 233, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_STRING\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 239, + "endLine": 239, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 312, + "endLine": 312, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 227, + "endLine": 227, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"i < num_attrs\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 233, + "endLine": 233, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Switch case value \"G_FILE_ATTRIBUTE_TYPE_BYTE_STRING\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 241, + "endLine": 241, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Function \"read_string\" returns tainted data." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_return_value" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 241, + "endLine": 241, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Assigning: \"str\" = \"read_string(in)\", which taints \"str\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 242, + "endLine": 242, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Passing tainted string \"*str\" to \"g_file_info_set_attribute_byte_string\", which cannot accept tainted data." + } + }, + "nestingLevel": 0, + "kinds": [ + "tainted_string" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/common/gvfsfileinfo.c" + }, + "region": { + "startLine": 242, + "endLine": 242, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters." + } + }, + "nestingLevel": 1, + "kinds": [ + "remediation" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 240| \tcase G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 241| \t str = read_string (in);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 242|-> \t g_file_info_set_attribute_byte_string (info, attr, str);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 243| \t g_free (str);" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 244| \t break;" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: internal warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + } + } + } + ], + "message": { + "text": "child 21367 timed out after 30s" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + } + }, + "message": { + "text": "child 21367 timed out after 30s" + } + }, + "nestingLevel": 0, + "kinds": [ + "internal warning" + ] + } + ] + } + ] + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 44, + "endLine": 44, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 42| state->carry_buf_len = 0;\n 43| \n 44|-> linelen = 0;\n 45| \n 46| /* strip leading whitespace */" + } + } + } + } + ], + "message": { + "text": "Value stored to 'linelen' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 44, + "endLine": 44, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'linelen' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 44, + "endLine": 44, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'linelen' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 42| state->carry_buf_len = 0;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 43| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 44|-> linelen = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 45| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 46| /* strip leading whitespace */" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 170, + "endLine": 170, + "startColumn": 29, + "endColumn": 29, + "snippet": { + "text": "Problem detected in this context:\n 168| {\n 169| state->parsed_one = 1;\n 170|-> state->lstyle = lstyle = 'E';\n 171| \n 172| p = &(line[linelen_sans_wsp]);" + } + } + } + } + ], + "message": { + "text": "Although the value stored to 'lstyle' is used in the enclosing expression, the value is never actually read from 'lstyle'" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 170, + "endLine": 170, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Although the value stored to 'lstyle' is used in the enclosing expression, the value is never actually read from 'lstyle'" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 170, + "endLine": 170, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Although the value stored to 'lstyle' is used in the enclosing expression, the value is never actually read from 'lstyle'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 168| {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 169| state->parsed_one = 1;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 170|-> state->lstyle = lstyle = 'E';" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 171| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 172| p = &(line[linelen_sans_wsp]);" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/PT]", + "properties": { + "cwe": "CWE-23" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 1782, + "endLine": 1782, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 1780| if (strcmp(argv[1], \"-\") == 0)\n 1781| need_close_in = 0;\n 1782|-> else if ((infile = fopen(argv[1], \"r\")) != ((FILE *)0))\n 1783| need_close_in = 1;\n 1784| else" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into fopen, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitary files." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 1782, + "endLine": 1782, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into fopen, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitary files." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/PT]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1780| if (strcmp(argv[1], \"-\") == 0)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1781| need_close_in = 0;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1782|-> else if ((infile = fopen(argv[1], \"r\")) != ((FILE *)0))" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1783| need_close_in = 1;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1784| else" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/PT]", + "properties": { + "cwe": "CWE-23" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 1792, + "endLine": 1792, + "startColumn": 25, + "endColumn": 25, + "snippet": { + "text": "Problem detected in this context:\n 1790| if (strcmp(argv[2], \"-\") == 0)\n 1791| need_close_out = 0;\n 1792|-> else if ((outfile = fopen(argv[2], \"w\")) != ((FILE *)0))\n 1793| need_close_out = 1;\n 1794| else" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into fopen, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write to arbitary files." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/ParseFTPList.c" + }, + "region": { + "startLine": 1792, + "endLine": 1792, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into fopen, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write to arbitary files." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/PT]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1790| if (strcmp(argv[2], \"-\") == 0)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1791| need_close_out = 0;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1792|-> else if ((outfile = fopen(argv[2], \"w\")) != ((FILE *)0))" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1793| need_close_out = 1;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1794| else" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/daemon-main-generic.c" + }, + "region": { + "startLine": 34, + "endLine": 34, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 32| {\n 33| #ifndef BACKEND_USES_GVFS\n 34|-> g_setenv (\"GIO_USE_VFS\", \"local\", TRUE);\n 35| #endif\n 36| #ifdef BACKEND_PRE_SETUP_FUNC" + } + } + } + } + ], + "message": { + "text": "Calling \"g_setenv(\"GIO_USE_VFS\", \"local\", 1)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/daemon-main-generic.c" + }, + "region": { + "startLine": 34, + "endLine": 34, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_setenv(\"GIO_USE_VFS\", \"local\", 1)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 32| {" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 33| #ifndef BACKEND_USES_GVFS" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 34|-> g_setenv (\"GIO_USE_VFS\", \"local\", TRUE);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 35| #endif" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 36| #ifdef BACKEND_PRE_SETUP_FUNC" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/daemon-main.c" + }, + "region": { + "startLine": 383, + "endLine": 383, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 381| loop = g_main_loop_new (NULL, FALSE);\n 382| \n 383|-> name_owner_id = 0;\n 384| /* We want to own *some* name on the org.gtk.vfs.* namespace so that\n 385| filtering for us works from a sandbox */" + } + } + } + } + ], + "message": { + "text": "Value stored to 'name_owner_id' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/daemon-main.c" + }, + "region": { + "startLine": 383, + "endLine": 383, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'name_owner_id' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/daemon-main.c" + }, + "region": { + "startLine": 383, + "endLine": 383, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'name_owner_id' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 381| loop = g_main_loop_new (NULL, FALSE);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 382| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 383|-> name_owner_id = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 384| /* We want to own *some* name on the org.gtk.vfs.* namespace so that" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 385| filtering for us works from a sandbox */" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 762, + "endLine": 762, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 760| \n 761| file = g_file_new_for_path (filename);\n 762|-> g_file_set_attribute (file, attribute, type, value_p, flags,\n 763| job->cancellable, &error);\n 764| g_object_unref (file);" + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_set_attribute(file, attribute, type, value_p, flags, job->cancellable, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 762, + "endLine": 762, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_file_set_attribute(file, attribute, type, value_p, flags, job->cancellable, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 760| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 761| file = g_file_new_for_path (filename);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 762|-> g_file_set_attribute (file, attribute, type, value_p, flags," + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 763| job->cancellable, &error);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 764| g_object_unref (file);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 808, + "endLine": 808, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 806| src_file = g_file_new_for_path (source);\n 807| dst_file = g_file_new_for_path (destination);\n 808|-> g_file_move (src_file, dst_file, flags,\n 809| job->cancellable,\n 810| progress_callback, progress_callback_data," + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 803, + "endLine": 803, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 808, + "endLine": 808, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 806| src_file = g_file_new_for_path (source);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 807| dst_file = g_file_new_for_path (destination);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 808|-> g_file_move (src_file, dst_file, flags," + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 809| job->cancellable," + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 810| progress_callback, progress_callback_data," + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 838, + "endLine": 838, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 836| src_file = g_file_new_for_path (source);\n 837| dst_file = g_file_new_for_path (destination);\n 838|-> g_file_copy (src_file, dst_file, flags,\n 839| job->cancellable,\n 840| progress_callback, progress_callback_data," + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 833, + "endLine": 833, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 838, + "endLine": 838, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 836| src_file = g_file_new_for_path (source);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 837| dst_file = g_file_new_for_path (destination);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 838|-> g_file_copy (src_file, dst_file, flags," + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 839| job->cancellable," + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 840| progress_callback, progress_callback_data," + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 882, + "endLine": 882, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 880| \n 881| if (remove_source)\n 882|-> g_file_move (src_file, dst_file, flags, job->cancellable,\n 883| progress_callback, progress_callback_data, &error);\n 884| else" + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 867, + "endLine": 867, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!(flags & G_FILE_COPY_ALL_METADATA)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 875, + "endLine": 875, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 881, + "endLine": 881, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 882, + "endLine": 882, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 880| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 881| if (remove_source)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 882|-> g_file_move (src_file, dst_file, flags, job->cancellable," + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 883| progress_callback, progress_callback_data, &error);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 884| else" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 885, + "endLine": 885, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 883| progress_callback, progress_callback_data, &error);\n 884| else\n 885|-> g_file_copy (src_file, dst_file, flags, job->cancellable,\n 886| progress_callback, progress_callback_data, &error);\n 887| " + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 867, + "endLine": 867, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!(flags & G_FILE_COPY_ALL_METADATA)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 875, + "endLine": 875, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 881, + "endLine": 881, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"remove_source\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 885, + "endLine": 885, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 883| progress_callback, progress_callback_data, &error);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 884| else" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 885|-> g_file_copy (src_file, dst_file, flags, job->cancellable," + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 886| progress_callback, progress_callback_data, &error);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 887| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 916, + "endLine": 916, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 914| \n 915| if (remove_source)\n 916|-> g_file_move (src_file, dst_file, flags, job->cancellable,\n 917| progress_callback, progress_callback_data, &error);\n 918| else" + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 909, + "endLine": 909, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 915, + "endLine": 915, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 916, + "endLine": 916, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"g_file_move(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 914| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 915| if (remove_source)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 916|-> g_file_move (src_file, dst_file, flags, job->cancellable," + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 917| progress_callback, progress_callback_data, &error);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 918| else" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 919, + "endLine": 919, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 917| progress_callback, progress_callback_data, &error);\n 918| else\n 919|-> g_file_copy (src_file, dst_file, flags, job->cancellable,\n 920| progress_callback, progress_callback_data, &error);\n 921| " + } + } + } + } + ], + "message": { + "text": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 909, + "endLine": 909, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!check_permission(self, job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 915, + "endLine": 915, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"remove_source\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 919, + "endLine": 919, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"g_file_copy(src_file, dst_file, flags, job->cancellable, progress_callback, progress_callback_data, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 917| progress_callback, progress_callback_data, &error);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 918| else" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 919|-> g_file_copy (src_file, dst_file, flags, job->cancellable," + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 920| progress_callback, progress_callback_data, &error);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 921| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1147, + "endLine": 1147, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1145| \n 1146| acquire_caps (uid);\n 1147|-> g_setenv (\"DBUS_SESSION_BUS_ADDRESS\", session_address, TRUE);\n 1148| \n 1149| if (runtime_dir)" + } + } + } + } + ], + "message": { + "text": "Calling \"g_setenv(\"DBUS_SESSION_BUS_ADDRESS\", session_address, 1)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1127, + "endLine": 1127, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"error != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1135, + "endLine": 1135, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"pkexec_uid == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1143, + "endLine": 1143, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"*__errno_location() != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1147, + "endLine": 1147, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_setenv(\"DBUS_SESSION_BUS_ADDRESS\", session_address, 1)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1145| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1146| acquire_caps (uid);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1147|-> g_setenv (\"DBUS_SESSION_BUS_ADDRESS\", session_address, TRUE);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1148| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1149| if (runtime_dir)" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1150, + "endLine": 1150, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 1148| \n 1149| if (runtime_dir)\n 1150|-> g_setenv (\"XDG_RUNTIME_DIR\", runtime_dir, TRUE);\n 1151| }" + } + } + } + } + ], + "message": { + "text": "Calling \"g_setenv(\"XDG_RUNTIME_DIR\", runtime_dir, 1)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1127, + "endLine": 1127, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"error != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1135, + "endLine": 1135, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"pkexec_uid == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1143, + "endLine": 1143, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"*__errno_location() != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1149, + "endLine": 1149, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"runtime_dir\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendadmin.c" + }, + "region": { + "startLine": 1150, + "endLine": 1150, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"g_setenv(\"XDG_RUNTIME_DIR\", runtime_dir, 1)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1148| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1149| if (runtime_dir)" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1150|-> g_setenv (\"XDG_RUNTIME_DIR\", runtime_dir, TRUE);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1151| }" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 129, + "endLine": 129, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 127| {\n 128| if (node->owned_file)\n 129|-> g_unlink (node->backing_file);\n 130| g_free (node->backing_file);\n 131| }" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(node->backing_file)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 123, + "endLine": 123, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case value \"VIRTUAL_NODE_FILE\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 126, + "endLine": 126, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"node->backing_file != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 128, + "endLine": 128, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node->owned_file\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 129, + "endLine": 129, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Calling \"g_unlink(node->backing_file)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 127| {" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 128| if (node->owned_file)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 129|-> g_unlink (node->backing_file);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 130| g_free (node->backing_file);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 131| }" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-dereference]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 16, + "endColumn": 16, + "snippet": { + "text": "Problem detected in this context:\n 181| VirtualNode *node;\n 182| \n 183|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);\n 184| \n 185| for (l = dir->children; l != NULL; l = l->next)" + } + } + } + } + ], + "message": { + "text": "dereference of NULL ‘dir’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/lib64/glib-2.0/include/glibconfig.h" + }, + "region": { + "startLine": 9, + "endLine": 9 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtypes.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/galloca.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 32, + "endLine": 32 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 35, + "endLine": 35 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + } + }, + "message": { + "text": "In function ‘virtual_dir_lookup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "dereference of NULL ‘dir’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-dereference]" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 768, + "endLine": 768, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘try_set_display_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 777, + "endLine": 777, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(2) calling ‘virtual_node_lookup’ from ‘try_set_display_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 197, + "endLine": 197, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 37, + "endLine": 37 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/giochannel.h" + }, + "region": { + "startLine": 36, + "endLine": 36 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 56, + "endLine": 56 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(4) inlined call to ‘g_strdup_inline’ from ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(5) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + } + }, + "message": { + "text": "In function ‘virtual_dir_lookup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(6) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(7) following ‘true’ branch (when ‘parent’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(8) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(9) ‘dir’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(10) following ‘false’ branch (when ‘copy’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 245, + "endLine": 245, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(11) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 777, + "endLine": 777, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(12) returning to ‘try_set_display_name’ from ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 778, + "endLine": 778, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(13) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 786, + "endLine": 786, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(14) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 786, + "endLine": 786, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(15) ‘dir’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 786, + "endLine": 786, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(16) calling ‘virtual_dir_lookup’ from ‘try_set_display_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 177, + "endLine": 177, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(17) entry to ‘virtual_dir_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(18) dereference of NULL ‘dir’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 181| VirtualNode *node;" + } + }, + { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 182| " + } + }, + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 183|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);" + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 184| " + } + }, + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 185| for (l = dir->children; l != NULL; l = l->next)" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[core.NullDereference]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 271| VirtualNode *node)\n 272| {\n 273|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);\n 274| \n 275| dir->children = g_list_remove (dir->children, node);" + } + } + } + } + ], + "message": { + "text": "Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dir')" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dir')" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[core.NullDereference]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 969, + "endLine": 969, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming 'source_node' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 969, + "endLine": 969, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 977, + "endLine": 977, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Calling 'virtual_node_lookup'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "'parent' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Null pointer value stored to 'dest_dir'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Assuming 'copy' is equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Loop condition is false. Execution continues on line 245" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 977, + "endLine": 977, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Returning from 'virtual_node_lookup'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 978, + "endLine": 978, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "'dest_node' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 978, + "endLine": 978, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 980, + "endLine": 980, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assuming the condition is true" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 980, + "endLine": 980, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 982, + "endLine": 982, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Assuming field 'type' is not equal to VIRTUAL_NODE_DIRECTORY" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 982, + "endLine": 982, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "Passing null pointer value via 1st parameter 'dir'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Calling 'virtual_unlink'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dir')" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 59, + "endColumn": 59 + } + }, + "message": { + "text": "expanded from macro 'g_assert'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 59, + "endColumn": 59 + } + }, + "message": { + "text": "expanded from macro 'G_LIKELY'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 66, + "endColumn": 66 + } + }, + "message": { + "text": "expanded from macro '_G_BOOLEAN_EXPR'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "expanded from macro '_G_BOOLEAN_EXPR_IMPL'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 271| VirtualNode *node)" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 272| {" + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 273|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);" + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 274| " + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 275| dir->children = g_list_remove (dir->children, node);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-dereference]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 16, + "endColumn": 16, + "snippet": { + "text": "Problem detected in this context:\n 271| VirtualNode *node)\n 272| {\n 273|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);\n 274| \n 275| dir->children = g_list_remove (dir->children, node);" + } + } + } + } + ], + "message": { + "text": "dereference of NULL ‘dir’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + } + }, + "message": { + "text": "In function ‘virtual_unlink’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "dereference of NULL ‘dir’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-dereference]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 956, + "endLine": 956, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘try_move’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 968, + "endLine": 968, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(2) calling ‘virtual_node_lookup’ from ‘try_move’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 197, + "endLine": 197, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘true’ branch (when ‘parent’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(6) ‘source_dir’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 968, + "endLine": 968, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(7) returning to ‘try_move’ from ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 969, + "endLine": 969, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(8) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 977, + "endLine": 977, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 977, + "endLine": 977, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(10) calling ‘virtual_node_lookup’ from ‘try_move’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 197, + "endLine": 197, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(11) entry to ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(12) inlined call to ‘g_strdup_inline’ from ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(13) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + } + }, + "message": { + "text": "In function ‘virtual_unlink’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(14) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(15) following ‘true’ branch (when ‘parent’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(17) ‘source_dir’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(18) following ‘false’ branch (when ‘copy’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 245, + "endLine": 245, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(19) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 977, + "endLine": 977, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(20) returning to ‘try_move’ from ‘virtual_node_lookup’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 978, + "endLine": 978, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(21) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 980, + "endLine": 980, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 980, + "endLine": 980, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(23) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 982, + "endLine": 982, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 982, + "endLine": 982, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(25) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) ‘source_dir’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) calling ‘virtual_unlink’ from ‘try_move’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 270, + "endLine": 270, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(29) entry to ‘virtual_unlink’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(30) dereference of NULL ‘dir’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 271| VirtualNode *node)" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 272| {" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 273|-> g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);" + } + }, + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 274| " + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 275| dir->children = g_list_remove (dir->children, node);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 314, + "endLine": 314, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 312| }\n 313| close (fd);\n 314|-> g_unlink (template);\n 315| \n 316| file->backing_file = template;" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(template)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 289, + "endLine": 289, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"dir->type == VIRTUAL_NODE_DIRECTORY\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 289, + "endLine": 289, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 289, + "endLine": 289, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_17;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 289, + "endLine": 289, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 291, + "endLine": 291, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"virtual_dir_lookup(dir, name) != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 296, + "endLine": 296, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"backing_file != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"fd < 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 314, + "endLine": 314, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"g_unlink(template)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 312| }" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 313| close (fd);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 314|-> g_unlink (template);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 315| " + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 316| file->backing_file = template;" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 757| }\n 758| \n 759|-> file = virtual_mkdir (dir, basename);\n 760| g_free (basename);\n 761| " + } + } + } + } + ], + "message": { + "text": "Value stored to 'file' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'file' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'file' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 757| }" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 758| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 759|-> file = virtual_mkdir (dir, basename);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 760| g_free (basename);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 761| " + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 932, + "endLine": 932, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 930| {\n 931| basename = g_path_get_basename (destination);\n 932|-> file = virtual_create (G_VFS_BACKEND_BURN (backend),\n 933| dir,\n 934| basename," + } + } + } + } + ], + "message": { + "text": "Value stored to 'file' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 932, + "endLine": 932, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Value stored to 'file' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 932, + "endLine": 932, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Value stored to 'file' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 930| {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 931| basename = g_path_get_basename (destination);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 932|-> file = virtual_create (G_VFS_BACKEND_BURN (backend)," + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 933| dir," + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 934| basename," + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[core.NullDereference]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1018, + "endLine": 1018, + "startColumn": 45, + "endColumn": 45, + "snippet": { + "text": "Problem detected in this context:\n 1016| if (source_dir != dest_dir)\n 1017| {\n 1018|-> source_dir->children = g_list_remove (source_dir->children, source_node);\n 1019| dest_dir->children = g_list_append (dest_dir->children, source_node);\n 1020| }" + } + } + } + } + ], + "message": { + "text": "Access to field 'children' results in a dereference of a null pointer (loaded from variable 'source_dir')" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1018, + "endLine": 1018, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "Access to field 'children' results in a dereference of a null pointer (loaded from variable 'source_dir')" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[core.NullDereference]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 968, + "endLine": 968, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "Calling 'virtual_node_lookup'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "'parent' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 207, + "endLine": 207, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Null pointer value stored to 'source_dir'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Assuming 'copy' is equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Loop condition is false. Execution continues on line 245" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 968, + "endLine": 968, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "Returning from 'virtual_node_lookup'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 969, + "endLine": 969, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming 'source_node' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 969, + "endLine": 969, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 978, + "endLine": 978, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming 'dest_node' is equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 978, + "endLine": 978, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1005, + "endLine": 1005, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "Assuming 'dest_dir' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1005, + "endLine": 1005, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1016, + "endLine": 1016, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "'source_dir' is not equal to 'dest_dir'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1016, + "endLine": 1016, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendburn.c" + }, + "region": { + "startLine": 1018, + "endLine": 1018, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "Access to field 'children' results in a dereference of a null pointer (loaded from variable 'source_dir')" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1016| if (source_dir != dest_dir)" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1017| {" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1018|-> source_dir->children = g_list_remove (source_dir->children, source_node);" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1019| dest_dir->children = g_list_append (dest_dir->children, source_node);" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1020| }" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 317, + "endLine": 317, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 315| if (gudev_device != NULL)\n 316| cdda_backend->size = g_udev_device_get_sysfs_attr_as_uint64 (gudev_device, \"size\") * 512;\n 317|-> g_object_unref (gudev_device);\n 318| \n 319| cdda_backend->drive = cdio_cddap_identify (cdda_backend->device_path, 0, NULL);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"gudev_device\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 286, + "endLine": 286, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"cdda_backend->gudev_client == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 302, + "endLine": 302, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"host == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 315, + "endLine": 315, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gudev_device != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 315, + "endLine": 315, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"gudev_device\" to null implies that \"gudev_device\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 317, + "endLine": 317, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"gudev_device\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 315| if (gudev_device != NULL)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 316| cdda_backend->size = g_udev_device_get_sysfs_attr_as_uint64 (gudev_device, \"size\") * 512;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 317|-> g_object_unref (gudev_device);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 318| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 319| cdda_backend->drive = cdio_cddap_identify (cdda_backend->device_path, 0, NULL);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 444, + "endLine": 444, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 442| }\n 443| \n 444|-> return -1;\n 445| }\n 446| " + } + } + } + } + ], + "message": { + "text": "Variable \"basename\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 436, + "endLine": 436, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_path_get_basename\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 436, + "endLine": 436, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"basename\" = storage returned from \"g_path_get_basename(filename)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 437, + "endLine": 437, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Resource \"basename\" is not freed or pointed-to in \"sscanf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 437, + "endLine": 437, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sscanf(basename, \"Track %d.wav\", &n) == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 444, + "endLine": 444, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"basename\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 442| }" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 443| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 444|-> return -1;" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 445| }" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 446| " + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_line", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 513| /* ensure even length and include room for the chunk */\n 514| if (artist != NULL)\n 515|-> artist_len = 2 * ((strlen (artist) + 2) / 2) + 8;\n 516| if (title != NULL)\n 517| title_len = 2 * ((strlen (title) + 2) / 2) + 8;" + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"artist_len = 2UL * ((strlen...\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 506, + "endLine": 506, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"artist\" = \"NULL\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assignment" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 514, + "endLine": 514, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "At condition \"artist != NULL\", the value of \"artist\" must be \"NULL\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "null" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 514, + "endLine": 514, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The condition \"artist != NULL\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"artist_len = 2UL * ((strlen...\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_line" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Local variable \"artist\" is assigned only once, to a constant value, making it effectively constant throughout its scope. If this is not the intent, examine the logic to see if there is a missing assignment that would make \"artist\" not remain constant." + } + }, + "nestingLevel": 1, + "kinds": [ + "effectively_constant" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 513| /* ensure even length and include room for the chunk */" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 514| if (artist != NULL)" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 515|-> artist_len = 2 * ((strlen (artist) + 2) / 2) + 8;" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 516| if (title != NULL)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 517| title_len = 2 * ((strlen (title) + 2) / 2) + 8;" + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_line", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 517, + "endLine": 517, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 515| artist_len = 2 * ((strlen (artist) + 2) / 2) + 8;\n 516| if (title != NULL)\n 517|-> title_len = 2 * ((strlen (title) + 2) / 2) + 8;\n 518| software_len = 2 * ((strlen (software) + 2) / 2) + 8;\n 519| " + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"title_len = 2UL * ((strlen(...\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 507, + "endLine": 507, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"title\" = \"NULL\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assignment" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 516, + "endLine": 516, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "At condition \"title != NULL\", the value of \"title\" must be \"NULL\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "null" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 516, + "endLine": 516, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The condition \"title != NULL\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 517, + "endLine": 517, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"title_len = 2UL * ((strlen(...\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_line" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 517, + "endLine": 517, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Local variable \"title\" is assigned only once, to a constant value, making it effectively constant throughout its scope. If this is not the intent, examine the logic to see if there is a missing assignment that would make \"title\" not remain constant." + } + }, + "nestingLevel": 1, + "kinds": [ + "effectively_constant" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 515| artist_len = 2 * ((strlen (artist) + 2) / 2) + 8;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 516| if (title != NULL)" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 517|-> title_len = 2 * ((strlen (title) + 2) / 2) + 8;" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 518| software_len = 2 * ((strlen (software) + 2) / 2) + 8;" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 519| " + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: note[cpp/ImproperNullTermination]", + "properties": { + "cwe": "CWE-170" + }, + "level": "note", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 560, + "endLine": 560, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 558| var = artist_len - 8;\n 559| memcpy (ptr + 4, &var, 4);\n 560|-> strncpy (ptr + 8, artist, artist_len); \n 561| ptr += artist_len;\n 562| }" + } + } + } + } + ], + "message": { + "text": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 560, + "endLine": 560, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "note[cpp/ImproperNullTermination]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 558| var = artist_len - 8;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 559| memcpy (ptr + 4, &var, 4);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 560|-> strncpy (ptr + 8, artist, artist_len); " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 561| ptr += artist_len;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 562| }" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: note[cpp/ImproperNullTermination]", + "properties": { + "cwe": "CWE-170" + }, + "level": "note", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 569, + "endLine": 569, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 567| var = title_len - 8;\n 568| memcpy (ptr + 4, &var, 4);\n 569|-> strncpy (ptr + 8, title, title_len); \n 570| ptr += title_len;\n 571| }" + } + } + } + } + ], + "message": { + "text": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 569, + "endLine": 569, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "note[cpp/ImproperNullTermination]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 567| var = title_len - 8;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 568| memcpy (ptr + 4, &var, 4);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 569|-> strncpy (ptr + 8, title, title_len); " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 570| ptr += title_len;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 571| }" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: note[cpp/ImproperNullTermination]", + "properties": { + "cwe": "CWE-170" + }, + "level": "note", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 577, + "endLine": 577, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 575| var = software_len - 8;\n 576| memcpy (ptr + 4, &var, 4);\n 577|-> strncpy (ptr + 8, software, software_len); \n 578| ptr += software_len;\n 579| " + } + } + } + } + ], + "message": { + "text": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 577, + "endLine": 577, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Potential improperly null terminated input from a pointer to an input buffer flows into strncpy, where it is used as a string. This may result in an information disclosure or buffer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "note[cpp/ImproperNullTermination]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 575| var = software_len - 8;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 576| memcpy (ptr + 4, &var, 4);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 577|-> strncpy (ptr + 8, software, software_len); " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 578| ptr += software_len;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 579| " + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 581, + "endLine": 581, + "startColumn": 35, + "endColumn": 35, + "snippet": { + "text": "Problem detected in this context:\n 579| \n 580| memcpy (ptr, \"data\", 4); ptr += 4;\n 581|-> memcpy (ptr, &content_size, 4); ptr += 4;\n 582| \n 583| g_free (artist);" + } + } + } + } + ], + "message": { + "text": "Value stored to 'ptr' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 581, + "endLine": 581, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "Value stored to 'ptr' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 581, + "endLine": 581, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "Value stored to 'ptr' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 579| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 580| memcpy (ptr, \"data\", 4); ptr += 4;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 581|-> memcpy (ptr, &content_size, 4); ptr += 4;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 582| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 583| g_free (artist);" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 670| if (read_handle->cursor >= read_handle->size)\n 671| {\n 672|-> skip_bytes = 0;\n 673| bytes_read = 0;\n 674| readbuf = NULL;" + } + } + } + } + ], + "message": { + "text": "Value stored to 'skip_bytes' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Value stored to 'skip_bytes' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Value stored to 'skip_bytes' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 670| if (read_handle->cursor >= read_handle->size)" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 671| {" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 672|-> skip_bytes = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 673| bytes_read = 0;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 674| readbuf = NULL;" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 738, + "endLine": 738, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 736| \n 737| read_handle->cursor += bytes_to_copy;\n 738|-> cursor_in_stream = read_handle->cursor - read_handle->header_size;\n 739| \n 740| " + } + } + } + } + ], + "message": { + "text": "Value stored to 'cursor_in_stream' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 738, + "endLine": 738, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'cursor_in_stream' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcdda.c" + }, + "region": { + "startLine": 738, + "endLine": 738, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'cursor_in_stream' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 736| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 737| read_handle->cursor += bytes_to_copy;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 738|-> cursor_in_stream = read_handle->cursor - read_handle->header_size;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 739| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 740| " + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 420, + "endLine": 420, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 418| }\n 419| else\n 420|-> g_object_unref (volume);\n 421| \n 422| g_object_unref (mount);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"volume\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 343, + "endLine": 343, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 348, + "endLine": 348, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"volumes != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 350, + "endLine": 350, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"ll != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 360, + "endLine": 360, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 350, + "endLine": 350, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"ll != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 362, + "endLine": 362, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 377, + "endLine": 377, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 343, + "endLine": 343, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 382, + "endLine": 382, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 386, + "endLine": 386, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"drive == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 395, + "endLine": 395, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 400, + "endLine": 400, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 382, + "endLine": 382, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 405, + "endLine": 405, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"volume == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!g_mount_is_shadowed(mount)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 418, + "endLine": 418, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 423, + "endLine": 423, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 405, + "endLine": 405, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"volume == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Comparing \"volume\" to null implies that \"volume\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!g_mount_is_shadowed(mount)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 420, + "endLine": 420, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Passing null pointer \"volume\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 418| }" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 419| else" + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 420|-> g_object_unref (volume);" + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 421| " + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 422| g_object_unref (mount);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 17, + "endColumn": 17, + "snippet": { + "text": "Problem detected in this context:\n 993| else\n 994| report_no_media_error (G_VFS_JOB (job));\n 995|-> }\n 996| }\n 997| else" + } + } + } + } + ], + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 955, + "endLine": 955, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"file == &root\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 959, + "endLine": 959, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"file != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 961, + "endLine": 961, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"file->volume\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 974, + "endLine": 974, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "Condition \"file->drive\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 976, + "endLine": 976, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!g_drive_has_media(file->drive)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 978, + "endLine": 978, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Condition \"!g_drive_can_poll_for_media(file->drive)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 984, + "endLine": 984, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_slice_alloc\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 984, + "endLine": 984, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "Assigning: \"__p\" = storage returned from \"g_slice_alloc(__s)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 984, + "endLine": 984, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "Resource \"__p\" is not freed or pointed-to in \"memset\". [Note: The source code implementation of the function has been overridden by a builtin model.]" + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 984, + "endLine": 984, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "Variable \"__p\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 1, + "kinds": [ + "leaked_storage" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 984, + "endLine": 984, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "Assigning: \"data\" = \"({...; __p;})\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 988, + "endLine": 988, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "Condition \"!g_drive_is_media_check_automatic(file->drive)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendcomputer.c" + }, + "region": { + "startLine": 995, + "endLine": 995, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 993| else" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 994| report_no_media_error (G_VFS_JOB (job));" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 995|-> }" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 996| }" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 997| else" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: overwrite_var", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1144, + "endLine": 1144, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 1142| char *ptr;\n 1143| \n 1144|-> mime_type = g_strdup (text);\n 1145| \n 1146| /* Ignore parameters of the content type */" + } + } + } + } + ], + "message": { + "text": "Overwriting \"mime_type\" in \"mime_type = g_strdup_inline(text)\" leaks the storage that \"mime_type\" points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1089, + "endLine": 1089, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"basename\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1100, + "endLine": 1100, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"xml_node_iter_next(&iter)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1104, + "endLine": 1104, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"status >= 200\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1104, + "endLine": 1104, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"status < 300\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1107, + "endLine": 1107, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"node\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!node_is_element(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_is_empty(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1114, + "endLine": 1114, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"resourcetype\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1117, + "endLine": 1117, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1173, + "endLine": 1173, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1107, + "endLine": 1107, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"node\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!node_is_element(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_is_empty(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1114, + "endLine": 1114, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"resourcetype\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1117, + "endLine": 1117, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1173, + "endLine": 1173, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1107, + "endLine": 1107, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"node\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!node_is_element(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_is_empty(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1114, + "endLine": 1114, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"resourcetype\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1118, + "endLine": 1118, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"displayname\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1118, + "endLine": 1118, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"text\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1122, + "endLine": 1122, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1173, + "endLine": 1173, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1107, + "endLine": 1107, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"node\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!node_is_element(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_is_empty(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1114, + "endLine": 1114, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"resourcetype\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1118, + "endLine": 1118, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"displayname\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1123, + "endLine": 1123, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"getetag\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1128, + "endLine": 1128, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"creationdate\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1140, + "endLine": 1140, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"getcontenttype\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1144, + "endLine": 1144, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_inline\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1144, + "endLine": 1144, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Assigning: \"mime_type\" = storage returned from \"g_strdup_inline(text)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1147, + "endLine": 1147, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Resource \"mime_type\" is not freed or pointed-to in \"strchr\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1148, + "endLine": 1148, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Condition \"ptr\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1154, + "endLine": 1154, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1173, + "endLine": 1173, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1107, + "endLine": 1107, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"node\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!node_is_element(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1109, + "endLine": 1109, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_is_empty(node)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1114, + "endLine": 1114, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"resourcetype\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1118, + "endLine": 1118, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"displayname\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1118, + "endLine": 1118, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"text\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1123, + "endLine": 1123, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"getetag\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1128, + "endLine": 1128, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"creationdate\")\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1140, + "endLine": 1140, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "Condition \"node_has_name(node, \"getcontenttype\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 1144, + "endLine": 1144, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Overwriting \"mime_type\" in \"mime_type = g_strdup_inline(text)\" leaks the storage that \"mime_type\" points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "overwrite_var" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1142| char *ptr;" + } + }, + { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1143| " + } + }, + { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1144|-> mime_type = g_strdup (text);" + } + }, + { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1145| " + } + }, + { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1146| /* Ignore parameters of the content type */" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3941, + "endLine": 3941, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 3939| {\n 3940| if (handle->op_job->remove_source)\n 3941|-> g_unlink (handle->op_job->local_path);\n 3942| \n 3943| g_vfs_job_succeeded (handle->job);" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3934, + "endLine": 3934, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_vfs_job_is_finished(handle->job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3936, + "endLine": 3936, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"soup_message_get_status(msg) >= 200\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3936, + "endLine": 3936, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"soup_message_get_status(msg) < 300\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3940, + "endLine": 3940, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"handle->op_job->remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddav.c" + }, + "region": { + "startLine": 3941, + "endLine": 3941, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3939| {" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3940| if (handle->op_job->remove_source)" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3941|-> g_unlink (handle->op_job->local_path);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3942| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3943| g_vfs_job_succeeded (handle->job);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 221, + "endLine": 221, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 219| for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++)\n 220| {\n 221|-> if (strcmp (type, dns_sd_types[i].type) == 0)\n 222| {\n 223| const char *icon_name;" + } + } + } + } + ], + "message": { + "text": "use of NULL ‘type’ where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + } + }, + "message": { + "text": "In function ‘get_icon_for_type’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 221, + "endLine": 221, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "use of NULL ‘type’ where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 261, + "endLine": 261, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘link_file_new’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 37, + "endLine": 37 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/giochannel.h" + }, + "region": { + "startLine": 36, + "endLine": 36 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 56, + "endLine": 56 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 27, + "endLine": 27 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(2) inlined call to ‘g_strdup_inline’ from ‘link_file_new’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 277, + "endLine": 277, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(3) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + } + }, + "message": { + "text": "In function ‘get_icon_for_type’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 278, + "endLine": 278, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(4) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 280, + "endLine": 280, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(5) calling ‘get_icon_for_type’ from ‘link_file_new’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 214, + "endLine": 214, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(6) entry to ‘get_icon_for_type’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(7) following ‘true’ branch (when ‘i != 7’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 221, + "endLine": 221, + "startColumn": 40, + "endColumn": 40 + } + }, + "message": { + "text": "(8) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 221, + "endLine": 221, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(9) argument 1 (‘type’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 26, + "endLine": 26 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/string.h" + }, + "region": { + "startLine": 156, + "endLine": 156, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "argument 1 of ‘strcmp’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 219| for (i = 0; i < G_N_ELEMENTS (dns_sd_types); i++)" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 220| {" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 221|-> if (strcmp (type, dns_sd_types[i].type) == 0)" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 222| {" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 223| const char *icon_name;" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 513| \n 514| s = g_strdup (job->uri);\n 515|-> if (s[strlen(s) - 1] == '/') /* job->uri is guranteed to be longer than 1 byte */\n 516| s[strlen(s) - 1] = '\\0';\n 517| display_name = g_path_get_basename (s);" + } + } + } + } + ], + "message": { + "text": "use of NULL where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + } + }, + "message": { + "text": "In function ‘try_query_info.part.0’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "use of NULL where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 496, + "endLine": 496, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘try_query_info.part.0’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(2) inlined call to ‘g_strdup_inline’ from ‘try_query_info.part.0’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 514, + "endLine": 514, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(3) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + } + }, + "message": { + "text": "In function ‘try_query_info.part.0’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(4) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackenddnssd.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(5) argument 1 (‘’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": "argument 1 of ‘__builtin_strlen’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 513| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 514| s = g_strdup (job->uri);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 515|-> if (s[strlen(s) - 1] == '/') /* job->uri is guranteed to be longer than 1 byte */" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 516| s[strlen(s) - 1] = '\\0';" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 517| display_name = g_path_get_basename (s);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendftp.c" + }, + "region": { + "startLine": 1420, + "endLine": 1420, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1418| \n 1419| file = g_vfs_ftp_file_new_from_gvfs (ftp, filename);\n 1420|-> g_vfs_ftp_task_send_and_check (&task,\n 1421| 0,\n 1422| make_directory_handlers," + } + } + } + } + ], + "message": { + "text": "Calling \"g_vfs_ftp_task_send_and_check\" without checking return value (as is done elsewhere 6 out of 7 times)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendftp.c" + }, + "region": { + "startLine": 1420, + "endLine": 1420, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_vfs_ftp_task_send_and_check\" without checking return value (as is done elsewhere 6 out of 7 times)." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendftp.c" + }, + "region": { + "startLine": 325, + "endLine": 325, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"PWD\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"PWD\")\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendftp.c" + }, + "region": { + "startLine": 114, + "endLine": 114, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"FEAT\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"FEAT\")\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendftp.c" + }, + "region": { + "startLine": 163, + "endLine": 163, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 3: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SITE HELP\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SITE HELP\")\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendftp.c" + }, + "region": { + "startLine": 221, + "endLine": 221, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 4: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SYST\")\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SYST\")\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 483, + "endLine": 483, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 5: \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SIZE %s\", g_vfs_ftp_file_get_ftp_path(file))\" has its value checked in \"g_vfs_ftp_task_send_and_check(task, (enum [unnamed type of 'GVfsFtpResponseFlags'])0, NULL, NULL, &reply, \"SIZE %s\", g_vfs_ftp_file_get_ftp_path(file))\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1418| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1419| file = g_vfs_ftp_file_new_from_gvfs (ftp, filename);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1420|-> g_vfs_ftp_task_send_and_check (&task," + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1421| 0," + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1422| make_directory_handlers," + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-possible-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 325, + "endLine": 325, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 323| char *mem;\n 324| mem = malloc (size);\n 325|-> memcpy (mem, gmem, size);\n 326| return mem;\n 327| }" + } + } + } + } + ], + "message": { + "text": "use of possibly-NULL ‘mem’ where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + } + }, + "message": { + "text": "In function ‘dup_for_gphoto2’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 325, + "endLine": 325, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "use of possibly-NULL ‘mem’ where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-possible-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2961, + "endLine": 2961, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘commit_write_handle’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2969, + "endLine": 2969, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(2) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2975, + "endLine": 2975, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "(3) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3000, + "endLine": 3000, + "startColumn": 39, + "endColumn": 39 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3002, + "endLine": 3002, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(6) calling ‘dup_for_gphoto2’ from ‘commit_write_handle’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 321, + "endLine": 321, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘dup_for_gphoto2’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(8) this call could return NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 325, + "endLine": 325, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(9) argument 1 (‘mem’) from (8) could be NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": "argument 1 of ‘__builtin_memcpy’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 323| char *mem;" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 324| mem = malloc (size);" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 325|-> memcpy (mem, gmem, size);" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 326| return mem;" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 327| }" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 576, + "endLine": 576, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 574| gphoto2_backend->file_monitor_proxies = NULL;\n 575| \n 576|-> gphoto2_backend->capacity = -1;\n 577| gphoto2_backend->free_space = -1;\n 578| }" + } + } + } + } + ], + "message": { + "text": "Accessing \"gphoto2_backend->capacity\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.capacity\" is written to with \"_GVfsBackendGphoto2.lock\" held 2 out of 3 times (1 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->context != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 525, + "endLine": 525, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->camera != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 531, + "endLine": 531, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->gudev_client != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 533, + "endLine": 533, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->udev_device != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 544, + "endLine": 544, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->info_cache != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 549, + "endLine": 549, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->dir_name_cache != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 554, + "endLine": 554, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->file_name_cache != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 560, + "endLine": 560, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 564, + "endLine": 564, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 560, + "endLine": 560, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 568, + "endLine": 568, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 572, + "endLine": 572, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 568, + "endLine": 568, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 576, + "endLine": 576, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"gphoto2_backend->capacity\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.capacity\" is written to with \"_GVfsBackendGphoto2.lock\" held 2 out of 3 times (1 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2147, + "endLine": 2147, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2148, + "endLine": 2148, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 574| gphoto2_backend->file_monitor_proxies = NULL;" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 575| " + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 576|-> gphoto2_backend->capacity = -1;" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 577| gphoto2_backend->free_space = -1;" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 578| }" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 577, + "endLine": 577, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 575| \n 576| gphoto2_backend->capacity = -1;\n 577|-> gphoto2_backend->free_space = -1;\n 578| }\n 579| " + } + } + } + } + ], + "message": { + "text": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->context != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 525, + "endLine": 525, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->camera != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 531, + "endLine": 531, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->gudev_client != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 533, + "endLine": 533, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->udev_device != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 544, + "endLine": 544, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->info_cache != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 549, + "endLine": 549, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->dir_name_cache != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 554, + "endLine": 554, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->file_name_cache != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 560, + "endLine": 560, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 564, + "endLine": 564, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 560, + "endLine": 560, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 568, + "endLine": 568, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 572, + "endLine": 572, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 568, + "endLine": 568, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 577, + "endLine": 577, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 417, + "endLine": 417, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 426, + "endLine": 426, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 427, + "endLine": 427, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2157, + "endLine": 2157, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 3: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2158, + "endLine": 2158, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 3 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 575| " + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 576| gphoto2_backend->capacity = -1;" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 577|-> gphoto2_backend->free_space = -1;" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 578| }" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 579| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 726, + "endLine": 726, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 724| g_debug (\"-> did not find matching udev device\\n\");\n 725| \n 726|-> g_vfs_backend_set_x_content_types (G_VFS_BACKEND (gphoto2_backend),\n 727| g_vfs_get_x_content_types (gphoto2_backend->udev_device));\n 728| }" + } + } + } + } + ], + "message": { + "text": "Failing to save or free storage allocated by \"g_vfs_get_x_content_types(gphoto2_backend->udev_device)\" leaks it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"__str == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_12;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!(1 ? ({...; __result;}) : g_str_has_prefix(gphoto2_backend->gphoto2_port, \"usb:\"))\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 705, + "endLine": 705, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"(comma = strchr(devname, 44)) == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 716, + "endLine": 716, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->udev_device\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 722, + "endLine": 722, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 726, + "endLine": 726, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_vfs_get_x_content_types\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 726, + "endLine": 726, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Resource \"g_vfs_get_x_content_types(gphoto2_backend->udev_device)\" is not freed or pointed-to in \"g_vfs_backend_set_x_content_types\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 726, + "endLine": 726, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Failing to save or free storage allocated by \"g_vfs_get_x_content_types(gphoto2_backend->udev_device)\" leaks it." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 724| g_debug (\"-> did not find matching udev device\\n\");" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 725| " + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 726|-> g_vfs_backend_set_x_content_types (G_VFS_BACKEND (gphoto2_backend)," + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 727| g_vfs_get_x_content_types (gphoto2_backend->udev_device));" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 728| }" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1443, + "endLine": 1443, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1441| g_vfs_job_succeeded (G_VFS_JOB (job));\n 1442| \n 1443|-> gphoto2_backend->free_space = -1;\n 1444| \n 1445| gphoto2_mount_spec = g_mount_spec_new (\"gphoto2\");" + } + } + } + } + ], + "message": { + "text": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1287, + "endLine": 1287, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->gudev_client == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1305, + "endLine": 1305, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"port == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1317, + "endLine": 1317, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"gphoto2_backend->context == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1326, + "endLine": 1326, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1338, + "endLine": 1338, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1347, + "endLine": 1347, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1358, + "endLine": 1358, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n == -5\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1367, + "endLine": 1367, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1381, + "endLine": 1381, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1391, + "endLine": 1391, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1399, + "endLine": 1399, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!ensure_ignore_prefix(gphoto2_backend, (GVfsJob *)(void *)job)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1423, + "endLine": 1423, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1425, + "endLine": 1425, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"num_storage_info >= 1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1427, + "endLine": 1427, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].fields & GP_STORAGEINFO_ACCESS\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1427, + "endLine": 1427, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].access == GP_STORAGEINFO_AC_READWRITE\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1432, + "endLine": 1432, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].fields & GP_STORAGEINFO_ACCESS\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1432, + "endLine": 1432, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].access == GP_STORAGEINFO_AC_READONLY_WITH_DELETE\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1443, + "endLine": 1443, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 417, + "endLine": 417, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 426, + "endLine": 426, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 427, + "endLine": 427, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2157, + "endLine": 2157, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 3: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2158, + "endLine": 2158, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 3 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1441| g_vfs_job_succeeded (G_VFS_JOB (job));" + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1442| " + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1443|-> gphoto2_backend->free_space = -1;" + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1444| " + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1445| gphoto2_mount_spec = g_mount_spec_new (\"gphoto2\");" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1873, + "endLine": 1873, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1871| g_free (as_dir);\n 1872| g_free (as_name);\n 1873|-> return;\n 1874| }\n 1875| g_free (as_dir);" + } + } + } + } + ], + "message": { + "text": "Variable \"filename\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1853, + "endLine": 1853, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"add_ignore_prefix\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1853, + "endLine": 1853, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"filename\" = storage returned from \"add_ignore_prefix(gphoto2_backend, given_filename)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1854, + "endLine": 1854, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assuming resource \"filename\" is not freed or pointed-to as ellipsis argument to \"g_debug\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1857, + "endLine": 1857, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1859, + "endLine": 1859, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"is_regular(gphoto2_backend, as_dir, as_name)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1873, + "endLine": 1873, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Variable \"filename\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1871| g_free (as_dir);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1872| g_free (as_name);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1873|-> return;" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1874| }" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1875| g_free (as_dir);" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1932, + "endLine": 1932, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1930| #ifndef DEBUG_NO_CACHING\n 1931| g_mutex_lock (&gphoto2_backend->lock);\n 1932|-> g_hash_table_insert (gphoto2_backend->dir_name_cache, g_strdup (filename), list);\n 1933| g_mutex_unlock (&gphoto2_backend->lock);\n 1934| #endif" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1857, + "endLine": 1857, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1879, + "endLine": 1879, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1880, + "endLine": 1880, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1881, + "endLine": 1881, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1883, + "endLine": 1883, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1894, + "endLine": 1894, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1902, + "endLine": 1902, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1928, + "endLine": 1928, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!using_cached_dir_list\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1931, + "endLine": 1931, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1932, + "endLine": 1932, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1930| #ifndef DEBUG_NO_CACHING" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1931| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1932|-> g_hash_table_insert (gphoto2_backend->dir_name_cache, g_strdup (filename), list);" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1933| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1934| #endif" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1939, + "endLine": 1939, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1937| {\n 1938| g_mutex_lock (&gphoto2_backend->lock);\n 1939|-> gp_list_unref (list);\n 1940| g_mutex_unlock (&gphoto2_backend->lock);\n 1941| }" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1857, + "endLine": 1857, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1879, + "endLine": 1879, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1880, + "endLine": 1880, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1881, + "endLine": 1881, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1908, + "endLine": 1908, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1918, + "endLine": 1918, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1918, + "endLine": 1918, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1927, + "endLine": 1927, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1928, + "endLine": 1928, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!using_cached_dir_list\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1938, + "endLine": 1938, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1939, + "endLine": 1939, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1937| {" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1938| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1939|-> gp_list_unref (list);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1940| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1941| }" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1998, + "endLine": 1998, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1996| #ifndef DEBUG_NO_CACHING\n 1997| g_mutex_lock (&gphoto2_backend->lock);\n 1998|-> g_hash_table_insert (gphoto2_backend->file_name_cache, g_strdup (filename), list);\n 1999| g_mutex_unlock (&gphoto2_backend->lock);\n 2000| #endif" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1857, + "endLine": 1857, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1881, + "endLine": 1881, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1894, + "endLine": 1894, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1902, + "endLine": 1902, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1928, + "endLine": 1928, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!using_cached_dir_list\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1935, + "endLine": 1935, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1945, + "endLine": 1945, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1946, + "endLine": 1946, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1947, + "endLine": 1947, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1949, + "endLine": 1949, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1959, + "endLine": 1959, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1967, + "endLine": 1967, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1975, + "endLine": 1975, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1994, + "endLine": 1994, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!using_cached_file_list\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1997, + "endLine": 1997, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1998, + "endLine": 1998, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1996| #ifndef DEBUG_NO_CACHING" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1997| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1998|-> g_hash_table_insert (gphoto2_backend->file_name_cache, g_strdup (filename), list);" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1999| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2000| #endif" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2005, + "endLine": 2005, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 2003| {\n 2004| g_mutex_lock (&gphoto2_backend->lock);\n 2005|-> gp_list_unref (list);\n 2006| g_mutex_unlock (&gphoto2_backend->lock);\n 2007| }" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1857, + "endLine": 1857, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!is_directory(gphoto2_backend, as_dir, as_name)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1881, + "endLine": 1881, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1894, + "endLine": 1894, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1902, + "endLine": 1902, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1918, + "endLine": 1918, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1927, + "endLine": 1927, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1918, + "endLine": 1918, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1927, + "endLine": 1927, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1910, + "endLine": 1910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1928, + "endLine": 1928, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!using_cached_dir_list\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1935, + "endLine": 1935, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1945, + "endLine": 1945, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1946, + "endLine": 1946, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1947, + "endLine": 1947, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1973, + "endLine": 1973, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1975, + "endLine": 1975, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1984, + "endLine": 1984, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1984, + "endLine": 1984, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 0)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1993, + "endLine": 1993, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1975, + "endLine": 1975, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 1994, + "endLine": 1994, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!using_cached_file_list\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2004, + "endLine": 2004, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2005, + "endLine": 2005, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2003| {" + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2004| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2005|-> gp_list_unref (list);" + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2006| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2007| }" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2060, + "endLine": 2060, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 2058| {\n 2059| g_mutex_lock (&gphoto2_backend->lock);\n 2060|-> gp_list_unref (list);\n 2061| g_mutex_unlock (&gphoto2_backend->lock);\n 2062| goto error_not_cached;" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2043, + "endLine": 2043, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2044, + "endLine": 2044, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2045, + "endLine": 2045, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2051, + "endLine": 2051, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2065, + "endLine": 2065, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2065, + "endLine": 2065, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2059, + "endLine": 2059, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2060, + "endLine": 2060, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2058| {" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2059| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2060|-> gp_list_unref (list);" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2061| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2062| goto error_not_cached;" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2067, + "endLine": 2067, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 2065| }\n 2066| g_mutex_lock (&gphoto2_backend->lock);\n 2067|-> gp_list_unref (list);\n 2068| g_mutex_unlock (&gphoto2_backend->lock);\n 2069| " + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2043, + "endLine": 2043, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2044, + "endLine": 2044, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2045, + "endLine": 2045, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2051, + "endLine": 2051, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2066, + "endLine": 2066, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2067, + "endLine": 2067, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2065| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2066| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2067|-> gp_list_unref (list);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2068| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2069| " + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2089, + "endLine": 2089, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 2087| {\n 2088| g_mutex_lock (&gphoto2_backend->lock);\n 2089|-> gp_list_unref (list);\n 2090| g_mutex_unlock (&gphoto2_backend->lock);\n 2091| goto error_not_cached;" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2045, + "endLine": 2045, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2065, + "endLine": 2065, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2057, + "endLine": 2057, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2065, + "endLine": 2065, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2071, + "endLine": 2071, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2072, + "endLine": 2072, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2073, + "endLine": 2073, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2079, + "endLine": 2079, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2080, + "endLine": 2080, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2086, + "endLine": 2086, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2086, + "endLine": 2086, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2094, + "endLine": 2094, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2080, + "endLine": 2080, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2086, + "endLine": 2086, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2086, + "endLine": 2086, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2094, + "endLine": 2094, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2080, + "endLine": 2080, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2086, + "endLine": 2086, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Unlocking \"gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2086, + "endLine": 2086, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!file_get_info(gphoto2_backend, filename, name, info, &error, 1 /* !0 */)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2088, + "endLine": 2088, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2089, + "endLine": 2089, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2087| {" + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2088| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2089|-> gp_list_unref (list);" + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2090| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2091| goto error_not_cached;" + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2096, + "endLine": 2096, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 2094| }\n 2095| g_mutex_lock (&gphoto2_backend->lock);\n 2096|-> gp_list_unref (list);\n 2097| g_mutex_unlock (&gphoto2_backend->lock);\n 2098| " + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2045, + "endLine": 2045, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2052, + "endLine": 2052, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2071, + "endLine": 2071, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2072, + "endLine": 2072, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"list\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2073, + "endLine": 2073, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"list == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2079, + "endLine": 2079, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Unlocking \"&gphoto2_backend->lock\". \"list\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2080, + "endLine": 2080, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n < gp_list_count(list)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2095, + "endLine": 2095, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&gphoto2_backend->lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2096, + "endLine": 2096, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Using an unreliable value of \"list\" inside the second locked section. If the data that \"list\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2094| }" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2095| g_mutex_lock (&gphoto2_backend->lock);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2096|-> gp_list_unref (list);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2097| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2098| " + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2150, + "endLine": 2150, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 2148| gphoto2_backend->capacity = storage_info[0].capacitykbytes * 1024;\n 2149| g_mutex_unlock (&gphoto2_backend->lock);\n 2150|-> g_file_info_set_attribute_uint64 (info, \n 2151| G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, \n 2152| (guint64) gphoto2_backend->capacity);" + } + } + } + } + ], + "message": { + "text": "Accessing \"gphoto2_backend->capacity\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.capacity\" is written to with \"_GVfsBackendGphoto2.lock\" held 2 out of 3 times (1 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2137, + "endLine": 2137, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!gphoto2_backend->can_write\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2140, + "endLine": 2140, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2142, + "endLine": 2142, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"num_storage_info >= 1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2145, + "endLine": 2145, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].fields & GP_STORAGEINFO_MAXCAPACITY\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2150, + "endLine": 2150, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Accessing \"gphoto2_backend->capacity\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.capacity\" is written to with \"_GVfsBackendGphoto2.lock\" held 2 out of 3 times (1 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2147, + "endLine": 2147, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2148, + "endLine": 2148, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsBackendGphoto2.capacity\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2148| gphoto2_backend->capacity = storage_info[0].capacitykbytes * 1024;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2149| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2150|-> g_file_info_set_attribute_uint64 (info, " + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2151| G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, " + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2152| (guint64) gphoto2_backend->capacity);" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2160, + "endLine": 2160, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 2158| gphoto2_backend->free_space = storage_info[0].freekbytes * 1024;\n 2159| g_mutex_unlock (&gphoto2_backend->lock);\n 2160|-> g_file_info_set_attribute_uint64 (info, \n 2161| G_FILE_ATTRIBUTE_FILESYSTEM_FREE, \n 2162| (guint64) gphoto2_backend->free_space);" + } + } + } + } + ], + "message": { + "text": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2137, + "endLine": 2137, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!gphoto2_backend->can_write\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2140, + "endLine": 2140, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2142, + "endLine": 2142, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"num_storage_info >= 1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2145, + "endLine": 2145, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].fields & GP_STORAGEINFO_MAXCAPACITY\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2155, + "endLine": 2155, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"storage_info[0].fields & GP_STORAGEINFO_FREESPACEKBYTES\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2160, + "endLine": 2160, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Accessing \"gphoto2_backend->free_space\" without holding lock \"_GVfsBackendGphoto2.lock\". Elsewhere, \"_GVfsBackendGphoto2.free_space\" is written to with \"_GVfsBackendGphoto2.lock\" held 3 out of 5 times (2 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 409, + "endLine": 409, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 417, + "endLine": 417, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 426, + "endLine": 426, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 427, + "endLine": 427, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2157, + "endLine": 2157, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 3: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendGphoto2.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2158, + "endLine": 2158, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Example 3 (cont.): \"_GVfsBackendGphoto2.free_space\" is written to with lock \"_GVfsBackendGphoto2.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2158| gphoto2_backend->free_space = storage_info[0].freekbytes * 1024;" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2159| g_mutex_unlock (&gphoto2_backend->lock);" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2160|-> g_file_info_set_attribute_uint64 (info, " + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2161| G_FILE_ATTRIBUTE_FILESYSTEM_FREE, " + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2162| (guint64) gphoto2_backend->free_space);" + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_begin", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2324, + "endLine": 2324, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 2322| if (rc != 0)\n 2323| {\n 2324|-> g_debug (\" file delete failed as part of slow rename rc=%d\\n\", rc);\n 2325| goto out;\n 2326| }" + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"g_debug(\" file delete fail...\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2313, + "endLine": 2313, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch. Now the value of \"rc\" is equal to 0." + } + }, + "nestingLevel": 1, + "kinds": [ + "cond_const" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2322, + "endLine": 2322, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "At condition \"rc != 0\", the value of \"rc\" must be equal to 0." + } + }, + "nestingLevel": 1, + "kinds": [ + "const" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2322, + "endLine": 2322, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "The condition \"rc != 0\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2324, + "endLine": 2324, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"g_debug(\" file delete fail...\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_begin" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2322| if (rc != 0)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2323| {" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2324|-> g_debug (\" file delete failed as part of slow rename rc=%d\\n\", rc);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2325| goto out;" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2326| }" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[unix.Malloc]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3007, + "endLine": 3007, + "startColumn": 8, + "endColumn": 8, + "snippet": { + "text": "Problem detected in this context:\n 3005| \n 3006| #ifdef HAVE_GPHOTO25\n 3007|-> rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, write_handle->name, GP_FILE_TYPE_NORMAL, file, gphoto2_backend->context);\n 3008| #else\n 3009| gp_file_set_type (file, GP_FILE_TYPE_NORMAL);" + } + } + } + } + ], + "message": { + "text": "Potential memory leak" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3007, + "endLine": 3007, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Potential memory leak" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[unix.Malloc]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3242, + "endLine": 3242, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling 'ensure_not_dirty'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "Assuming 'l' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Loop condition is true. Entering loop body" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 312, + "endLine": 312, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assuming field 'is_dirty' is not equal to 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 312, + "endLine": 312, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 313, + "endLine": 313, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Calling 'commit_write_handle'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2969, + "endLine": 2969, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "Field 'is_dirty' is not equal to 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2969, + "endLine": 2969, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2975, + "endLine": 2975, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming field 'delete_before' is 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2975, + "endLine": 2975, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Left side of '||' is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2976, + "endLine": 2976, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Assuming field 'job_is_replace' is 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2976, + "endLine": 2976, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Left side of '||' is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2976, + "endLine": 2976, + "startColumn": 40, + "endColumn": 40 + } + }, + "message": { + "text": "Assuming field 'job_is_append_to' is 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2975, + "endLine": 2975, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming 'rc' is equal to 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3003, + "endLine": 3003, + "startColumn": 30, + "endColumn": 30 + } + }, + "message": { + "text": "Calling 'dup_for_gphoto2'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Memory is allocated" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3003, + "endLine": 3003, + "startColumn": 30, + "endColumn": 30 + } + }, + "message": { + "text": "Returned allocated memory" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3007, + "endLine": 3007, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Potential memory leak" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3005| " + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3006| #ifdef HAVE_GPHOTO25" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3007|-> rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, write_handle->name, GP_FILE_TYPE_NORMAL, file, gphoto2_backend->context);" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3008| #else" + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3009| gp_file_set_type (file, GP_FILE_TYPE_NORMAL);" + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: pass_freed_arg", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3062, + "endLine": 3062, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 3060| out:\n 3061| write_handle_free (write_handle);\n 3062|-> gphoto2_backend->open_write_handles = g_list_remove (gphoto2_backend->open_write_handles, write_handle);\n 3063| }\n 3064| " + } + } + } + } + ], + "message": { + "text": "Passing freed pointer \"write_handle\" as an argument to \"g_list_remove\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3041, + "endLine": 3041, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"write_handle\" = \"handle\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3048, + "endLine": 3048, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rc != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3061, + "endLine": 3061, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"write_handle_free\" frees \"write_handle\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3062, + "endLine": 3062, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing freed pointer \"write_handle\" as an argument to \"g_list_remove\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "pass_freed_arg" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3060| out:" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3061| write_handle_free (write_handle);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3062|-> gphoto2_backend->open_write_handles = g_list_remove (gphoto2_backend->open_write_handles, write_handle);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3063| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3064| " + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[unix.Malloc]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3062, + "endLine": 3062, + "startColumn": 41, + "endColumn": 41, + "snippet": { + "text": "Problem detected in this context:\n 3060| out:\n 3061| write_handle_free (write_handle);\n 3062|-> gphoto2_backend->open_write_handles = g_list_remove (gphoto2_backend->open_write_handles, write_handle);\n 3063| }\n 3064| " + } + } + } + } + ], + "message": { + "text": "Use of memory after it is freed" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3062, + "endLine": 3062, + "startColumn": 41, + "endColumn": 41 + } + }, + "message": { + "text": "Use of memory after it is freed" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[unix.Malloc]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3048, + "endLine": 3048, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming 'rc' is equal to 0" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3048, + "endLine": 3048, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3061, + "endLine": 3061, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling 'write_handle_free'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 293, + "endLine": 293, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Memory is released" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3061, + "endLine": 3061, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Returning; memory was released via 1st parameter" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3062, + "endLine": 3062, + "startColumn": 41, + "endColumn": 41 + } + }, + "message": { + "text": "Use of memory after it is freed" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3060| out:" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3061| write_handle_free (write_handle);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3062|-> gphoto2_backend->open_write_handles = g_list_remove (gphoto2_backend->open_write_handles, write_handle);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3063| }" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3064| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3419, + "endLine": 3419, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 3417| g_object_unref (proxy->vfs_monitor);\n 3418| g_vfs_job_succeeded (G_VFS_JOB (job));\n 3419|-> }\n 3420| \n 3421| /* ------------------------------------------------------------------------------------------------- */" + } + } + } + } + ], + "message": { + "text": "Variable \"dir\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3407, + "endLine": 3407, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"dir\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3409, + "endLine": 3409, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"__s == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3409, + "endLine": 3409, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3419, + "endLine": 3419, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"dir\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3417| g_object_unref (proxy->vfs_monitor);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3418| g_vfs_job_succeeded (G_VFS_JOB (job));" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3419|-> }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3420| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3421| /* ------------------------------------------------------------------------------------------------- */" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3419, + "endLine": 3419, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 3417| g_object_unref (proxy->vfs_monitor);\n 3418| g_vfs_job_succeeded (G_VFS_JOB (job));\n 3419|-> }\n 3420| \n 3421| /* ------------------------------------------------------------------------------------------------- */" + } + } + } + } + ], + "message": { + "text": "Variable \"name\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3407, + "endLine": 3407, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"name\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3409, + "endLine": 3409, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"__s == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3409, + "endLine": 3409, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3419, + "endLine": 3419, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"name\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3417| g_object_unref (proxy->vfs_monitor);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3418| g_vfs_job_succeeded (G_VFS_JOB (job));" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3419|-> }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3420| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3421| /* ------------------------------------------------------------------------------------------------- */" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3469, + "endLine": 3469, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 3467| g_object_unref (proxy->vfs_monitor);\n 3468| g_vfs_job_succeeded (G_VFS_JOB (job));\n 3469|-> }\n 3470| \n 3471| /* ------------------------------------------------------------------------------------------------- */" + } + } + } + } + ], + "message": { + "text": "Variable \"dir\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3457, + "endLine": 3457, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"dir\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3459, + "endLine": 3459, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"__s == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3459, + "endLine": 3459, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3469, + "endLine": 3469, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"dir\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3467| g_object_unref (proxy->vfs_monitor);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3468| g_vfs_job_succeeded (G_VFS_JOB (job));" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3469|-> }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3470| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3471| /* ------------------------------------------------------------------------------------------------- */" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3469, + "endLine": 3469, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 3467| g_object_unref (proxy->vfs_monitor);\n 3468| g_vfs_job_succeeded (G_VFS_JOB (job));\n 3469|-> }\n 3470| \n 3471| /* ------------------------------------------------------------------------------------------------- */" + } + } + } + } + ], + "message": { + "text": "Variable \"name\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3457, + "endLine": 3457, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"split_filename_with_ignore_prefix\" allocates memory that is stored into \"name\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3459, + "endLine": 3459, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"__s == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3459, + "endLine": 3459, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendgphoto2.c" + }, + "region": { + "startLine": 3469, + "endLine": 3469, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"name\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3467| g_object_unref (proxy->vfs_monitor);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3468| g_vfs_job_succeeded (G_VFS_JOB (job));" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3469|-> }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3470| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3471| /* ------------------------------------------------------------------------------------------------- */" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 322, + "endLine": 322, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 320| \n 321| g_vfs_job_succeeded (G_VFS_JOB (job));\n 322|-> return TRUE;\n 323| }\n 324| " + } + } + } + } + ], + "message": { + "text": "Variable \"path\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 294, + "endLine": 294, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uri_str\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 297, + "endLine": 297, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uri_str\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 299, + "endLine": 299, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uri == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 310, + "endLine": 310, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_uri_unescape_string\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 310, + "endLine": 310, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"path\" = storage returned from \"g_uri_unescape_string(g_uri_get_path(uri), \"/\")\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"path[0]\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 322, + "endLine": 322, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"path\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 320| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 321| g_vfs_job_succeeded (G_VFS_JOB (job));" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 322|-> return TRUE;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 323| }" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 324| " + } + } + ] + }, + { + "ruleId": "TAINTED_STRING: tainted_string", + "properties": { + "cwe": "CWE-20" + }, + "locations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 615, + "endLine": 615, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 613| \n 614| g_file_info_set_content_type (info, text);\n 615|-> g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, text);\n 616| \n 617| icon = g_content_type_get_icon (text);" + } + } + } + } + ], + "message": { + "text": "Passing tainted string \"*text\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 556, + "endLine": 556, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"soup_message_headers_get_content_disposition(soup_message_get_response_headers(msg), NULL, ¶ms)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 561, + "endLine": 561, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"name\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 567, + "endLine": 567, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"basename == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"basename != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_file_attribute_matcher_matches(matcher, \"standard::display-name\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 589, + "endLine": 589, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"soup_message_headers_get_encoding(soup_message_get_response_headers(msg)) == SOUP_ENCODING_CONTENT_LENGTH\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 596, + "endLine": 596, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"ret\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 596, + "endLine": 596, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"length != -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 599, + "endLine": 599, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 609, + "endLine": 609, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Function \"soup_message_headers_get_content_type\" returns tainted data." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_return_value" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 609, + "endLine": 609, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"text\" = \"soup_message_headers_get_content_type(soup_message_get_response_headers(msg), NULL)\", which taints \"text\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"text\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 615, + "endLine": 615, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Passing tainted string \"*text\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data." + } + }, + "nestingLevel": 0, + "kinds": [ + "tainted_string" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 615, + "endLine": 615, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters." + } + }, + "nestingLevel": 1, + "kinds": [ + "remediation" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 613| " + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 614| g_file_info_set_content_type (info, text);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 615|-> g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, text);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 616| " + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 617| icon = g_content_type_get_icon (text);" + } + } + ] + }, + { + "ruleId": "TAINTED_STRING: tainted_string", + "properties": { + "cwe": "CWE-20" + }, + "locations": [ + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 649, + "endLine": 649, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 647| if (text)\n 648| {\n 649|-> g_file_info_set_attribute_string (info,\n 650| G_FILE_ATTRIBUTE_ETAG_VALUE,\n 651| text);" + } + } + } + } + ], + "message": { + "text": "Passing tainted string \"*text\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 556, + "endLine": 556, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"soup_message_headers_get_content_disposition(soup_message_get_response_headers(msg), NULL, ¶ms)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 561, + "endLine": 561, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"name\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 567, + "endLine": 567, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"basename == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"basename != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_file_attribute_matcher_matches(matcher, \"standard::display-name\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 589, + "endLine": 589, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"soup_message_headers_get_encoding(soup_message_get_response_headers(msg)) == SOUP_ENCODING_CONTENT_LENGTH\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 596, + "endLine": 596, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"ret\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 596, + "endLine": 596, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"length != -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 599, + "endLine": 599, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"text\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 629, + "endLine": 629, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"text\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 634, + "endLine": 634, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"gd\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 645, + "endLine": 645, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Function \"soup_message_headers_get_one\" returns tainted data." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_return_value" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 645, + "endLine": 645, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"text\" = \"soup_message_headers_get_one(soup_message_get_response_headers(msg), \"ETag\")\", which taints \"text\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 647, + "endLine": 647, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"text\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 649, + "endLine": 649, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Passing tainted string \"*text\" to \"g_file_info_set_attribute_string\", which cannot accept tainted data." + } + }, + "nestingLevel": 0, + "kinds": [ + "tainted_string" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendhttp.c" + }, + "region": { + "startLine": 649, + "endLine": 649, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Ensure tainted data is properly sanitized, for instance by using a whitelist of permissible characters." + } + }, + "nestingLevel": 1, + "kinds": [ + "remediation" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 647| if (text)" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 648| {" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 649|-> g_file_info_set_attribute_string (info," + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 650| G_FILE_ATTRIBUTE_ETAG_VALUE," + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 651| text);" + } + } + ] + }, + { + "ruleId": "DC.WEAK_CRYPTO: dont_call", + "properties": { + "cwe": "CWE-327" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c" + }, + "region": { + "startLine": 98, + "endLine": 98, + "startColumn": 41, + "endColumn": 41, + "snippet": { + "text": "Problem detected in this context:\n 96| GVfsBackendLocalTest *op_backend = G_VFS_BACKEND_LOCALTEST (backend);\n 97| \n 98|-> if ((op_backend->errorneous > 0) && ((random() % op_backend->errorneous) == 0) && \n 99| \t ((op_backend->inject_op_types < 1) || ((op_backend->inject_op_types & job_type) == job_type)))\n 100| {" + } + } + } + } + ], + "message": { + "text": "\"random\" should not be used for security-related applications, because linear congruential algorithms are too easy to break." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c" + }, + "region": { + "startLine": 98, + "endLine": 98, + "startColumn": 41, + "endColumn": 41 + } + }, + "message": { + "text": "\"random\" should not be used for security-related applications, because linear congruential algorithms are too easy to break." + } + }, + "nestingLevel": 0, + "kinds": [ + "dont_call" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c" + }, + "region": { + "startLine": 98, + "endLine": 98, + "startColumn": 41, + "endColumn": 41 + } + }, + "message": { + "text": "Use a compliant random number generator, such as \"/dev/random\" or \"/dev/urandom\" on Unix-like systems, and CNG (Cryptography API: Next Generation) on Windows." + } + }, + "nestingLevel": 1, + "kinds": [ + "remediation" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 96| GVfsBackendLocalTest *op_backend = G_VFS_BACKEND_LOCALTEST (backend);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 97| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 98|-> if ((op_backend->errorneous > 0) && ((random() % op_backend->errorneous) == 0) && " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 99| \t ((op_backend->inject_op_types < 1) || ((op_backend->inject_op_types & job_type) == job_type)))" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 100| {" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c" + }, + "region": { + "startLine": 299, + "endLine": 299, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 297| file = get_g_file_from_local (filename, G_VFS_JOB (job));\n 298| g_assert (file != NULL);\n 299|-> res = TRUE;\n 300| \n 301| error = NULL;" + } + } + } + } + ], + "message": { + "text": "Value stored to 'res' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c" + }, + "region": { + "startLine": 299, + "endLine": 299, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'res' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendlocaltest.c" + }, + "region": { + "startLine": 299, + "endLine": 299, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'res' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 297| file = get_g_file_from_local (filename, G_VFS_JOB (job));" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 298| g_assert (file != NULL);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 299|-> res = TRUE;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 300| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 301| error = NULL;" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: internal warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + } + } + } + ], + "message": { + "text": "child 23304 timed out after 30s" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + } + }, + "message": { + "text": "child 23304 timed out after 30s" + } + }, + "nestingLevel": 0, + "kinds": [ + "internal warning" + ] + } + ] + } + ] + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1898, + "endLine": 1898, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 1896| if (remove_source) {\n 1897| g_debug (\"(I) Removing source.\\n\");\n 1898|-> LIBMTP_Delete_Object (device, entry->id);\n 1899| g_hash_table_foreach (G_VFS_BACKEND_MTP (backend)->monitors,\n 1900| emit_delete_event," + } + } + } + } + ], + "message": { + "text": "Calling \"LIBMTP_Delete_Object\" without checking return value (as is done elsewhere 4 out of 5 times)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1791, + "endLine": 1791, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1791, + "endLine": 1791, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"flags & G_FILE_COPY_NO_FALLBACK_FOR_MOVE\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1799, + "endLine": 1799, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"entry == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1804, + "endLine": 1804, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Condition \"entry->id == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1815, + "endLine": 1815, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"file == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1836, + "endLine": 1836, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!local_info\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1840, + "endLine": 1840, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Condition \"error != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1853, + "endLine": 1853, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!valid_pull\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1855, + "endLine": 1855, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Condition \"dest_exists\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1862, + "endLine": 1862, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Condition \"!ret\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1878, + "endLine": 1878, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"ret != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1896, + "endLine": 1896, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 1898, + "endLine": 1898, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"LIBMTP_Delete_Object\" without checking return value (as is done elsewhere 4 out of 5 times)." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 3193, + "endLine": 3193, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 1: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 3194, + "endLine": 3194, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 1 (cont.): \"ret\" has its value checked in \"ret != 0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 2255, + "endLine": 2255, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 2256, + "endLine": 2256, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"ret\" has its value checked in \"ret != 0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 3054, + "endLine": 3054, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 3: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 3055, + "endLine": 3055, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 3 (cont.): \"ret\" has its value checked in \"ret != 0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 2157, + "endLine": 2157, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 4: Assigning: \"ret\" = return value from \"LIBMTP_Delete_Object(device, entry->id)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendmtp.c" + }, + "region": { + "startLine": 2158, + "endLine": 2158, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 4 (cont.): \"ret\" has its value checked in \"ret != 0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1896| if (remove_source) {" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1897| g_debug (\"(I) Removing source.\\n\");" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1898|-> LIBMTP_Delete_Object (device, entry->id);" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1899| g_hash_table_foreach (G_VFS_BACKEND_MTP (backend)->monitors," + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1900| emit_delete_event," + } + } + ] + }, + { + "ruleId": "COPY_PASTE_ERROR: copy_paste_error", + "properties": { + "cwe": "CWE-398" + }, + "level": "error", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 599, + "endLine": 599, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 597| backend);\n 598| \n 599|-> backend->dnssd_monitor = monitor;\n 600| }\n 601| else" + } + } + } + } + ], + "message": { + "text": "\"dnssd_monitor\" in \"backend->dnssd_monitor\" looks like a copy-paste error." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 521, + "endLine": 521, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "\"backend->dnssd_monitor\" looks like the original copy." + } + }, + "nestingLevel": 1, + "kinds": [ + "original" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 599, + "endLine": 599, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "\"dnssd_monitor\" in \"backend->dnssd_monitor\" looks like a copy-paste error." + } + }, + "nestingLevel": 0, + "kinds": [ + "copy_paste_error" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 599, + "endLine": 599, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Should it say \"wsdd_monitor\" instead?" + } + }, + "nestingLevel": 1, + "kinds": [ + "remediation" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 597| backend);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 598| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 599|-> backend->dnssd_monitor = monitor;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 600| }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 601| else" + } + } + ] + }, + { + "ruleId": "MISSING_BREAK: unterminated_case", + "properties": { + "cwe": "CWE-484" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 839, + "endLine": 839, + "startColumn": 12, + "endColumn": 12, + "snippet": { + "text": "Problem detected in this context:\n 837| switch (event_type)\n 838| {\n 839|-> case G_FILE_MONITOR_EVENT_UNMOUNTED:\n 840| g_clear_object (&backend->wsdd_monitor);\n 841| " + } + } + } + } + ], + "message": { + "text": "The case for value \"G_FILE_MONITOR_EVENT_UNMOUNTED\" is not terminated by a \"break\" statement." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 839, + "endLine": 839, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "The case for value \"G_FILE_MONITOR_EVENT_UNMOUNTED\" is not terminated by a \"break\" statement." + } + }, + "nestingLevel": 0, + "kinds": [ + "unterminated_case" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendnetwork.c" + }, + "region": { + "startLine": 842, + "endLine": 842, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "The above case falls through to this one." + } + }, + "nestingLevel": 1, + "kinds": [ + "fallthrough" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 837| switch (event_type)" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 838| {" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 839|-> case G_FILE_MONITOR_EVENT_UNMOUNTED:" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 840| g_clear_object (&backend->wsdd_monitor);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 841| " + } + } + ] + }, + { + "ruleId": "ALLOC_FREE_MISMATCH: free", + "properties": { + "cwe": "CWE-762" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 451, + "endLine": 451, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 449| if (g_strcmp0 (mimetype, \"inode/directory\") == 0)\n 450| {\n 451|-> g_free (mimetype);\n 452| return FALSE;\n 453| }" + } + } + } + } + ], + "message": { + "text": "Calling \"g_free\" frees \"mimetype\" using \"g_free\" but it should have been freed using \"free\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_bookmark_file_get_is_private(bookmarks, uri, NULL)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 444, + "endLine": 444, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_ascii_strncasecmp(uri, \"file:/\", 6) != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 448, + "endLine": 448, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Allocation of memory which must be freed using \"free\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 448, + "endLine": 448, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"mimetype\" = \"g_bookmark_file_get_mime_type(bookmarks, uri, NULL)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_strcmp0(mimetype, \"inode/directory\") == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 451, + "endLine": 451, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"g_free\" frees \"mimetype\" using \"g_free\" but it should have been freed using \"free\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "free" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 449| if (g_strcmp0 (mimetype, \"inode/directory\") == 0)" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 450| {" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 451|-> g_free (mimetype);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 452| return FALSE;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 453| }" + } + } + ] + }, + { + "ruleId": "ALLOC_FREE_MISMATCH: free", + "properties": { + "cwe": "CWE-762" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 454, + "endLine": 454, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 452| return FALSE;\n 453| }\n 454|-> g_free (mimetype);\n 455| \n 456| /* Exists */" + } + } + } + } + ], + "message": { + "text": "Calling \"g_free\" frees \"mimetype\" using \"g_free\" but it should have been freed using \"free\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_bookmark_file_get_is_private(bookmarks, uri, NULL)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 444, + "endLine": 444, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_ascii_strncasecmp(uri, \"file:/\", 6) != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 448, + "endLine": 448, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Allocation of memory which must be freed using \"free\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 448, + "endLine": 448, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"mimetype\" = \"g_bookmark_file_get_mime_type(bookmarks, uri, NULL)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_strcmp0(mimetype, \"inode/directory\") == 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 454, + "endLine": 454, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_free\" frees \"mimetype\" using \"g_free\" but it should have been freed using \"free\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "free" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 452| return FALSE;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 453| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 454|-> g_free (mimetype);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 455| " + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 456| /* Exists */" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 499, + "endLine": 499, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 497| g_debug (\"reloading recent items\\n\");\n 498| \n 499|-> g_bookmark_file_load_from_file (backend->bookmarks, backend->filename, &error);\n 500| if (error != NULL)\n 501| {" + } + } + } + } + ], + "message": { + "text": "Calling \"g_bookmark_file_load_from_file(backend->bookmarks, backend->filename, &error)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendrecent.c" + }, + "region": { + "startLine": 499, + "endLine": 499, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_bookmark_file_load_from_file(backend->bookmarks, backend->filename, &error)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 497| g_debug (\"reloading recent items\\n\");" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 498| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 499|-> g_bookmark_file_load_from_file (backend->bookmarks, backend->filename, &error);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 500| if (error != NULL)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 501| {" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: internal warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + } + } + } + ], + "message": { + "text": "child 22546 timed out after 30s" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + } + }, + "message": { + "text": "child 22546 timed out after 30s" + } + }, + "nestingLevel": 0, + "kinds": [ + "internal warning" + ] + } + ] + } + ] + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 233, + "endLine": 233, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 231| make_fd_nonblocking (int fd)\n 232| {\n 233|-> fcntl (fd, F_SETFL, O_NONBLOCK | fcntl (fd, F_GETFL));\n 234| }\n 235| " + } + } + } + } + ], + "message": { + "text": "Calling \"fcntl(fd, 4, 0x800 | fcntl(fd, 3))\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 233, + "endLine": 233, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"fcntl(fd, 4, 0x800 | fcntl(fd, 3))\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 231| make_fd_nonblocking (int fd)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 232| {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 233|-> fcntl (fd, F_SETFL, O_NONBLOCK | fcntl (fd, F_GETFL));" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 234| }" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 235| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 459, + "endLine": 459, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 457| env = read_dbus_string_dict_value (iter, \"SSH_AUTH_SOCK\");\n 458| if (env && env[0])\n 459|-> g_setenv (\"SSH_AUTH_SOCK\", env, TRUE);\n 460| g_free (env);\n 461| g_variant_unref (iter);" + } + } + } + } + ], + "message": { + "text": "Calling \"g_setenv(\"SSH_AUTH_SOCK\", env, 1)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 429, + "endLine": 429, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!conn\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 448, + "endLine": 448, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!iter\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 458, + "endLine": 458, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"env\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 458, + "endLine": 458, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"env[0]\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 459, + "endLine": 459, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Calling \"g_setenv(\"SSH_AUTH_SOCK\", env, 1)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 457| env = read_dbus_string_dict_value (iter, \"SSH_AUTH_SOCK\");" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 458| if (env && env[0])" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 459|-> g_setenv (\"SSH_AUTH_SOCK\", env, TRUE);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 460| g_free (env);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 461| g_variant_unref (iter);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 749, + "endLine": 749, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 747| {\n 748| g_data_output_stream_put_uint32 (stream, strlen (str), NULL, NULL);\n 749|-> g_data_output_stream_put_string (stream, str, NULL, NULL);\n 750| }\n 751| " + } + } + } + } + ], + "message": { + "text": "Calling \"g_data_output_stream_put_string(stream, str, NULL, NULL)\" without checking return value. It wraps a library function that may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 749, + "endLine": 749, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_data_output_stream_put_string(stream, str, NULL, NULL)\" without checking return value. It wraps a library function that may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 747| {" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 748| g_data_output_stream_put_uint32 (stream, strlen (str), NULL, NULL);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 749|-> g_data_output_stream_put_string (stream, str, NULL, NULL);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 750| }" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 751| " + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1673, + "endLine": 1673, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 1671| \n 1672| if (first)\n 1673|-> send_command (conn);\n 1674| }\n 1675| " + } + } + } + } + ], + "message": { + "text": "Passing \"conn\" to \"send_command\", which dereferences null \"conn->command_queue\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1668, + "endLine": 1668, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"conn->command_queue == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1668, + "endLine": 1668, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"conn->command_queue\" to null implies that \"conn->command_queue\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1670, + "endLine": 1670, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing \"conn->command_queue\" as argument 1 to function \"g_list_append\", which returns that argument." + } + }, + "nestingLevel": 1, + "kinds": [ + "identity_transfer" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1670, + "endLine": 1670, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"conn->command_queue\" = \"g_list_append(conn->command_queue, buffer)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias_transfer" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1672, + "endLine": 1672, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"first\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1673, + "endLine": 1673, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Passing \"conn\" to \"send_command\", which dereferences null \"conn->command_queue\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1671| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1672| if (first)" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1673|-> send_command (conn);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1674| }" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1675| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1779, + "endLine": 1779, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 1777| reply);\n 1778| }\n 1779|-> }\n 1780| \n 1781| static gboolean" + } + } + } + } + ], + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1761, + "endLine": 1761, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Condition \"__s == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1761, + "endLine": 1761, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1761, + "endLine": 1761, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_malloc0_n\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1761, + "endLine": 1761, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Assigning: \"__p\" = storage returned from \"g_malloc0_n(__n, __s)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1761, + "endLine": 1761, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Variable \"__p\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 1, + "kinds": [ + "leaked_storage" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1761, + "endLine": 1761, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"data\" = \"({...; __p;})\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1766, + "endLine": 1766, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "Condition \"__s == 1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1766, + "endLine": 1766, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1769, + "endLine": 1769, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"i < n_commands\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1779, + "endLine": 1779, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1777| reply);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1778| }" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1779|-> }" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1780| " + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1781| static gboolean" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1901, + "endLine": 1901, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1899| \n 1900| control_path = g_build_filename (g_get_user_runtime_dir (), \"gvfsd-sftp\", NULL);\n 1901|-> g_mkdir (control_path, 0700);\n 1902| \n 1903| args = setup_ssh_commandline (backend, control_path);" + } + } + } + } + ], + "message": { + "text": "Calling \"mkdir(control_path, 448U)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1901, + "endLine": 1901, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"mkdir(control_path, 448U)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1899| " + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1900| control_path = g_build_filename (g_get_user_runtime_dir (), \"gvfsd-sftp\", NULL);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1901|-> g_mkdir (control_path, 0700);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1902| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1903| args = setup_ssh_commandline (backend, control_path);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_handle", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1912, + "endLine": 1912, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1910| {\n 1911| g_strfreev (args);\n 1912|-> return FALSE;\n 1913| }\n 1914| " + } + } + } + } + ], + "message": { + "text": "Handle variable \"slave_fd\" going out of scope leaks the handle." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1906, + "endLine": 1906, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"spawn_ssh\" opens handle stored into \"slave_fd\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "open_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1906, + "endLine": 1906, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!spawn_ssh(backend, args, &pid, &tty_fd, &stdin_fd, &stdout_fd, &stderr_fd, &slave_fd, error)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1912, + "endLine": 1912, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Handle variable \"slave_fd\" going out of scope leaks the handle." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_handle" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1910| {" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1911| g_strfreev (args);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1912|-> return FALSE;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1913| }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1914| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_handle", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1950, + "endLine": 1950, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1948| \t}\n 1949| \n 1950|-> return FALSE;\n 1951| }\n 1952| " + } + } + } + } + ], + "message": { + "text": "Handle variable \"slave_fd\" going out of scope leaks the handle." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1906, + "endLine": 1906, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"spawn_ssh\" opens handle stored into \"slave_fd\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "open_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1906, + "endLine": 1906, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!spawn_ssh(backend, args, &pid, &tty_fd, &stdin_fd, &stdout_fd, &stderr_fd, &slave_fd, error)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1927, + "endLine": 1927, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tty_fd == -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1928, + "endLine": 1928, + "startColumn": 53, + "endColumn": 53 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1939, + "endLine": 1939, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!res\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1941, + "endLine": 1941, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"error\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1941, + "endLine": 1941, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"(*error)->code == G_IO_ERROR_INVALID_ARGUMENT\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1950, + "endLine": 1950, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Handle variable \"slave_fd\" going out of scope leaks the handle." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_handle" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1948| \t}" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1949| " + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1950|-> return FALSE;" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1951| }" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1952| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_handle", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1965, + "endLine": 1965, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 1963| {\n 1964| look_for_stderr_errors (connection, error);\n 1965|-> return FALSE;\n 1966| }\n 1967| " + } + } + } + } + ], + "message": { + "text": "Handle variable \"slave_fd\" going out of scope leaks the handle." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1906, + "endLine": 1906, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"spawn_ssh\" opens handle stored into \"slave_fd\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "open_arg" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1906, + "endLine": 1906, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!spawn_ssh(backend, args, &pid, &tty_fd, &stdin_fd, &stdout_fd, &stderr_fd, &slave_fd, error)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1927, + "endLine": 1927, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"tty_fd == -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1928, + "endLine": 1928, + "startColumn": 53, + "endColumn": 53 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1939, + "endLine": 1939, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!res\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1962, + "endLine": 1962, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"reply == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 1965, + "endLine": 1965, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Handle variable \"slave_fd\" going out of scope leaks the handle." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_handle" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1963| {" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1964| look_for_stderr_errors (connection, error);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1965|-> return FALSE;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1966| }" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1967| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3695, + "endLine": 3695, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 3693| \n 3694| if (reply_type == SSH_FXP_STATUS)\n 3695|-> error_from_status (job, reply, -1, -1, &error);\n 3696| else\n 3697| g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_FAILED," + } + } + } + } + ], + "message": { + "text": "Calling \"error_from_status\" without checking return value (as is done elsewhere 7 out of 8 times)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3694, + "endLine": 3694, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"reply_type == 101\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3695, + "endLine": 3695, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"error_from_status\" without checking return value (as is done elsewhere 7 out of 8 times)." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3069, + "endLine": 3069, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 1: Assigning: \"res\" = return value from \"error_from_status(job, reply, -1, -1, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3074, + "endLine": 3074, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"res\" has its value checked in \"res\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3124, + "endLine": 3124, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 2: Assigning: \"res\" = return value from \"error_from_status(job, reply, -1, -1, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3129, + "endLine": 3129, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"res\" has its value checked in \"res\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 2317, + "endLine": 2317, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 3: \"error_from_status(job, reply, failure_error, allowed_sftp_error, &error)\" has its value checked in \"error_from_status(job, reply, failure_error, allowed_sftp_error, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3203, + "endLine": 3203, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Example 4: Assigning: \"res\" = return value from \"error_from_status(job, reply, -1, -1, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_assign" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3208, + "endLine": 3208, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 4 (cont.): \"res\" has its value checked in \"res\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 3823, + "endLine": 3823, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Example 5: \"error_from_status(job, reply, G_IO_ERROR_EXISTS, -1, &error)\" has its value checked in \"error_from_status(job, reply, G_IO_ERROR_EXISTS, -1, &error)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_checked" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3693| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3694| if (reply_type == SSH_FXP_STATUS)" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3695|-> error_from_status (job, reply, -1, -1, &error);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3696| else" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3697| g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_FAILED," + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5658, + "endLine": 5658, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 5656| {\n 5657| if (handle->op_job->remove_source)\n 5658|-> g_unlink (handle->op_job->local_path);\n 5659| \n 5660| g_vfs_job_succeeded (job);" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5652, + "endLine": 5652, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"reply_type == 101\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5655, + "endLine": 5655, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"code == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5657, + "endLine": 5657, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"handle->op_job->remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5658, + "endLine": 5658, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5656| {" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5657| if (handle->op_job->remove_source)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5658|-> g_unlink (handle->op_job->local_path);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5659| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5660| g_vfs_job_succeeded (job);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5731, + "endLine": 5731, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 5729| {\n 5730| if (handle->op_job->remove_source)\n 5731|-> g_unlink (handle->op_job->local_path);\n 5732| \n 5733| g_vfs_job_succeeded (handle->job);" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5719, + "endLine": 5719, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"handle->tempname\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5730, + "endLine": 5730, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"handle->op_job->remove_source\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 5731, + "endLine": 5731, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Calling \"g_unlink(handle->op_job->local_path)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5729| {" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5730| if (handle->op_job->remove_source)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5731|-> g_unlink (handle->op_job->local_path);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5732| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 5733| g_vfs_job_succeeded (handle->job);" + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: deref_arg", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6548, + "endLine": 6548, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 6546| /* If we read short, issue another request for the remaining data. */\n 6547| if (request->response_len < request->request_len)\n 6548|-> pull_enqueue_request (handle,\n 6549| request->request_offset + request->response_len,\n 6550| request->request_len - request->response_len);" + } + } + } + } + ], + "message": { + "text": "Calling \"pull_enqueue_request\" dereferences freed pointer \"handle\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6512, + "endLine": 6512, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"handle\" = \"request->handle\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6517, + "endLine": 6517, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n_written == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6530, + "endLine": 6530, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"request->write_offset < request->response_len\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6541, + "endLine": 6541, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"handle->size >= 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6544, + "endLine": 6544, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"pull_try_start_write\" frees \"handle\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6547, + "endLine": 6547, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"request->response_len < request->request_len\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6548, + "endLine": 6548, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"pull_enqueue_request\" dereferences freed pointer \"handle\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "deref_arg" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6546| /* If we read short, issue another request for the remaining data. */" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6547| if (request->response_len < request->request_len)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6548|-> pull_enqueue_request (handle," + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6549| request->request_offset + request->response_len," + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6550| request->request_len - request->response_len);" + } + } + ] + }, + { + "ruleId": "USE_AFTER_FREE: deref_after_free", + "properties": { + "cwe": "CWE-416" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6551, + "endLine": 6551, + "startColumn": 8, + "endColumn": 8, + "snippet": { + "text": "Problem detected in this context:\n 6549| request->request_offset + request->response_len,\n 6550| request->request_len - request->response_len);\n 6551|-> else if (handle->max_req == 0)\n 6552| pull_try_finish (handle);\n 6553| else" + } + } + } + } + ], + "message": { + "text": "Dereferencing freed pointer \"handle\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6512, + "endLine": 6512, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"handle\" = \"request->handle\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6517, + "endLine": 6517, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"n_written == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6530, + "endLine": 6530, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"request->write_offset < request->response_len\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6541, + "endLine": 6541, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"handle->size >= 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6544, + "endLine": 6544, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"pull_try_start_write\" frees \"handle\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "freed_arg" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6547, + "endLine": 6547, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"request->response_len < request->request_len\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsftp.c" + }, + "region": { + "startLine": 6551, + "endLine": 6551, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Dereferencing freed pointer \"handle\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "deref_after_free" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6549| request->request_offset + request->response_len," + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6550| request->request_len - request->response_len);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6551|-> else if (handle->max_req == 0)" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6552| pull_try_finish (handle);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 6553| else" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmb.c" + }, + "region": { + "startLine": 485, + "endLine": 485, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 483| op_backend->password_save = G_PASSWORD_SAVE_NEVER;\n 484| \n 485|-> errsv = 0;\n 486| \n 487| /* If user is not specified, first and second iteration is kerberos resp." + } + } + } + } + ], + "message": { + "text": "Value stored to 'errsv' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmb.c" + }, + "region": { + "startLine": 485, + "endLine": 485, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'errsv' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmb.c" + }, + "region": { + "startLine": 485, + "endLine": 485, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'errsv' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 483| op_backend->password_save = G_PASSWORD_SAVE_NEVER;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 484| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 485|-> errsv = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 486| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 487| /* If user is not specified, first and second iteration is kerberos resp." + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 188, + "endLine": 188, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 186| smbc_free_context (backend->smb_context, TRUE);\n 187| \n 188|-> g_list_free_full (backend->entries, (GDestroyNotify)browse_entry_free);\n 189| \n 190| if (G_OBJECT_CLASS (g_vfs_backend_smb_browse_parent_class)->finalize)" + } + } + } + } + ], + "message": { + "text": "Accessing \"backend->entries\" without holding lock \"_GVfsBackendSmbBrowse.entries_lock\". Elsewhere, \"_GVfsBackendSmbBrowse.entries\" is written to with \"_GVfsBackendSmbBrowse.entries_lock\" held 1 out of 1 times." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 188, + "endLine": 188, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"backend->entries\" without holding lock \"_GVfsBackendSmbBrowse.entries_lock\". Elsewhere, \"_GVfsBackendSmbBrowse.entries\" is written to with \"_GVfsBackendSmbBrowse.entries_lock\" held 1 out of 1 times." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 474, + "endLine": 474, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsBackendSmbBrowse.entries_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 478, + "endLine": 478, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsBackendSmbBrowse.entries\" is written to with lock \"_GVfsBackendSmbBrowse.entries_lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 186| smbc_free_context (backend->smb_context, TRUE);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 187| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 188|-> g_list_free_full (backend->entries, (GDestroyNotify)browse_entry_free);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 189| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 190| if (G_OBJECT_CLASS (g_vfs_backend_smb_browse_parent_class)->finalize)" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 786, + "endLine": 786, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 784| g_debug (\"do_mount - URI = %s\\n\", uri);\n 785| \n 786|-> errsv = 0;\n 787| \n 788| do" + } + } + } + } + ], + "message": { + "text": "Value stored to 'errsv' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 786, + "endLine": 786, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'errsv' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendsmbbrowse.c" + }, + "region": { + "startLine": 786, + "endLine": 786, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'errsv' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 784| g_debug (\"do_mount - URI = %s\\n\", uri);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 785| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 786|-> errsv = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 787| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 788| do" + } + } + ] + }, + { + "ruleId": "INFINITE_LOOP: loop_top", + "properties": { + "cwe": "CWE-835" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendtrash.c" + }, + "region": { + "startLine": 95, + "endLine": 95, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 93| &data);\n 94| \n 95|-> while (!data.completed)\n 96| {\n 97| g_cond_wait (&data.cond, &data.mutex);" + } + } + } + } + ], + "message": { + "text": "Top of the loop." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendtrash.c" + }, + "region": { + "startLine": 95, + "endLine": 95, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Top of the loop." + } + }, + "nestingLevel": 0, + "kinds": [ + "loop_top" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendtrash.c" + }, + "region": { + "startLine": 98, + "endLine": 98, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Bottom of the loop." + } + }, + "nestingLevel": 1, + "kinds": [ + "loop_bottom" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsbackendtrash.c" + }, + "region": { + "startLine": 95, + "endLine": 95, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "If \"data.completed\" is initially false then it will remain false." + } + }, + "nestingLevel": 1, + "kinds": [ + "exit_condition" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 93| &data);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 94| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 95|-> while (!data.completed)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 96| {" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 97| g_cond_wait (&data.cond, &data.mutex);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfschannel.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 209| \n 210| /* Set as nonblocking to be sure that _async methods don't block. */\n 211|-> fcntl (socket_fds[0], F_SETFL, O_NONBLOCK);\n 212| fcntl (socket_fds[1], F_SETFL, O_NONBLOCK);\n 213| " + } + } + } + } + ], + "message": { + "text": "Calling \"fcntl(socket_fds[0], 4, 2048)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfschannel.c" + }, + "region": { + "startLine": 201, + "endLine": 201, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"ret == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfschannel.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"fcntl(socket_fds[0], 4, 2048)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 209| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 210| /* Set as nonblocking to be sure that _async methods don't block. */" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 211|-> fcntl (socket_fds[0], F_SETFL, O_NONBLOCK);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 212| fcntl (socket_fds[1], F_SETFL, O_NONBLOCK);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 213| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfschannel.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 210| /* Set as nonblocking to be sure that _async methods don't block. */\n 211| fcntl (socket_fds[0], F_SETFL, O_NONBLOCK);\n 212|-> fcntl (socket_fds[1], F_SETFL, O_NONBLOCK);\n 213| \n 214| start_request_reader (channel);" + } + } + } + } + ], + "message": { + "text": "Calling \"fcntl(socket_fds[1], 4, 2048)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfschannel.c" + }, + "region": { + "startLine": 201, + "endLine": 201, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"ret == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfschannel.c" + }, + "region": { + "startLine": 212, + "endLine": 212, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"fcntl(socket_fds[1], 4, 2048)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 210| /* Set as nonblocking to be sure that _async methods don't block. */" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 211| fcntl (socket_fds[0], F_SETFL, O_NONBLOCK);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 212|-> fcntl (socket_fds[1], F_SETFL, O_NONBLOCK);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 213| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 214| start_request_reader (channel);" + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 152, + "endLine": 152, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 150| \n 151| /* There may be some jobs outstanding if we've been force unmounted. */\n 152|-> if (daemon->jobs)\n 153| g_warning (\"daemon->jobs != NULL when finalizing daemon!\");\n 154| " + } + } + } + } + ], + "message": { + "text": "Accessing \"daemon->jobs\" without holding lock \"_GVfsDaemon.lock\". Elsewhere, \"_GVfsDaemon.jobs\" is written to with \"_GVfsDaemon.lock\" held 2 out of 3 times (2 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 148, + "endLine": 148, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"daemon->thread_pool != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 152, + "endLine": 152, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"daemon->jobs\" without holding lock \"_GVfsDaemon.lock\". Elsewhere, \"_GVfsDaemon.jobs\" is written to with \"_GVfsDaemon.lock\" held 2 out of 3 times (2 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 638, + "endLine": 638, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 639, + "endLine": 639, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 621, + "endLine": 621, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 622, + "endLine": 622, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 150| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 151| /* There may be some jobs outstanding if we've been force unmounted. */" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 152|-> if (daemon->jobs)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 153| g_warning (\"daemon->jobs != NULL when finalizing daemon!\");" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 154| " + } + } + ] + }, + { + "ruleId": "MISSING_LOCK: missing_lock", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 299, + "endLine": 299, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 297| daemon->mount_counter = 0;\n 298| \n 299|-> daemon->jobs = NULL;\n 300| daemon->registered_paths =\n 301| g_hash_table_new_full (g_str_hash, g_str_equal," + } + } + } + } + ], + "message": { + "text": "Accessing \"daemon->jobs\" without holding lock \"_GVfsDaemon.lock\". Elsewhere, \"_GVfsDaemon.jobs\" is written to with \"_GVfsDaemon.lock\" held 2 out of 3 times (2 of these accesses strongly imply that it is necessary)." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 293, + "endLine": 293, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"daemon->thread_pool != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 293, + "endLine": 293, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 293, + "endLine": 293, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_10;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 293, + "endLine": 293, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 299, + "endLine": 299, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Accessing \"daemon->jobs\" without holding lock \"_GVfsDaemon.lock\". Elsewhere, \"_GVfsDaemon.jobs\" is written to with \"_GVfsDaemon.lock\" held 2 out of 3 times (2 of these accesses strongly imply that it is necessary)." + } + }, + "nestingLevel": 0, + "kinds": [ + "missing_lock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 638, + "endLine": 638, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 639, + "endLine": 639, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 1 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 621, + "endLine": 621, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2: Calling \"g_mutex_lock\" acquires lock \"_GVfsDaemon.lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock_acquire" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 622, + "endLine": 622, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Example 2 (cont.): \"_GVfsDaemon.jobs\" is written to with lock \"_GVfsDaemon.lock\" held." + } + }, + "nestingLevel": 1, + "kinds": [ + "example_access" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 297| daemon->mount_counter = 0;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 298| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 299|-> daemon->jobs = NULL;" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 300| daemon->registered_paths =" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 301| g_hash_table_new_full (g_str_hash, g_str_equal," + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 835, + "endLine": 835, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 833| error_out:\n 834| g_free (address1);\n 835|-> g_unlink (socket_path);\n 836| g_free (socket_path);\n 837| return TRUE;" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(socket_path)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 800, + "endLine": 800, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"server == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 805, + "endLine": 805, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Jumping to label \"error_out\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsdaemon.c" + }, + "region": { + "startLine": 835, + "endLine": 835, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_unlink(socket_path)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 833| error_out:" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 834| g_free (address1);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 835|-> g_unlink (socket_path);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 836| g_free (socket_path);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 837| return TRUE;" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-dereference]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 771, + "endLine": 771, + "startColumn": 35, + "endColumn": 35, + "snippet": { + "text": "Problem detected in this context:\n 769| g_string_append_c (new_path, '/'); /* slash at end makes code easier */\n 770| /* cleanup: remove all double slashes */\n 771|-> while ((match = strstr (new_path->str, \"//\")) != NULL)\n 772| {\n 773| g_string_erase (new_path, match - new_path->str, 1);" + } + } + } + } + ], + "message": { + "text": "dereference of NULL ‘new_path’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + } + }, + "message": { + "text": "In function ‘g_vfs_ftp_dir_cache_funcs_resolve_default’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 771, + "endLine": 771, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "dereference of NULL ‘new_path’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-dereference]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘g_vfs_ftp_dir_cache_funcs_resolve_default’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/lib64/glib-2.0/include/glibconfig.h" + }, + "region": { + "startLine": 9, + "endLine": 9 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtypes.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/galloca.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 32, + "endLine": 32 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gi18n.h" + }, + "region": { + "startLine": 23, + "endLine": 23 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 28, + "endLine": 28 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(2) following ‘true’ branch (when ‘file’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmessages.h" + }, + "region": { + "startLine": 661, + "endLine": 661, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 753, + "endLine": 753, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_return_val_if_fail’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(3) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmessages.h" + }, + "region": { + "startLine": 661, + "endLine": 661, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 754, + "endLine": 754, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_return_val_if_fail’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(4) following ‘true’ branch (when ‘target’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmessages.h" + }, + "region": { + "startLine": 661, + "endLine": 661, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 754, + "endLine": 754, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_return_val_if_fail’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 756, + "endLine": 756, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/giochannel.h" + }, + "region": { + "startLine": 36, + "endLine": 36 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 56, + "endLine": 56 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 210, + "endLine": 210, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(6) inlined call to ‘g_string_append_c_inline’ from ‘g_vfs_ftp_dir_cache_funcs_resolve_default’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 769, + "endLine": 769, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_string_append_c’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(7) following ‘false’ branch (when ‘new_path’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 198, + "endLine": 198, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 205, + "endLine": 205, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "(8) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + } + }, + "message": { + "text": "In function ‘g_vfs_ftp_dir_cache_funcs_resolve_default’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftpdircache.c" + }, + "region": { + "startLine": 771, + "endLine": 771, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "(9) dereference of NULL ‘new_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 769| g_string_append_c (new_path, '/'); /* slash at end makes code easier */" + } + }, + { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 770| /* cleanup: remove all double slashes */" + } + }, + { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 771|-> while ((match = strstr (new_path->str, \"//\")) != NULL)" + } + }, + { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 772| {" + } + }, + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 773| g_string_erase (new_path, match - new_path->str, 1);" + } + } + ] + }, + { + "ruleId": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "cwe": "CWE-543" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 223, + "endLine": 223, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 221| if (g_cancellable_is_cancelled (task->cancellable))\n 222| {\n 223|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_CANCELLED,\n 224| \t\t _(\"Operation was cancelled\"));\n 225| break;" + } + } + } + } + ], + "message": { + "text": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread1 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false. Control is switched to Thread2." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_checks_field" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread2 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_checks_field" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_acquires_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 223, + "endLine": 223, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Thread2 sets \"error\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_modifies_field" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_acquires_lock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 223, + "endLine": 223, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost." + } + }, + "nestingLevel": 0, + "kinds": [ + "thread1_overwrites_value_in_field" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Guard the modification of \"error\" and the read used to decide whether to modify \"error\" with the same set of locks." + } + }, + "nestingLevel": 1, + "kinds": [ + "use_same_locks_for_read_and_modify" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 221| if (g_cancellable_is_cancelled (task->cancellable))" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 222| {" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 223|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_CANCELLED," + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 224| \t\t _(\"Operation was cancelled\"));" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 225| break;" + } + } + ] + }, + { + "ruleId": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "cwe": "CWE-543" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 249| last_thread = g_thread_self ();\n 250| g_mutex_unlock (&ftp->mutex);\n 251|-> task->conn = g_vfs_ftp_connection_new (ftp->addr, task->cancellable, &task->error);\n 252| if (G_LIKELY (task->conn != NULL))\n 253| {" + } + } + } + } + ], + "message": { + "text": "Thread1 sets \"conn\" to a new value. Now the two threads have an inconsistent view of \"conn\" and updates to fields of \"conn\" or fields correlated with \"conn\" may be lost." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_acquires_lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Thread1 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true. After Thread1 leaves the critical section, control is switched to Thread2." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_checks_field" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_acquires_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Thread2 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_checks_field" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Thread2 sets \"conn\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field, even into (but not to the other side of) preceding locked regions. Control is switched back to Thread1." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_modifies_field" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Thread1 sets \"conn\" to a new value. Now the two threads have an inconsistent view of \"conn\" and updates to fields of \"conn\" or fields correlated with \"conn\" may be lost." + } + }, + "nestingLevel": 0, + "kinds": [ + "thread1_overwrites_value_in_field" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Guard the modification of \"conn\" and the read used to decide whether to modify \"conn\" with the same set of locks." + } + }, + "nestingLevel": 1, + "kinds": [ + "use_same_locks_for_read_and_modify" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 249| last_thread = g_thread_self ();" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 250| g_mutex_unlock (&ftp->mutex);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 251|-> task->conn = g_vfs_ftp_connection_new (ftp->addr, task->cancellable, &task->error);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 252| if (G_LIKELY (task->conn != NULL))" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 253| {" + } + } + ] + }, + { + "ruleId": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "cwe": "CWE-543" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 261, + "endLine": 261, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 259| \n 260| g_vfs_ftp_connection_free (task->conn);\n 261|-> task->conn = NULL;\n 262| }\n 263| " + } + } + } + } + ], + "message": { + "text": "Thread1 sets \"conn\" to a new value. Now the two threads have an inconsistent view of \"conn\" and updates to fields of \"conn\" or fields correlated with \"conn\" may be lost." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_acquires_lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Thread1 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true. After Thread1 leaves the critical section, control is switched to Thread2." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_checks_field" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_acquires_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Thread2 uses the value read from field \"conn\" in the condition \"task->conn == NULL\". It sees that the condition is true." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_checks_field" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 261, + "endLine": 261, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Thread2 sets \"conn\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field, even into (but not to the other side of) preceding locked regions. Control is switched back to Thread1." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_modifies_field" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 261, + "endLine": 261, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Thread1 sets \"conn\" to a new value. Now the two threads have an inconsistent view of \"conn\" and updates to fields of \"conn\" or fields correlated with \"conn\" may be lost." + } + }, + "nestingLevel": 0, + "kinds": [ + "thread1_overwrites_value_in_field" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 261, + "endLine": 261, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Guard the modification of \"conn\" and the read used to decide whether to modify \"conn\" with the same set of locks." + } + }, + "nestingLevel": 1, + "kinds": [ + "use_same_locks_for_read_and_modify" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 259| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 260| g_vfs_ftp_connection_free (task->conn);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 261|-> task->conn = NULL;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 262| }" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 263| " + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 272, + "endLine": 272, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 270| !g_vfs_ftp_task_error_matches (task, G_IO_ERROR, G_IO_ERROR_CANCELLED))\n 271| {\n 272|-> g_print (\"maybe: %u, max %u (due to %s)\\n\", maybe_max_connections, ftp->max_connections, task->error->message);\n 273| ftp->max_connections = MIN (ftp->max_connections, maybe_max_connections);\n 274| if (ftp->max_connections == 0)" + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"maybe_max_connections\" inside the second locked section. If the data that \"maybe_max_connections\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"task != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_14;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 208, + "endLine": 208, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 209, + "endLine": 209, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"task->conn == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 209, + "endLine": 209, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 209, + "endLine": 209, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_15;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 209, + "endLine": 209, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"task->error != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&ftp->mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"task->conn == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 219, + "endLine": 219, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"ftp->queue != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 221, + "endLine": 221, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_cancellable_is_cancelled(task->cancellable)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 229, + "endLine": 229, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"task->conn != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 231, + "endLine": 231, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"g_vfs_ftp_connection_is_usable(task->conn)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 239, + "endLine": 239, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"ftp->connections < ftp->max_connections\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 246, + "endLine": 246, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"maybe_max_connections\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 250, + "endLine": 250, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Unlocking \"&ftp->mutex\". \"maybe_max_connections\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Condition \"task->conn != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_16;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 257, + "endLine": 257, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "Condition \"!(task->error != NULL)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 257, + "endLine": 257, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_17;})\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 269, + "endLine": 269, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"last_thread == g_thread_self()\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 269, + "endLine": 269, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Condition \"!g_error_matches(task->error, g_io_error_quark(), G_IO_ERROR_CANCELLED)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 264, + "endLine": 264, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Locking \"&ftp->mutex\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 272, + "endLine": 272, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Using an unreliable value of \"maybe_max_connections\" inside the second locked section. If the data that \"maybe_max_connections\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 270| !g_vfs_ftp_task_error_matches (task, G_IO_ERROR, G_IO_ERROR_CANCELLED))" + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 271| {" + } + }, + { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 272|-> g_print (\"maybe: %u, max %u (due to %s)\\n\", maybe_max_connections, ftp->max_connections, task->error->message);" + } + }, + { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 273| ftp->max_connections = MIN (ftp->max_connections, maybe_max_connections);" + } + }, + { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 274| if (ftp->max_connections == 0)" + } + } + ] + }, + { + "ruleId": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "cwe": "CWE-543" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 290, + "endLine": 290, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 288| !g_cond_wait_until (&ftp->cond, &ftp->mutex, end_time))\n 289| {\n 290|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_BUSY,\n 291| \t\t _(\"The FTP server is busy. Try again later\"));\n 292| break;" + } + } + } + } + ], + "message": { + "text": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread1 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false. Control is switched to Thread2." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_checks_field" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread2 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_checks_field" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_acquires_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 290, + "endLine": 290, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Thread2 sets \"error\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_modifies_field" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_acquires_lock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 290, + "endLine": 290, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost." + } + }, + "nestingLevel": 0, + "kinds": [ + "thread1_overwrites_value_in_field" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Guard the modification of \"error\" and the read used to decide whether to modify \"error\" with the same set of locks." + } + }, + "nestingLevel": 1, + "kinds": [ + "use_same_locks_for_read_and_modify" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 288| !g_cond_wait_until (&ftp->cond, &ftp->mutex, end_time))" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 289| {" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 290|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_BUSY," + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 291| \t\t _(\"The FTP server is busy. Try again later\"));" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 292| break;" + } + } + ] + }, + { + "ruleId": "LOCK_EVASION: thread1_overwrites_value_in_field", + "properties": { + "cwe": "CWE-543" + }, + "level": "error", + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 296, + "endLine": 296, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 294| }\n 295| if (!ftp->queue)\n 296|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED,\n 297| _(\"Backend currently unmounting\"));\n 298| g_mutex_unlock (&ftp->mutex);" + } + } + } + } + ], + "message": { + "text": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread1 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false. Control is switched to Thread2." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_checks_field" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Thread2 uses the value read from field \"error\" in the condition \"task->error != NULL\". It sees that the condition is false." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_checks_field" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread2 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_acquires_lock" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 296, + "endLine": 296, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Thread2 sets \"error\" to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread2_modifies_field" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 215, + "endLine": 215, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Thread1 acquires lock \"_GVfsBackendFtp.mutex\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "thread1_acquires_lock" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 296, + "endLine": 296, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Thread1 sets \"error\" to a new value. Now the two threads have an inconsistent view of \"error\" and updates to fields of \"error\" or fields correlated with \"error\" may be lost." + } + }, + "nestingLevel": 0, + "kinds": [ + "thread1_overwrites_value_in_field" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsftptask.c" + }, + "region": { + "startLine": 211, + "endLine": 211, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Guard the modification of \"error\" and the read used to decide whether to modify \"error\" with the same set of locks." + } + }, + "nestingLevel": 1, + "kinds": [ + "use_same_locks_for_read_and_modify" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 294| }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 295| if (!ftp->queue)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 296|-> task->error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED," + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 297| _(\"Backend currently unmounting\"));" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 298| g_mutex_unlock (&ftp->mutex);" + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_begin", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfshttpinputstream.c" + }, + "region": { + "startLine": 464, + "endLine": 464, + "startColumn": 10, + "endColumn": 10, + "snippet": { + "text": "Problem detected in this context:\n 462| break;\n 463| \n 464|-> case G_SEEK_END:\n 465| g_return_val_if_reached (FALSE);\n 466| break;" + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"case G_SEEK_END:\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfshttpinputstream.c" + }, + "region": { + "startLine": 464, + "endLine": 464, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "The \"switch\" governing value \"type\" cannot be \"G_SEEK_END\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfshttpinputstream.c" + }, + "region": { + "startLine": 464, + "endLine": 464, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"case G_SEEK_END:\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_begin" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 462| break;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 463| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 464|-> case G_SEEK_END:" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 465| g_return_val_if_reached (FALSE);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 466| break;" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfskeyring.c" + }, + "region": { + "startLine": 60, + "endLine": 60, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 58| }\n 59| \n 60|-> g_hash_table_insert (*attributes,\n 61| \t\t g_strdup (key),\n 62| \t\t g_strdup (value));" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"*attributes\" to \"g_hash_table_insert\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfskeyring.c" + }, + "region": { + "startLine": 50, + "endLine": 50, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"*attributes == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfskeyring.c" + }, + "region": { + "startLine": 53, + "endLine": 53, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!g_utf8_validate(value, -1, NULL)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfskeyring.c" + }, + "region": { + "startLine": 57, + "endLine": 57, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"*attributes\" = \"NULL\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assign_zero" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfskeyring.c" + }, + "region": { + "startLine": 60, + "endLine": 60, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"*attributes\" to \"g_hash_table_insert\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 58| }" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 59| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 60|-> g_hash_table_insert (*attributes," + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 61| \t\t g_strdup (key)," + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 62| \t\t g_strdup (value));" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[unix.Malloc]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 85| {\n 86| subscriber = monitor->priv->subscribers->data;\n 87|-> unsubscribe (subscriber);\n 88| }\n 89| " + } + } + } + } + ], + "message": { + "text": "Use of memory after it is freed" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Use of memory after it is freed" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[unix.Malloc]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Assuming field 'subscribers' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Loop condition is true. Entering loop body" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling 'unsubscribe'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 158, + "endLine": 158, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Memory is released" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Returning; memory was released via 1st parameter" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "Field 'subscribers' is not equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Loop condition is true. Entering loop body" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/gvfsmonitor.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Use of memory after it is freed" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 85| {" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 86| subscriber = monitor->priv->subscribers->data;" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 87|-> unsubscribe (subscriber);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 88| }" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 89| " + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 88, + "endLine": 88, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 86| \n 87| if (!g_file_test (fuse_path, G_FILE_TEST_EXISTS))\n 88|-> g_mkdir (fuse_path, 0700);\n 89| \n 90| /* The -f (foreground) option prevent libfuse to call daemon(). */" + } + } + } + } + ], + "message": { + "text": "Calling \"mkdir(fuse_path, 448U)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 76, + "endLine": 76, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!no_fuse\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 82, + "endLine": 82, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_strcmp0(g_get_user_runtime_dir(), g_get_user_cache_dir()) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 83, + "endLine": 83, + "startColumn": 71, + "endColumn": 71 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!g_file_test(fuse_path, G_FILE_TEST_EXISTS)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 88, + "endLine": 88, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Calling \"mkdir(fuse_path, 448U)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 86| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 87| if (!g_file_test (fuse_path, G_FILE_TEST_EXISTS))" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 88|-> g_mkdir (fuse_path, 0700);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 89| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 90| /* The -f (foreground) option prevent libfuse to call daemon(). */" + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_begin", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 206, + "endLine": 206, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 204| if (show_version)\n 205| {\n 206|-> g_print (PACKAGE_STRING \"\\n\");\n 207| return 0;\n 208| }" + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"g_print(\"gvfs 1.54.0\\n\");\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 177, + "endLine": 177, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"show_version\" = \"0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assignment" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "At condition \"show_version\", the value of \"show_version\" must be equal to 0." + } + }, + "nestingLevel": 1, + "kinds": [ + "const" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The condition \"show_version\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 206, + "endLine": 206, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"g_print(\"gvfs 1.54.0\\n\");\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_begin" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 204| if (show_version)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 205| {" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 206|-> g_print (PACKAGE_STRING \"\\n\");" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 207| return 0;" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 208| }" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 218, + "endLine": 218, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 216| /* This is needed for gvfsd-admin to ensure correct ownership. */\n 217| socket_dir = gvfs_get_socket_dir ();\n 218|-> g_mkdir (socket_dir, 0700);\n 219| g_free (socket_dir);\n 220| " + } + } + } + } + ], + "message": { + "text": "Calling \"mkdir(socket_dir, 448U)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 179, + "endLine": 179, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_getenv(\"GVFS_DISABLE_FUSE\") != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!g_option_context_parse(context, &argc, &argv, &error)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 199, + "endLine": 199, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_getenv(\"GVFS_DEBUG\")\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 204, + "endLine": 204, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"show_version\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 213, + "endLine": 213, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"daemon == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 218, + "endLine": 218, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"mkdir(socket_dir, 448U)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 216| /* This is needed for gvfsd-admin to ensure correct ownership. */" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 217| socket_dir = gvfs_get_socket_dir ();" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 218|-> g_mkdir (socket_dir, 0700);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 219| g_free (socket_dir);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 220| " + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_line", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 226, + "endLine": 226, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 224| flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;\n 225| if (replace)\n 226|-> flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;\n 227| \n 228| name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION," + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"flags |= G_BUS_NAME_OWNER_F...\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 174, + "endLine": 174, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"replace\" = \"0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assignment" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 225, + "endLine": 225, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "At condition \"replace\", the value of \"replace\" must be equal to 0." + } + }, + "nestingLevel": 1, + "kinds": [ + "const" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 225, + "endLine": 225, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The condition \"replace\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/main.c" + }, + "region": { + "startLine": 226, + "endLine": 226, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"flags |= G_BUS_NAME_OWNER_F...\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_line" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 224| flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 225| if (replace)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 226|-> flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 227| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 228| name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION," + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 762| }\n 763| \n 764|-> return TRUE;\n 765| }\n 766| " + } + } + } + } + ], + "message": { + "text": "Variable \"mount_spec\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 702, + "endLine": 702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"find_vfs_mount(id, arg_obj_path) != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 708, + "endLine": 708, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_mount_spec_from_dbus\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 708, + "endLine": 708, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Assigning: \"mount_spec\" = storage returned from \"g_mount_spec_from_dbus(arg_mount_spec)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 708, + "endLine": 708, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"(mount_spec = g_mount_spec_from_dbus(arg_mount_spec)) == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 714, + "endLine": 714, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Resource \"mount_spec\" is not freed or pointed-to in \"match_vfs_mount\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 714, + "endLine": 714, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Condition \"match_vfs_mount(mount_spec) != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 719, + "endLine": 719, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/mount.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Variable \"mount_spec\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 762| }" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 763| " + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 764|-> return TRUE;" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 765| }" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 766| " + } + } + ] + }, + { + "ruleId": "INTEGER_OVERFLOW: overflow_sink", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 250| \tint i;\n 251| \twhile (n < count) {\n 252|-> \t\ti = read(fd, buf + n, count - n);\n 253| \t\tswitch (i) {\n 254| \t\tcase 0:" + } + } + } + } + ], + "message": { + "text": "\"count - n\", which might have underflowed, is passed to \"read(fd, buf + n, count - n)\". [Note: The source code implementation of the function has been overridden by a builtin model.]" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 253, + "endLine": 253, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case default." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 253, + "endLine": 253, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case default." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "The check \"n < count\" contains the tainted expression \"n\" which causes \"count\" to be considered tainted." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_data_argument" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The expression \"count - n\" is deemed underflowed because at least one of its arguments has underflowed." + } + }, + "nestingLevel": 1, + "kinds": [ + "overflow" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"count - n\", which might have underflowed, is passed to \"read(fd, buf + n, count - n)\". [Note: The source code implementation of the function has been overridden by a builtin model.]" + } + }, + "nestingLevel": 0, + "kinds": [ + "overflow_sink" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 250| \tint i;" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 251| \twhile (n < count) {" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 252|-> \t\ti = read(fd, buf + n, count - n);" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 253| \t\tswitch (i) {" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 254| \t\tcase 0:" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 22, + "endColumn": 22, + "snippet": { + "text": "Problem detected in this context:\n 250| \tint i;\n 251| \twhile (n < count) {\n 252|-> \t\ti = read(fd, buf + n, count - n);\n 253| \t\tswitch (i) {\n 254| \t\tcase 0:" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 250| \tint i;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 251| \twhile (n < count) {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 252|-> \t\ti = read(fd, buf + n, count - n);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 253| \t\tswitch (i) {" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 254| \t\tcase 0:" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 33, + "endColumn": 33, + "snippet": { + "text": "Problem detected in this context:\n 250| \tint i;\n 251| \twhile (n < count) {\n 252|-> \t\ti = read(fd, buf + n, count - n);\n 253| \t\tswitch (i) {\n 254| \t\tcase 0:" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 33, + "endColumn": 33 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 250| \tint i;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 251| \twhile (n < count) {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 252|-> \t\ti = read(fd, buf + n, count - n);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 253| \t\tswitch (i) {" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 254| \t\tcase 0:" + } + } + ] + }, + { + "ruleId": "INTEGER_OVERFLOW: return_overflow", + "properties": { + "cwe": "CWE-190" + }, + "locations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 255, + "endLine": 255, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 253| \t\tswitch (i) {\n 254| \t\tcase 0:\n 255|-> \t\t\treturn n;\n 256| \t\t\tbreak;\n 257| \t\tcase -1:" + } + } + } + } + ], + "message": { + "text": "\"n\", which might have underflowed, is returned from the function." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 253, + "endLine": 253, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case default." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Called function \"read(fd, buf + n, count - n)\", and a possible return value may be less than zero." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_data_return" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "An assign that casts to a different type, which might trigger an overflow." + } + }, + "nestingLevel": 1, + "kinds": [ + "cast_overflow" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 253, + "endLine": 253, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case default." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 270, + "endLine": 270, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "The expression \"n += i\" might be negative, but is used in a context that treats it as unsigned." + } + }, + "nestingLevel": 1, + "kinds": [ + "overflow" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 273, + "endLine": 273, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 253, + "endLine": 253, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case value \"0\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 255, + "endLine": 255, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "\"n\", which might have underflowed, is returned from the function." + } + }, + "nestingLevel": 0, + "kinds": [ + "return_overflow" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 253| \t\tswitch (i) {" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 254| \t\tcase 0:" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 255|-> \t\t\treturn n;" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 256| \t\t\tbreak;" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 257| \t\tcase -1:" + } + } + ] + }, + { + "ruleId": "INTEGER_OVERFLOW: overflow_sink", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 285, + "endLine": 285, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 283| \tint i;\n 284| \twhile (n < count) {\n 285|-> \t\ti = write(fd, buf + n, count - n);\n 286| \t\tswitch (i) {\n 287| \t\tcase 0:" + } + } + } + } + ], + "message": { + "text": "\"count - n\", which might have underflowed, is passed to \"write(fd, buf + n, count - n)\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 286, + "endLine": 286, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case value \"-1\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 291, + "endLine": 291, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Switch case value \"4\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 297, + "endLine": 297, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 301, + "endLine": 301, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 286, + "endLine": 286, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case default." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 304, + "endLine": 304, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "The check \"n < count\" contains the tainted expression \"n\" which causes \"count\" to be considered tainted." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_data_argument" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 285, + "endLine": 285, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The expression \"count - n\" is deemed underflowed because at least one of its arguments has underflowed." + } + }, + "nestingLevel": 1, + "kinds": [ + "overflow" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 285, + "endLine": 285, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"count - n\", which might have underflowed, is passed to \"write(fd, buf + n, count - n)\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "overflow_sink" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 283| \tint i;" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 284| \twhile (n < count) {" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 285|-> \t\ti = write(fd, buf + n, count - n);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 286| \t\tswitch (i) {" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 287| \t\tcase 0:" + } + } + ] + }, + { + "ruleId": "INTEGER_OVERFLOW: return_overflow", + "properties": { + "cwe": "CWE-190" + }, + "locations": [ + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 288, + "endLine": 288, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 286| \t\tswitch (i) {\n 287| \t\tcase 0:\n 288|-> \t\t\treturn n;\n 289| \t\t\tbreak;\n 290| \t\tcase -1:" + } + } + } + } + ], + "message": { + "text": "\"n\", which might have underflowed, is returned from the function." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 286, + "endLine": 286, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case value \"-1\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 291, + "endLine": 291, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Switch case value \"4\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 297, + "endLine": 297, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 301, + "endLine": 301, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 285, + "endLine": 285, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Called function \"write(fd, buf + n, count - n)\", and a possible return value may be less than zero." + } + }, + "nestingLevel": 1, + "kinds": [ + "tainted_data_return" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 285, + "endLine": 285, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "An assign that casts to a different type, which might trigger an overflow." + } + }, + "nestingLevel": 1, + "kinds": [ + "cast_overflow" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 286, + "endLine": 286, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case default." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 303, + "endLine": 303, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "The expression \"n += i\" might be negative, but is used in a context that treats it as unsigned." + } + }, + "nestingLevel": 1, + "kinds": [ + "overflow" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 304, + "endLine": 304, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Breaking from switch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 306, + "endLine": 306, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 284, + "endLine": 284, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"n < count\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 286, + "endLine": 286, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Switch case value \"0\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 288, + "endLine": 288, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "\"n\", which might have underflowed, is returned from the function." + } + }, + "nestingLevel": 0, + "kinds": [ + "return_overflow" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 286| \t\tswitch (i) {" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 287| \t\tcase 0:" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 288|-> \t\t\treturn n;" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 289| \t\t\tbreak;" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 290| \t\tcase -1:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘pid_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘pid_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(25) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(35) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(36) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(37) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(38) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(39) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(40) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(41) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(42) ‘pid_pipe[0]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘pid_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘pid_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(25) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(35) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(36) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(37) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(38) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(39) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(40) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(41) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(42) ‘pid_pipe[1]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘stderr_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘stderr_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(23) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(31) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(35) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(37) ‘stderr_pipe[0]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘stderr_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘stderr_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(23) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(31) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(35) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(37) ‘stderr_pipe[1]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘stdin_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘stdin_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(35) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(37) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(38) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(39) ‘stdin_pipe[0]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘stdin_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘stdin_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(35) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(37) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(38) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(39) ‘stdin_pipe[1]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘stdout_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘stdout_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(23) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(28) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(31) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(35) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(37) ‘stdout_pipe[0]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-leak]", + "properties": { + "cwe": "CWE-775" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24, + "snippet": { + "text": "Problem detected in this context:\n 470| \t\t/* Error fork()ing. Bail. */\n 471| \t\t*child = -1;\n 472|-> \t\treturn -1;\n 473| \t\tbreak;\n 474| \tcase 0:" + } + } + } + } + ], + "message": { + "text": "leak of file descriptor ‘stdout_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "leak of file descriptor ‘stdout_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-leak]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(23) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(28) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(31) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(35) following ‘case -1:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 469, + "endLine": 469, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 472, + "endLine": 472, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(37) ‘stdout_pipe[1]’ leaks here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 470| \t\t/* Error fork()ing. Bail. */" + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 471| \t\t*child = -1;" + } + }, + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 472|-> \t\treturn -1;" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 473| \t\tbreak;" + } + }, + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 474| \tcase 0:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-use-of-uninitialized-value]", + "properties": { + "cwe": "CWE-457" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 25, + "endColumn": 25, + "snippet": { + "text": "Problem detected in this context:\n 487| \n 488| \t\tif(reapchild) {\n 489|-> \t\t\tclose(pid_pipe[0]);\n 490| \n 491| \t\t\t/* Fork a intermediate child. This is needed to not" + } + } + } + } + ], + "message": { + "text": "use of uninitialized value ‘pid_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "use of uninitialized value ‘pid_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-use-of-uninitialized-value]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 428, + "endLine": 428, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(21) region created on stack here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(35) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(37) following ‘case 0:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 474, + "endLine": 474, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(38) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 488, + "endLine": 488, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "(39) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(40) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 489, + "endLine": 489, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(41) use of uninitialized value ‘pid_pipe[0]’ here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 487| " + } + }, + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 488| \t\tif(reapchild) {" + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 489|-> \t\t\tclose(pid_pipe[0]);" + } + }, + { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 490| " + } + }, + { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 491| \t\t\t/* Fork a intermediate child. This is needed to not" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-use-without-check]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 526, + "endLine": 526, + "startColumn": 17, + "endColumn": 17, + "snippet": { + "text": "Problem detected in this context:\n 524| \n 525| \t\t/* Set up stdin/out/err */\n 526|-> \t\tdup2(stdin_pipe[0], STDIN_FILENO);\n 527| \t\tclose (stdin_pipe[0]);\n 528| \t\tdup2(stdout_pipe[1], STDOUT_FILENO);" + } + } + } + } + ], + "message": { + "text": "‘dup2’ on possibly invalid file descriptor ‘0’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 526, + "endLine": 526, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "‘dup2’ on possibly invalid file descriptor ‘0’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-use-without-check]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(26) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(29) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(32) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(33) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(34) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(35) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(36) following ‘case 0:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 474, + "endLine": 474, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(37) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 488, + "endLine": 488, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "(38) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(39) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "(40) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 516, + "endLine": 516, + "startColumn": 42, + "endColumn": 42 + } + }, + "message": { + "text": "(41) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 516, + "endLine": 516, + "startColumn": 28, + "endColumn": 28 + } + }, + "message": { + "text": "(42) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 517, + "endLine": 517, + "startColumn": 42, + "endColumn": 42 + } + }, + "message": { + "text": "(43) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 516, + "endLine": 516, + "startColumn": 47, + "endColumn": 47 + } + }, + "message": { + "text": "(44) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 518, + "endLine": 518, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(45) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 517, + "endLine": 517, + "startColumn": 47, + "endColumn": 47 + } + }, + "message": { + "text": "(46) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 46, + "endColumn": 46 + } + }, + "message": { + "text": "(47) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 518, + "endLine": 518, + "startColumn": 50, + "endColumn": 50 + } + }, + "message": { + "text": "(48) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 520, + "endLine": 520, + "startColumn": 46, + "endColumn": 46 + } + }, + "message": { + "text": "(49) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 519, + "endLine": 519, + "startColumn": 51, + "endColumn": 51 + } + }, + "message": { + "text": "(50) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 521, + "endLine": 521, + "startColumn": 33, + "endColumn": 33 + } + }, + "message": { + "text": "(51) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 521, + "endLine": 521, + "startColumn": 33, + "endColumn": 33 + } + }, + "message": { + "text": "(52) closed here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 515, + "endLine": 515, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "(53) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 526, + "endLine": 526, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(54) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 526, + "endLine": 526, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(55) ‘0’ could be invalid" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 58, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 524| " + } + }, + { + "id": 59, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 525| \t\t/* Set up stdin/out/err */" + } + }, + { + "id": 60, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 526|-> \t\tdup2(stdin_pipe[0], STDIN_FILENO);" + } + }, + { + "id": 61, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 527| \t\tclose (stdin_pipe[0]);" + } + }, + { + "id": 62, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 528| \t\tdup2(stdout_pipe[1], STDOUT_FILENO);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-use-of-uninitialized-value]", + "properties": { + "cwe": "CWE-457" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25, + "snippet": { + "text": "Problem detected in this context:\n 560| \n 561| \t\tif (reapchild) {\n 562|-> \t\t\tclose(pid_pipe[1]);\n 563| \n 564| \t\t\t/* Reap the intermediate child */" + } + } + } + } + ], + "message": { + "text": "use of uninitialized value ‘pid_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "use of uninitialized value ‘pid_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-use-of-uninitialized-value]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 428, + "endLine": 428, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(21) region created on stack here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(35) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(37) following ‘default:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 551, + "endLine": 551, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(38) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 561, + "endLine": 561, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(39) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(40) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(41) use of uninitialized value ‘pid_pipe[1]’ here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 560| " + } + }, + { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 561| \t\tif (reapchild) {" + } + }, + { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 562|-> \t\t\tclose(pid_pipe[1]);" + } + }, + { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 563| " + } + }, + { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 564| \t\t\t/* Reap the intermediate child */" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-double-close]", + "properties": { + "cwe": "CWE-1341" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 616, + "endLine": 616, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 614| bail_slavefd:\n 615| \tclose(stderr_pipe[0]);\n 616|-> \tclose(stderr_pipe[1]);\n 617| bail_stderr:\n 618| \tclose(stdout_pipe[0]);" + } + } + } + } + ], + "message": { + "text": "double ‘close’ of file descriptor ‘stderr_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 616, + "endLine": 616, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "double ‘close’ of file descriptor ‘stderr_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-double-close]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(25) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(26) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(29) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(32) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(33) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(34) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(35) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(36) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(37) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(38) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(39) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(40) following ‘default:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 551, + "endLine": 551, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(41) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 559, + "endLine": 559, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(42) first ‘close’ here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 561, + "endLine": 561, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(43) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(44) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(45) calling ‘n_read’ from ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 246, + "endLine": 246, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(46) entry to ‘n_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(47) following ‘true’ branch (when ‘n < count’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(48) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(49) returning to ‘_pty_fork_on_pty_name’ from ‘n_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 616, + "endLine": 616, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(50) second ‘close’ here; first ‘close’ was at (42)" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 614| bail_slavefd:" + } + }, + { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 615| \tclose(stderr_pipe[0]);" + } + }, + { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 616|-> \tclose(stderr_pipe[1]);" + } + }, + { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 617| bail_stderr:" + } + }, + { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 618| \tclose(stdout_pipe[0]);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-double-close]", + "properties": { + "cwe": "CWE-1341" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 619, + "endLine": 619, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 617| bail_stderr:\n 618| \tclose(stdout_pipe[0]);\n 619|-> \tclose(stdout_pipe[1]);\n 620| bail_stdout:\n 621| \tclose(stdin_pipe[0]);" + } + } + } + } + ], + "message": { + "text": "double ‘close’ of file descriptor ‘stdout_pipe[1]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 619, + "endLine": 619, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "double ‘close’ of file descriptor ‘stdout_pipe[1]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-double-close]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(25) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(26) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(29) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(30) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(35) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(36) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(37) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(38) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(39) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(40) following ‘default:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 551, + "endLine": 551, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(41) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 558, + "endLine": 558, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(42) first ‘close’ here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 561, + "endLine": 561, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(43) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(44) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(45) calling ‘n_read’ from ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 246, + "endLine": 246, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(46) entry to ‘n_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(47) following ‘true’ branch (when ‘n < count’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(48) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(49) returning to ‘_pty_fork_on_pty_name’ from ‘n_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 619, + "endLine": 619, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(50) second ‘close’ here; first ‘close’ was at (42)" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 617| bail_stderr:" + } + }, + { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 618| \tclose(stdout_pipe[0]);" + } + }, + { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 619|-> \tclose(stdout_pipe[1]);" + } + }, + { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 620| bail_stdout:" + } + }, + { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 621| \tclose(stdin_pipe[0]);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-fd-double-close]", + "properties": { + "cwe": "CWE-1341" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 621, + "endLine": 621, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 619| \tclose(stdout_pipe[1]);\n 620| bail_stdout:\n 621|-> \tclose(stdin_pipe[0]);\n 622| \tclose(stdin_pipe[1]);\n 623| bail_stdin:" + } + } + } + } + ], + "message": { + "text": "double ‘close’ of file descriptor ‘stdin_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 621, + "endLine": 621, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "double ‘close’ of file descriptor ‘stdin_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-fd-double-close]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(21) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(25) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(26) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(27) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(28) opened here as read-write" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(29) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(30) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(32) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(33) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(35) when ‘pipe’ succeeds" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(36) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 462, + "endLine": 462, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(37) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 463, + "endLine": 463, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(38) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 467, + "endLine": 467, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(39) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 468, + "endLine": 468, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(40) following ‘default:’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 551, + "endLine": 551, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(41) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 557, + "endLine": 557, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(42) first ‘close’ here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 561, + "endLine": 561, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(43) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 562, + "endLine": 562, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(44) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(45) calling ‘n_read’ from ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 246, + "endLine": 246, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(46) entry to ‘n_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 251, + "endLine": 251, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(47) following ‘true’ branch (when ‘n < count’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 252, + "endLine": 252, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(48) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 579, + "endLine": 579, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(49) returning to ‘_pty_fork_on_pty_name’ from ‘n_read’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 621, + "endLine": 621, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(50) second ‘close’ here; first ‘close’ was at (42)" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 619| \tclose(stdout_pipe[1]);" + } + }, + { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 620| bail_stdout:" + } + }, + { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 621|-> \tclose(stdin_pipe[0]);" + } + }, + { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 622| \tclose(stdin_pipe[1]);" + } + }, + { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 623| bail_stdin:" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-use-of-uninitialized-value]", + "properties": { + "cwe": "CWE-457" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 17, + "endColumn": 17, + "snippet": { + "text": "Problem detected in this context:\n 623| bail_stdin:\n 624| \tif(reapchild) {\n 625|-> \t\tclose(pid_pipe[0]);\n 626| \t\tclose(pid_pipe[1]);\n 627| \t}" + } + } + } + } + ], + "message": { + "text": "use of uninitialized value ‘pid_pipe[0]’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "use of uninitialized value ‘pid_pipe[0]’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-use-of-uninitialized-value]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 905, + "endLine": 905, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(2) calling ‘_pty_open_unix98’ from ‘pty_open’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(6) calling ‘_pty_ptsname’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 663, + "endLine": 663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(7) entry to ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘i == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(10) returning to ‘_pty_open_unix98’ from ‘_pty_ptsname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(12) inlined call to ‘_pty_grantpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 725, + "endLine": 725, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(14) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(15) inlined call to ‘_pty_unlockpt’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(16) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + } + }, + "message": { + "text": "In function ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "(17) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 764, + "endLine": 764, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "(19) calling ‘_pty_fork_on_pty_name’ from ‘_pty_open_unix98’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘_pty_fork_on_pty_name’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 428, + "endLine": 428, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(21) region created on stack here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 434, + "endLine": 434, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(22) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(23) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 440, + "endLine": 440, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(24) following ‘false’ branch (when ‘reapchild == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(25) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) when ‘pipe’ fails" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 445, + "endLine": 445, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(27) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 447, + "endLine": 447, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 624, + "endLine": 624, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(29) following ‘true’ branch (when ‘reapchild != 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(30) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "(31) use of uninitialized value ‘pid_pipe[0]’ here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 623| bail_stdin:" + } + }, + { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 624| \tif(reapchild) {" + } + }, + { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 625|-> \t\tclose(pid_pipe[0]);" + } + }, + { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 626| \t\tclose(pid_pipe[1]);" + } + }, + { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 627| \t}" + } + } + ] + }, + { + "ruleId": "UNUSED_VALUE: assigned_pointer", + "properties": { + "cwe": "CWE-563" + }, + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 679, + "endLine": 679, + "startColumn": 10, + "endColumn": 10, + "snippet": { + "text": "Problem detected in this context:\n 677| \t\tdefault:\n 678| \t\t\tg_free(buf);\n 679|-> \t\t\tbuf = NULL;\n 680| \t\t\tbreak;\n 681| \t\t}" + } + } + } + } + ], + "message": { + "text": "Assigning value \"NULL\" to \"buf\" here, but that stored value is overwritten before it can be used." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 670, + "endLine": 670, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Overwriting previous write to \"buf\" with value from \"g_malloc0(len)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "value_overwrite" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 679, + "endLine": 679, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Assigning value \"NULL\" to \"buf\" here, but that stored value is overwritten before it can be used." + } + }, + "nestingLevel": 0, + "kinds": [ + "assigned_pointer" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 677| \t\tdefault:" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 678| \t\t\tg_free(buf);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 679|-> \t\t\tbuf = NULL;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 680| \t\t\tbreak;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 681| \t\t}" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 717, + "endLine": 717, + "startColumn": 2, + "endColumn": 2, + "snippet": { + "text": "Problem detected in this context:\n 715| \tflags = fcntl(fd, F_GETFL);\n 716| \tflags &= ~(O_NONBLOCK);\n 717|-> \tfcntl(fd, F_SETFL, flags);\n 718| \treturn fd;\n 719| }" + } + } + } + } + ], + "message": { + "text": "Calling \"fcntl(fd, 4, flags)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 717, + "endLine": 717, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Calling \"fcntl(fd, 4, flags)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 715| \tflags = fcntl(fd, F_GETFL);" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 716| \tflags &= ~(O_NONBLOCK);" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 717|-> \tfcntl(fd, F_SETFL, flags);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 718| \treturn fd;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 719| }" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[unix.Malloc]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 760, + "endLine": 760, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 758| \t\t (_pty_grantpt(fd) != 0) ||\n 759| \t\t (_pty_unlockpt(fd) != 0)) {\n 760|-> \t\t\tclose(fd);\n 761| \t\t\tfd = -1;\n 762| \t\t} else {" + } + } + } + } + ], + "message": { + "text": "Potential leak of memory pointed to by 'buf'" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 760, + "endLine": 760, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Potential leak of memory pointed to by 'buf'" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[unix.Malloc]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Calling '_pty_open_unix98'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Assuming the condition is true" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Calling '_pty_ptsname'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 670, + "endLine": 670, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Memory is allocated" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 672, + "endLine": 672, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Control jumps to 'case 0:' at line 673" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Returned allocated memory" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Left side of '||' is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "Assuming the condition is true" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 758, + "endLine": 758, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "Left side of '||' is true" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 760, + "endLine": 760, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Potential leak of memory pointed to by 'buf'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 758| \t\t (_pty_grantpt(fd) != 0) ||" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 759| \t\t (_pty_unlockpt(fd) != 0)) {" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 760|-> \t\t\tclose(fd);" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 761| \t\t\tfd = -1;" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 762| \t\t} else {" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 777, + "endLine": 777, + "startColumn": 2, + "endColumn": 2, + "snippet": { + "text": "Problem detected in this context:\n 775| \t\t}\n 776| \t}\n 777|-> \treturn fd;\n 778| }\n 779| " + } + } + } + } + ], + "message": { + "text": "Variable \"buf\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Condition \"fd != -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"_pty_ptsname\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"buf\" = storage returned from \"_pty_ptsname(fd)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"(buf = _pty_ptsname(fd)) == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"_pty_grantpt(fd) != 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 757, + "endLine": 757, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"_pty_unlockpt(fd) != 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 762, + "endLine": 762, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/pty_open.c" + }, + "region": { + "startLine": 777, + "endLine": 777, + "startColumn": 2, + "endColumn": 2 + } + }, + "message": { + "text": "Variable \"buf\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 775| \t\t}" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 776| \t}" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 777|-> \treturn fd;" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 778| }" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 779| " + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_op", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 78| new = items;\n 79| \n 80|-> while (new || *old)\n 81| {\n 82| int result;" + } + } + } + } + ], + "message": { + "text": "Dereferencing null pointer \"old\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"new\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"new == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"*old == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Comparing \"*old\" to null implies that \"*old\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"(result = (new == NULL) - (*old == NULL)) == 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"result < 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 90, + "endLine": 90, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Passing \"*old\" as argument 1 to function \"g_slist_prepend\", which returns that argument." + } + }, + "nestingLevel": 1, + "kinds": [ + "identity_transfer" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 90, + "endLine": 90, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assigning: \"*old\" = \"g_slist_prepend(*old, new->data)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias_transfer" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 91, + "endLine": 91, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assigning: \"old\" = \"&(*old)->next\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias_transfer" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 109, + "endLine": 109, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"new\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Dereferencing null pointer \"old\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_op" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 78| new = items;" + } + }, + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 79| " + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 80|-> while (new || *old)" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 81| {" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 82| int result;" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_op", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 82| int result;\n 83| \n 84|-> if ((result = (new == NULL) - (*old == NULL)) == 0)\n 85| result = compare_basename (new->data, (*old)->data);\n 86| " + } + } + } + } + ], + "message": { + "text": "Dereferencing null pointer \"old\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"new\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"new == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"*old == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Comparing \"*old\" to null implies that \"*old\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"(result = (new == NULL) - (*old == NULL)) == 0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"result < 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 90, + "endLine": 90, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Passing \"*old\" as argument 1 to function \"g_slist_prepend\", which returns that argument." + } + }, + "nestingLevel": 1, + "kinds": [ + "identity_transfer" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 90, + "endLine": 90, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assigning: \"*old\" = \"g_slist_prepend(*old, new->data)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias_transfer" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 91, + "endLine": 91, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assigning: \"old\" = \"&(*old)->next\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alias_transfer" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 94, + "endLine": 94, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 109, + "endLine": 109, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 80, + "endLine": 80, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"new\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"new == NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashdir.c" + }, + "region": { + "startLine": 84, + "endLine": 84, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Dereferencing null pointer \"old\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_op" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 82| int result;" + } + }, + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 83| " + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 84|-> if ((result = (new == NULL) - (*old == NULL)) == 0)" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 85| result = compare_basename (new->data, (*old)->data);" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 86| " + } + } + ] + }, + { + "ruleId": "ATOMICITY: use", + "properties": { + "cwe": "CWE-667" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 85| g_mutex_lock (&trash_expunge_lock);\n 86| \n 87|-> g_object_unref (directory);\n 88| }\n 89| " + } + } + } + } + ], + "message": { + "text": "Using an unreliable value of \"directory\" inside the second locked section. If the data that \"directory\" depends on was changed by another thread, this use might be incorrect." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 71, + "endLine": 71, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Locking \"&trash_expunge_lock\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "lock" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 75, + "endLine": 75, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_hash_table_size(trash_expunge_queue)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 79, + "endLine": 79, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Assigning data that might be protected by the lock to \"directory\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "def" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 83, + "endLine": 83, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Unlocking \"&trash_expunge_lock\". \"directory\" might now be unreliable because other threads can now change the data that it depends on." + } + }, + "nestingLevel": 1, + "kinds": [ + "unlock" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 85, + "endLine": 85, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Locking \"&trash_expunge_lock\" again." + } + }, + "nestingLevel": 1, + "kinds": [ + "lockagain" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 87, + "endLine": 87, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Using an unreliable value of \"directory\" inside the second locked section. If the data that \"directory\" depends on was changed by another thread, this use might be incorrect." + } + }, + "nestingLevel": 0, + "kinds": [ + "use" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 85| g_mutex_lock (&trash_expunge_lock);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 86| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 87|-> g_object_unref (directory);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 88| }" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 89| " + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 127, + "endLine": 127, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 125| g_assert (thread != NULL);\n 126| trash_expunge_alive = TRUE;\n 127|-> }\n 128| else\n 129| g_cond_signal (&trash_expunge_wait);" + } + } + } + } + ], + "message": { + "text": "Variable \"thread\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 106, + "endLine": 106, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 106, + "endLine": 106, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Condition \"!({...; gapg_temp_newval;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 106, + "endLine": 106, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Condition \"g_once_init_enter(&trash_expunge_initialised)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 106, + "endLine": 106, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Condition \"({...; !({...; gapg_temp_newval;}) && g_once_init_enter(&trash_expunge_initialised);})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 106, + "endLine": 106, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 106, + "endLine": 106, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_10;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 110, + "endLine": 110, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 115, + "endLine": 115, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!g_hash_table_lookup(trash_expunge_queue, directory)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 120, + "endLine": 120, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"trash_expunge_alive == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 124, + "endLine": 124, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_thread_new\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 124, + "endLine": 124, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"thread\" = storage returned from \"g_thread_new(\"trash-expunge\", trash_expunge_thread, NULL)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 125, + "endLine": 125, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"thread != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 125, + "endLine": 125, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 125, + "endLine": 125, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"({...; _g_boolean_var_11;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 125, + "endLine": 125, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashexpunge.c" + }, + "region": { + "startLine": 127, + "endLine": 127, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Variable \"thread\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 125| g_assert (thread != NULL);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 126| trash_expunge_alive = TRUE;" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 127|-> }" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 128| else" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 129| g_cond_signal (&trash_expunge_wait);" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/DerefNull]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashwatcher.c" + }, + "region": { + "startLine": 116, + "endLine": 116, + "startColumn": 8, + "endColumn": 8, + "snippet": { + "text": "Problem detected in this context:\n 114| slash++;\n 115| \n 116|-> *slash = '\\0';\n 117| \n 118| entry = g_unix_mount_for (pathname, NULL);" + } + } + } + } + ], + "message": { + "text": "A pointer is possibly assigned the return value of a standard library function that may return NULL and is not checked before use. NULL pointer use can lead to program crashes." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/daemon/trashlib/trashwatcher.c" + }, + "region": { + "startLine": 116, + "endLine": 116, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "A pointer is possibly assigned the return value of a standard library function that may return NULL and is not checked before use. NULL pointer use can lead to program crashes." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/DerefNull]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 114| slash++;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 115| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 116|-> *slash = '\\0';" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 117| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 118| entry = g_unix_mount_for (pathname, NULL);" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 479, + "endLine": 479, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 477| replace = FALSE;\n 478| show_version = FALSE;\n 479|-> name_owner_id = 0;\n 480| \n 481| error = NULL;" + } + } + } + } + ], + "message": { + "text": "Value stored to 'name_owner_id' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 479, + "endLine": 479, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'name_owner_id' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 479, + "endLine": 479, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'name_owner_id' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 477| replace = FALSE;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 478| show_version = FALSE;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 479|-> name_owner_id = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 480| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 481| error = NULL;" + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_begin", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 500, + "endLine": 500, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 498| if (show_version)\n 499| {\n 500|-> g_print(PACKAGE_STRING \"\\n\");\n 501| return 0;\n 502| }" + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"g_print(\"gvfs 1.54.0\\n\");\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 478, + "endLine": 478, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"show_version\" = \"0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assignment" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 498, + "endLine": 498, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "At condition \"show_version\", the value of \"show_version\" must be equal to 0." + } + }, + "nestingLevel": 1, + "kinds": [ + "const" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 498, + "endLine": 498, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The condition \"show_version\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 500, + "endLine": 500, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"g_print(\"gvfs 1.54.0\\n\");\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_begin" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 498| if (show_version)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 499| {" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 500|-> g_print(PACKAGE_STRING \"\\n\");" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 501| return 0;" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 502| }" + } + } + ] + }, + { + "ruleId": "DEADCODE: dead_error_line", + "properties": { + "cwe": "CWE-561" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 525, + "endLine": 525, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 523| flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;\n 524| if (replace)\n 525|-> flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;\n 526| \n 527| skeleton = gvfs_metadata_skeleton_new ();" + } + } + } + } + ], + "message": { + "text": "Execution cannot reach this statement: \"flags |= G_BUS_NAME_OWNER_F...\"." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 477, + "endLine": 477, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"replace\" = \"0\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "assignment" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 524, + "endLine": 524, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "At condition \"replace\", the value of \"replace\" must be equal to 0." + } + }, + "nestingLevel": 1, + "kinds": [ + "const" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 524, + "endLine": 524, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "The condition \"replace\" cannot be true." + } + }, + "nestingLevel": 1, + "kinds": [ + "dead_error_condition" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-daemon.c" + }, + "region": { + "startLine": 525, + "endLine": 525, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Execution cannot reach this statement: \"flags |= G_BUS_NAME_OWNER_F...\"." + } + }, + "nestingLevel": 0, + "kinds": [ + "dead_error_line" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 523| flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 524| if (replace)" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 525|-> flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 526| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 527| skeleton = gvfs_metadata_skeleton_new ();" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-get-tree.c" + }, + "region": { + "startLine": 47, + "endLine": 47, + "startColumn": 14, + "endColumn": 14, + "snippet": { + "text": "Problem detected in this context:\n 45| \n 46| tree_path = NULL;\n 47|-> tree = meta_lookup_cache_lookup_path (cache, argv[i], statbuf.st_dev,\n 48| \t\t\t\t\t FALSE, &tree_path);\n 49| if (tree)" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-get-tree.c" + }, + "region": { + "startLine": 47, + "endLine": 47, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 45| " + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 46| tree_path = NULL;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 47|-> tree = meta_lookup_cache_lookup_path (cache, argv[i], statbuf.st_dev," + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 48| \t\t\t\t\t FALSE, &tree_path);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 49| if (tree)" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-get.c" + }, + "region": { + "startLine": 153, + "endLine": 153, + "startColumn": 14, + "endColumn": 14, + "snippet": { + "text": "Problem detected in this context:\n 151| \t return 1;\n 152| \t}\n 153|-> tree = meta_lookup_cache_lookup_path (lookup,\n 154| \t\t\t\t\t path,\n 155| \t\t\t\t\t statbuf.st_dev," + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-get.c" + }, + "region": { + "startLine": 153, + "endLine": 153, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 151| \t return 1;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 152| \t}" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 153|-> tree = meta_lookup_cache_lookup_path (lookup," + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 154| \t\t\t\t\t path," + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 155| \t\t\t\t\t statbuf.st_dev," + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-ls.c" + }, + "region": { + "startLine": 65, + "endLine": 65, + "startColumn": 10, + "endColumn": 10, + "snippet": { + "text": "Problem detected in this context:\n 63| }\n 64| \n 65|-> tree = meta_tree_open (argv[1], TRUE);\n 66| if (tree == NULL)\n 67| {" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-ls.c" + }, + "region": { + "startLine": 65, + "endLine": 65, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 63| }" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 64| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 65|-> tree = meta_tree_open (argv[1], TRUE);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 66| if (tree == NULL)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 67| {" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/PT]", + "properties": { + "cwe": "CWE-23" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-ls.c" + }, + "region": { + "startLine": 65, + "endLine": 65, + "startColumn": 10, + "endColumn": 10, + "snippet": { + "text": "Problem detected in this context:\n 63| }\n 64| \n 65|-> tree = meta_tree_open (argv[1], TRUE);\n 66| if (tree == NULL)\n 67| {" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into open, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitrary files." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-ls.c" + }, + "region": { + "startLine": 65, + "endLine": 65, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into open, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitrary files." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/PT]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 63| }" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 64| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 65|-> tree = meta_tree_open (argv[1], TRUE);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 66| if (tree == NULL)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 67| {" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-set.c" + }, + "region": { + "startLine": 82, + "endLine": 82, + "startColumn": 14, + "endColumn": 14, + "snippet": { + "text": "Problem detected in this context:\n 80| \t return 1;\n 81| \t}\n 82|-> tree = meta_lookup_cache_lookup_path (lookup,\n 83| \t\t\t\t\t path,\n 84| \t\t\t\t\t statbuf.st_dev," + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-set.c" + }, + "region": { + "startLine": 82, + "endLine": 82, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 80| \t return 1;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 81| \t}" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 82|-> tree = meta_lookup_cache_lookup_path (lookup," + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 83| \t\t\t\t\t path," + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 84| \t\t\t\t\t statbuf.st_dev," + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/BufferOverflow]", + "properties": { + "cwe": "CWE-122" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-set.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 181| else\n 182| \t{\n 183|-> \t if (!meta_tree_set_stringv (tree, tree_path, key, &argv[3]))\n 184| \t {\n 185| \t g_printerr (\"Unable to set key\\n\");" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a command line argument flows into memcpy, where it is used to manipulate application memory. This may result in a buffer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/meta-set.c" + }, + "region": { + "startLine": 183, + "endLine": 183, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Unsanitized input from a command line argument flows into memcpy, where it is used to manipulate application memory. This may result in a buffer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/BufferOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 181| else" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 182| \t{" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 183|-> \t if (!meta_tree_set_stringv (tree, tree_path, key, &argv[3]))" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 184| \t {" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 185| \t g_printerr (\"Unable to set key\\n\");" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 414| data->is_list = FALSE;\n 415| data->value = g_strdup (value);\n 416|-> }\n 417| \n 418| void" + } + } + } + } + ], + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 412, + "endLine": 412, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"metafile_key_lookup\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 412, + "endLine": 412, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"data\" = storage returned from \"metafile_key_lookup(metafile, key, 1)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 413, + "endLine": 413, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Resource \"data\" is not freed or pointed-to in \"metadata_clear\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 416, + "endLine": 416, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 414| data->is_list = FALSE;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 415| data->value = g_strdup (value);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 416|-> }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 417| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 418| void" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 432, + "endLine": 432, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 430| g_list_free_full (data->values, g_free);\n 431| data->values = NULL;\n 432|-> }\n 433| \n 434| void" + } + } + } + } + ], + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 424, + "endLine": 424, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"metafile_key_lookup\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 424, + "endLine": 424, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"data\" = storage returned from \"metafile_key_lookup(metafile, key, 1)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 425, + "endLine": 425, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!data->is_list\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 427, + "endLine": 427, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"data\" is not freed or pointed-to in \"metadata_clear\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 432, + "endLine": 432, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 430| g_list_free_full (data->values, g_free);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 431| data->values = NULL;" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 432|-> }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 433| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 434| void" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 447| \n 448| data->values = g_list_append (data->values, g_strdup (value));\n 449|-> }\n 450| \n 451| static void" + } + } + } + } + ], + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 441, + "endLine": 441, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Storage is returned from allocation function \"metafile_key_lookup\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 441, + "endLine": 441, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Assigning: \"data\" = storage returned from \"metafile_key_lookup(metafile, key, 1)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 442, + "endLine": 442, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!data->is_list\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 444, + "endLine": 444, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"data\" is not freed or pointed-to in \"metadata_clear\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 449, + "endLine": 449, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"data\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 447| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 448| data->values = g_list_append (data->values, g_strdup (value));" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 449|-> }" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 450| " + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 451| static void" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 821, + "endLine": 821, + "snippet": { + "text": "Problem detected in this context:\n 819| key = GPOINTER_TO_UINT (g_hash_table_lookup (key_hash, data->key));\n 820| if (data->is_list)\n 821|-> \tkey |= KEY_IS_LIST_MASK;\n 822| append_uint32 (out, key, NULL);\n 823| if (data->is_list)" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 821, + "endLine": 821 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 819| key = GPOINTER_TO_UINT (g_hash_table_lookup (key_hash, data->key));" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 820| if (data->is_list)" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 821|-> \tkey |= KEY_IS_LIST_MASK;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 822| append_uint32 (out, key, NULL);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 823| if (data->is_list)" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1245, + "endLine": 1245, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 1243| \n 1244| \t old_log = meta_builder_get_journal_filename (filename, old_tag);\n 1245|-> \t g_unlink (old_log);\n 1246| \t g_free (old_log);\n 1247| \t}" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(old_log)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1199, + "endLine": 1199, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"fd == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1202, + "endLine": 1202, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!write_all_data_and_close(fd, out->str, out->len)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1205, + "endLine": 1205, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!meta_builder_create_new_journal(filename, random_tag)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1210, + "endLine": 1210, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"rename(tmp_name, filename) == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1221, + "endLine": 1221, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"fd_dir > -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1229, + "endLine": 1229, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"fd2 != -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"data != (void *)0xffffffffffffffff\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1239, + "endLine": 1239, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1245, + "endLine": 1245, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Calling \"g_unlink(old_log)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1243| " + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1244| \t old_log = meta_builder_get_journal_filename (filename, old_tag);" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1245|-> \t g_unlink (old_log);" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1246| \t g_free (old_log);" + } + }, + { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1247| \t}" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1256, + "endLine": 1256, + "startColumn": 5, + "endColumn": 5, + "snippet": { + "text": "Problem detected in this context:\n 1254| out:\n 1255| if (fd != -1)\n 1256|-> g_unlink (tmp_name);\n 1257| g_string_free (out, TRUE);\n 1258| g_free (tmp_name);" + } + } + } + } + ], + "message": { + "text": "Calling \"g_unlink(tmp_name)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1199, + "endLine": 1199, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"fd == -1\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1202, + "endLine": 1202, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!write_all_data_and_close(fd, out->str, out->len)\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1205, + "endLine": 1205, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"!meta_builder_create_new_journal(filename, random_tag)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1206, + "endLine": 1206, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping to label \"out\"." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1255, + "endLine": 1255, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"fd != -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metabuilder.c" + }, + "region": { + "startLine": 1256, + "endLine": 1256, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Calling \"g_unlink(tmp_name)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1254| out:" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1255| if (fd != -1)" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1256|-> g_unlink (tmp_name);" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1257| g_string_free (out, TRUE);" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1258| g_free (tmp_name);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 395, + "endLine": 395, + "startColumn": 4, + "endColumn": 4, + "snippet": { + "text": "Problem detected in this context:\n 393| \n 394| \t dir = g_path_get_dirname (tree->filename);\n 395|-> \t g_mkdir_with_parents (dir, 0700);\n 396| \t g_free (dir);\n 397| " + } + } + } + } + ], + "message": { + "text": "Calling \"g_mkdir_with_parents(dir, 448)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 385, + "endLine": 385, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"fd == -1\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 389, + "endLine": 389, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"tree->for_write\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 389, + "endLine": 389, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!retried\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 395, + "endLine": 395, + "startColumn": 4, + "endColumn": 4 + } + }, + "message": { + "text": "Calling \"g_mkdir_with_parents(dir, 448)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 393| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 394| \t dir = g_path_get_dirname (tree->filename);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 395|-> \t g_mkdir_with_parents (dir, 0700);" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 396| \t g_free (dir);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 397| " + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 832, + "endLine": 832, + "snippet": { + "text": "Problem detected in this context:\n 830| guint32 key_id;\n 831| \n 832|-> key_id = GUINT32_FROM_BE (dataent->key) & ~KEY_IS_LIST_MASK;\n 833| \n 834| return key->id - key_id;" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 832, + "endLine": 832 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 830| guint32 key_id;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 831| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 832|-> key_id = GUINT32_FROM_BE (dataent->key) & ~KEY_IS_LIST_MASK;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 833| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 834| return key->id - key_id;" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 1500, + "endLine": 1500, + "snippet": { + "text": "Problem detected in this context:\n 1498| if (ent == NULL)\n 1499| type = META_KEY_TYPE_NONE;\n 1500|-> else if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)\n 1501| type = META_KEY_TYPE_STRINGV;\n 1502| else" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 1500, + "endLine": 1500 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1498| if (ent == NULL)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1499| type = META_KEY_TYPE_NONE;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1500|-> else if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1501| type = META_KEY_TYPE_STRINGV;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1502| else" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 1580, + "endLine": 1580, + "snippet": { + "text": "Problem detected in this context:\n 1578| if (ent == NULL)\n 1579| res = NULL;\n 1580|-> else if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)\n 1581| res = NULL;\n 1582| else" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 1580, + "endLine": 1580 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1578| if (ent == NULL)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1579| res = NULL;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1580|-> else if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1581| res = NULL;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1582| else" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 1658, + "endLine": 1658, + "snippet": { + "text": "Problem detected in this context:\n 1656| if (ent == NULL)\n 1657| res = NULL;\n 1658|-> else if ((GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK) == 0)\n 1659| res = NULL;\n 1660| else" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 1658, + "endLine": 1658 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1656| if (ent == NULL)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1657| res = NULL;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1658|-> else if ((GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK) == 0)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1659| res = NULL;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1660| else" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2065, + "endLine": 2065, + "snippet": { + "text": "Problem detected in this context:\n 2063| ent = &data->keys[i];\n 2064| \n 2065|-> key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;\n 2066| if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)\n 2067| \ttype = META_KEY_TYPE_STRINGV;" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2065, + "endLine": 2065 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2063| ent = &data->keys[i];" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2064| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2065|-> key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2066| if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2067| \ttype = META_KEY_TYPE_STRINGV;" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2066, + "endLine": 2066, + "snippet": { + "text": "Problem detected in this context:\n 2064| \n 2065| key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;\n 2066|-> if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)\n 2067| \ttype = META_KEY_TYPE_STRINGV;\n 2068| else" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2066, + "endLine": 2066 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2064| " + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2065| key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2066|-> if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2067| \ttype = META_KEY_TYPE_STRINGV;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2068| else" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2212, + "endLine": 2212, + "snippet": { + "text": "Problem detected in this context:\n 2210| \t ent = &data->keys[i];\n 2211| \n 2212|-> \t key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;\n 2213| \t if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)\n 2214| \t type = META_KEY_TYPE_STRINGV;" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2212, + "endLine": 2212 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2210| \t ent = &data->keys[i];" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2211| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2212|-> \t key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2213| \t if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2214| \t type = META_KEY_TYPE_STRINGV;" + } + } + ] + }, + { + "ruleId": "CPPCHECK_WARNING: error[integerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "error", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2213, + "endLine": 2213, + "snippet": { + "text": "Problem detected in this context:\n 2211| \n 2212| \t key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;\n 2213|-> \t if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)\n 2214| \t type = META_KEY_TYPE_STRINGV;\n 2215| \t else" + } + } + } + } + ], + "message": { + "text": "Signed integer overflow for expression '1<<31'." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2213, + "endLine": 2213 + } + }, + "message": { + "text": "Signed integer overflow for expression '1<<31'." + } + }, + "nestingLevel": 0, + "kinds": [ + "error[integerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2211| " + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2212| \t key_id = GUINT32_FROM_BE (ent->key) & ~KEY_IS_LIST_MASK;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2213|-> \t if (GUINT32_FROM_BE (ent->key) & KEY_IS_LIST_MASK)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2214| \t type = META_KEY_TYPE_STRINGV;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2215| \t else" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 2792| parent = g_path_get_dirname (path);\n 2793| if (strcmp (parent, \".\") == 0 ||\n 2794|-> strcmp (parent, path) == 0)\n 2795| {\n 2796| g_free (parent);" + } + } + } + } + ], + "message": { + "text": "use of NULL ‘path’ where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘get_dirname’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "use of NULL ‘path’ where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3324, + "endLine": 3324, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3281, + "endLine": 3281, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3290, + "endLine": 3290, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(4) calling ‘canonicalize_filename’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2663, + "endLine": 2663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(5) entry to ‘canonicalize_filename’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2669, + "endLine": 2669, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(6) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 37, + "endLine": 37 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/giochannel.h" + }, + "region": { + "startLine": 36, + "endLine": 36 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 56, + "endLine": 56 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.h" + }, + "region": { + "startLine": 26, + "endLine": 26 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 12, + "endLine": 12 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(7) inlined call to ‘g_strdup_inline’ from ‘canonicalize_filename’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2676, + "endLine": 2676, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(8) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(9) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘get_dirname’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2678, + "endLine": 2678, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "(10) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2680, + "endLine": 2680, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2695, + "endLine": 2695, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(12) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3290, + "endLine": 3290, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(13) returning to ‘expand_parents’ from ‘canonicalize_filename’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3291, + "endLine": 3291, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(14) calling ‘get_dirname’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2788, + "endLine": 2788, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(15) entry to ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(16) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(17) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(18) argument 2 (‘path’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 6, + "endLine": 6 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/string.h" + }, + "region": { + "startLine": 156, + "endLine": 156, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "argument 2 of ‘strcmp’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2792| parent = g_path_get_dirname (path);" + } + }, + { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2793| if (strcmp (parent, \".\") == 0 ||" + } + }, + { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2794|-> strcmp (parent, path) == 0)" + } + }, + { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2795| {" + } + }, + { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2796| g_free (parent);" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2914, + "endLine": 2914, + "startColumn": 17, + "endColumn": 17, + "snippet": { + "text": "Problem detected in this context:\n 2912| gssize rc;\n 2913| \n 2914|-> if (len - bytes_read < 100)\n 2915| \t{\n 2916| \t len = len + 4096;" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2914, + "endLine": 2914, + "startColumn": 17, + "endColumn": 17 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2912| gssize rc;" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2913| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2914|-> if (len - bytes_read < 100)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2915| \t{" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2916| \t len = len + 4096;" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2920, + "endLine": 2920, + "startColumn": 22, + "endColumn": 22, + "snippet": { + "text": "Problem detected in this context:\n 2918| \t}\n 2919| \n 2920|-> rc = read (fd, data + bytes_read,\n 2921| \t\t len - bytes_read);\n 2922| if (rc < 0)" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2920, + "endLine": 2920, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2918| \t}" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2919| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2920|-> rc = read (fd, data + bytes_read," + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2921| \t\t len - bytes_read);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2922| if (rc < 0)" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2920, + "endLine": 2920, + "startColumn": 29, + "endColumn": 29, + "snippet": { + "text": "Problem detected in this context:\n 2918| \t}\n 2919| \n 2920|-> rc = read (fd, data + bytes_read,\n 2921| \t\t len - bytes_read);\n 2922| if (rc < 0)" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2920, + "endLine": 2920, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Unsanitized input from a file flows into an addition operator (+), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2918| \t}" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2919| " + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2920|-> rc = read (fd, data + bytes_read," + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2921| \t\t len - bytes_read);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2922| if (rc < 0)" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2921, + "endLine": 2921, + "startColumn": 10, + "endColumn": 10, + "snippet": { + "text": "Problem detected in this context:\n 2919| \n 2920| rc = read (fd, data + bytes_read,\n 2921|-> \t\t len - bytes_read);\n 2922| if (rc < 0)\n 2923| \t{" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2921, + "endLine": 2921, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2919| " + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2920| rc = read (fd, data + bytes_read," + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2921|-> \t\t len - bytes_read);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2922| if (rc < 0)" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2923| \t{" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2937, + "endLine": 2937, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 2935| \n 2936| /* zero terminate */\n 2937|-> if (len - bytes_read < 1)\n 2938| data = g_realloc (data, bytes_read + 1);\n 2939| data[bytes_read] = 0;" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2937, + "endLine": 2937, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2935| " + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2936| /* zero terminate */" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2937|-> if (len - bytes_read < 1)" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2938| data = g_realloc (data, bytes_read + 1);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2939| data[bytes_read] = 0;" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2953, + "endLine": 2953, + "startColumn": 11, + "endColumn": 11, + "snippet": { + "text": "Problem detected in this context:\n 2951| s = strchr (escaped, ' ');\n 2952| if (s)\n 2953|-> len = s - escaped;\n 2954| else\n 2955| len = strlen (escaped);" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2953, + "endLine": 2953, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2951| s = strchr (escaped, ' ');" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2952| if (s)" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2953|-> len = s - escaped;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2954| else" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2955| len = strlen (escaped);" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2953, + "endLine": 2953, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 2951| s = strchr (escaped, ' ');\n 2952| if (s)\n 2953|-> len = s - escaped;\n 2954| else\n 2955| len = strlen (escaped);" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2953, + "endLine": 2953, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2951| s = strchr (escaped, ' ');" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2952| if (s)" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2953|-> len = s - escaped;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2954| else" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2955| len = strlen (escaped);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-possible-null-dereference]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2972, + "endLine": 2972, + "startColumn": 12, + "endColumn": 12, + "snippet": { + "text": "Problem detected in this context:\n 2970| else\n 2971| \tc = *escaped++;\n 2972|-> *s++ = c;\n 2973| }\n 2974| *s = 0;" + } + } + } + } + ], + "message": { + "text": "dereference of possibly-NULL ‘s’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘mountinfo_unescape’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2972, + "endLine": 2972, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "dereference of possibly-NULL ‘s’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-possible-null-dereference]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3324, + "endLine": 3324, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3281, + "endLine": 3281, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3292, + "endLine": 3292, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3294, + "endLine": 3294, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(6) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3372, + "endLine": 3372, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(7) calling ‘get_tree_for_device’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2848, + "endLine": 2848, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(8) entry to ‘get_tree_for_device’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2853, + "endLine": 2853, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(9) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2881, + "endLine": 2881, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(10) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3372, + "endLine": 3372, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(11) returning to ‘meta_lookup_cache_lookup_path’ from ‘get_tree_for_device’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3374, + "endLine": 3374, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(12) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3376, + "endLine": 3376, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3376, + "endLine": 3376, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(14) calling ‘find_mountpoint_for’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3143, + "endLine": 3143, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(15) entry to ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3152, + "endLine": 3152, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(16) calling ‘get_dirname’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2788, + "endLine": 2788, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(17) entry to ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(18) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(19) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 33, + "endColumn": 33 + } + }, + "message": { + "text": "(20) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(21) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3152, + "endLine": 3152, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(22) returning to ‘find_mountpoint_for’ from ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3153, + "endLine": 3153, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(23) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/lib64/glib-2.0/include/glibconfig.h" + }, + "region": { + "startLine": 9, + "endLine": 9 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtypes.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/galloca.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 32, + "endLine": 32 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(25) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(27) following ‘true’ branch (when the strings are equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3162, + "endLine": 3162, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3162, + "endLine": 3162, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(29) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(30) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3165, + "endLine": 3165, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 314, + "endLine": 314, + "startColumn": 48, + "endColumn": 48 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘mountinfo_unescape’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3166, + "endLine": 3166, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(33) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 58, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 59, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3171, + "endLine": 3171, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(35) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 60, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3173, + "endLine": 3173, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 61, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3175, + "endLine": 3175, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(37) inlined call to ‘get_extra_prefix_for_mount’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 62, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3123, + "endLine": 3123, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(38) calling ‘find_mountinfo_root_for_mountpoint’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 63, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘mountinfo_unescape’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 64, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3088, + "endLine": 3088, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(39) entry to ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 65, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3097, + "endLine": 3097, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(40) calling ‘update_mountinfo’ from ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 66, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3049, + "endLine": 3049, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(41) entry to ‘update_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 67, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3064, + "endLine": 3064, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(42) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 68, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3067, + "endLine": 3067, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(43) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 69, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3067, + "endLine": 3067, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(44) following ‘true’ branch (when ‘first == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 70, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3069, + "endLine": 3069, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(45) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 71, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3073, + "endLine": 3073, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(46) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 72, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3077, + "endLine": 3077, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(47) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 73, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3078, + "endLine": 3078, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(48) calling ‘read_contents’ from ‘update_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 74, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2900, + "endLine": 2900, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(49) entry to ‘read_contents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 75, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2914, + "endLine": 2914, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(50) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 76, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2920, + "endLine": 2920, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(51) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 77, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3078, + "endLine": 3078, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(52) returning to ‘update_mountinfo’ from ‘read_contents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 78, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3080, + "endLine": 3080, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(53) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 79, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3082, + "endLine": 3082, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(54) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 80, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3082, + "endLine": 3082, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(55) calling ‘parse_mountinfo’ from ‘update_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 81, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2979, + "endLine": 2979, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(56) entry to ‘parse_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 82, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2989, + "endLine": 2989, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(57) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 83, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2992, + "endLine": 2992, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(58) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 84, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2992, + "endLine": 2992, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(59) when ‘strchr’ returns non-NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 85, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2994, + "endLine": 2994, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(60) following ‘true’ branch (when ‘line’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 86, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(61) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 87, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(62) when ‘strchr’ returns non-NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 88, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2998, + "endLine": 2998, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(63) following ‘true’ branch (when ‘line’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 89, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3001, + "endLine": 3001, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(64) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 90, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3001, + "endLine": 3001, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(65) when ‘strchr’ returns non-NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 91, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3003, + "endLine": 3003, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(66) following ‘true’ branch (when ‘line’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 92, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3006, + "endLine": 3006, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(67) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 93, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3006, + "endLine": 3006, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(68) when ‘strchr’ returns NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 94, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3016, + "endLine": 3016, + "startColumn": 34, + "endColumn": 34 + } + }, + "message": { + "text": "(69) calling ‘mountinfo_unescape’ from ‘parse_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 95, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2945, + "endLine": 2945, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(70) entry to ‘mountinfo_unescape’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 96, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2951, + "endLine": 2951, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(71) when ‘strchr’ returns NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 97, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2952, + "endLine": 2952, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(72) following ‘false’ branch (when ‘s’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 98, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2955, + "endLine": 2955, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(73) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 99, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2956, + "endLine": 2956, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(74) this call could return NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 100, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2959, + "endLine": 2959, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(75) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 101, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2961, + "endLine": 2961, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(76) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 102, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2972, + "endLine": 2972, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(77) ‘s’ could be NULL: unchecked value from (74)" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 103, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2970| else" + } + }, + { + "id": 104, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2971| \tc = *escaped++;" + } + }, + { + "id": 105, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2972|-> *s++ = c;" + } + }, + { + "id": 106, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2973| }" + } + }, + { + "id": 107, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2974| *s = 0;" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-possible-null-dereference]", + "properties": { + "cwe": "CWE-476" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2974, + "endLine": 2974, + "startColumn": 6, + "endColumn": 6, + "snippet": { + "text": "Problem detected in this context:\n 2972| *s++ = c;\n 2973| }\n 2974|-> *s = 0;\n 2975| return res;\n 2976| }" + } + } + } + } + ], + "message": { + "text": "dereference of possibly-NULL ‘s’" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2974, + "endLine": 2974, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "dereference of possibly-NULL ‘s’" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-possible-null-dereference]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3324, + "endLine": 3324, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3281, + "endLine": 3281, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3292, + "endLine": 3292, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3294, + "endLine": 3294, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(6) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3372, + "endLine": 3372, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(7) calling ‘get_tree_for_device’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2848, + "endLine": 2848, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(8) entry to ‘get_tree_for_device’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2853, + "endLine": 2853, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(9) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2881, + "endLine": 2881, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(10) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3372, + "endLine": 3372, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(11) returning to ‘meta_lookup_cache_lookup_path’ from ‘get_tree_for_device’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3374, + "endLine": 3374, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(12) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3376, + "endLine": 3376, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3376, + "endLine": 3376, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(14) calling ‘find_mountpoint_for’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3143, + "endLine": 3143, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(15) entry to ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3152, + "endLine": 3152, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(16) calling ‘get_dirname’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2788, + "endLine": 2788, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(17) entry to ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(18) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(19) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 33, + "endColumn": 33 + } + }, + "message": { + "text": "(20) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(21) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3152, + "endLine": 3152, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(22) returning to ‘find_mountpoint_for’ from ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3153, + "endLine": 3153, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(23) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(25) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(27) following ‘true’ branch (when the strings are equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3162, + "endLine": 3162, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3162, + "endLine": 3162, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(29) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(30) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3165, + "endLine": 3165, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 314, + "endLine": 314, + "startColumn": 48, + "endColumn": 48 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘mountinfo_unescape’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3166, + "endLine": 3166, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(33) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3171, + "endLine": 3171, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(35) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3173, + "endLine": 3173, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3175, + "endLine": 3175, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(37) inlined call to ‘get_extra_prefix_for_mount’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3123, + "endLine": 3123, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(38) calling ‘find_mountinfo_root_for_mountpoint’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 58, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘mountinfo_unescape’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 59, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3088, + "endLine": 3088, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(39) entry to ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 60, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3097, + "endLine": 3097, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(40) calling ‘update_mountinfo’ from ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 61, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3049, + "endLine": 3049, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(41) entry to ‘update_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 62, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3064, + "endLine": 3064, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(42) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 63, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3067, + "endLine": 3067, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(43) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 64, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3067, + "endLine": 3067, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(44) following ‘true’ branch (when ‘first == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 65, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3069, + "endLine": 3069, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(45) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 66, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3073, + "endLine": 3073, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(46) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 67, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3077, + "endLine": 3077, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(47) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 68, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3078, + "endLine": 3078, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(48) calling ‘read_contents’ from ‘update_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 69, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2900, + "endLine": 2900, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(49) entry to ‘read_contents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 70, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2914, + "endLine": 2914, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(50) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 71, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2920, + "endLine": 2920, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(51) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 72, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3078, + "endLine": 3078, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(52) returning to ‘update_mountinfo’ from ‘read_contents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 73, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3080, + "endLine": 3080, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(53) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 74, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3082, + "endLine": 3082, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(54) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 75, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3082, + "endLine": 3082, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "(55) calling ‘parse_mountinfo’ from ‘update_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 76, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2979, + "endLine": 2979, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(56) entry to ‘parse_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 77, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2989, + "endLine": 2989, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(57) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 78, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2992, + "endLine": 2992, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(58) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 79, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2992, + "endLine": 2992, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(59) when ‘strchr’ returns non-NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 80, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2994, + "endLine": 2994, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(60) following ‘true’ branch (when ‘line’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 81, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(61) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 82, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2997, + "endLine": 2997, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(62) when ‘strchr’ returns non-NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 83, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2998, + "endLine": 2998, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(63) following ‘true’ branch (when ‘line’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 84, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3001, + "endLine": 3001, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(64) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 85, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3001, + "endLine": 3001, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "(65) when ‘strchr’ returns non-NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 86, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3003, + "endLine": 3003, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(66) following ‘true’ branch (when ‘line’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 87, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3006, + "endLine": 3006, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(67) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 88, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3006, + "endLine": 3006, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(68) when ‘strchr’ returns NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 89, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3016, + "endLine": 3016, + "startColumn": 34, + "endColumn": 34 + } + }, + "message": { + "text": "(69) calling ‘mountinfo_unescape’ from ‘parse_mountinfo’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 90, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2945, + "endLine": 2945, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(70) entry to ‘mountinfo_unescape’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 91, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2951, + "endLine": 2951, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(71) when ‘strchr’ returns NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 92, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2952, + "endLine": 2952, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(72) following ‘false’ branch (when ‘s’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 93, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2955, + "endLine": 2955, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(73) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 94, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2956, + "endLine": 2956, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "(74) this call could return NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 95, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2959, + "endLine": 2959, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(75) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 96, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2974, + "endLine": 2974, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(76) ...to here (77) ‘s’ could be NULL: unchecked value from (74)" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 97, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2972| *s++ = c;" + } + }, + { + "id": 98, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2973| }" + } + }, + { + "id": 99, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2974|-> *s = 0;" + } + }, + { + "id": 100, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2975| return res;" + } + }, + { + "id": 101, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2976| }" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: warning[cpp/IntegerOverflow]", + "properties": { + "cwe": "CWE-190" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3082, + "endLine": 3082, + "startColumn": 25, + "endColumn": 25, + "snippet": { + "text": "Problem detected in this context:\n 3080| if (contents)\n 3081| {\n 3082|-> mountinfo_roots = parse_mountinfo (contents);\n 3083| g_free (contents);\n 3084| }" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3082, + "endLine": 3082, + "startColumn": 25, + "endColumn": 25 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[cpp/IntegerOverflow]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3080| if (contents)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3081| {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3082|-> mountinfo_roots = parse_mountinfo (contents);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3083| g_free (contents);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3084| }" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3103, + "endLine": 3103, + "startColumn": 15, + "endColumn": 15, + "snippet": { + "text": "Problem detected in this context:\n 3101| for (i = 0; mountinfo_roots[i].mountpoint != NULL; i++)\n 3102| \t{\n 3103|-> \t if (strcmp (mountinfo_roots[i].mountpoint, mountpoint) == 0)\n 3104| \t {\n 3105| \t res = g_strdup (mountinfo_roots[i].root);" + } + } + } + } + ], + "message": { + "text": "use of NULL ‘mountpoint’ where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3103, + "endLine": 3103, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "use of NULL ‘mountpoint’ where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3324, + "endLine": 3324, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3281, + "endLine": 3281, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3292, + "endLine": 3292, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3294, + "endLine": 3294, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(6) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3372, + "endLine": 3372, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(7) calling ‘get_tree_for_device’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2848, + "endLine": 2848, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(8) entry to ‘get_tree_for_device’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2853, + "endLine": 2853, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(9) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2881, + "endLine": 2881, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(10) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3372, + "endLine": 3372, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(11) returning to ‘meta_lookup_cache_lookup_path’ from ‘get_tree_for_device’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3374, + "endLine": 3374, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(12) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3376, + "endLine": 3376, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(13) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3376, + "endLine": 3376, + "startColumn": 20, + "endColumn": 20 + } + }, + "message": { + "text": "(14) calling ‘find_mountpoint_for’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3143, + "endLine": 3143, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(15) entry to ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3152, + "endLine": 3152, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(16) calling ‘get_dirname’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2788, + "endLine": 2788, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(17) entry to ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(18) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2794, + "endLine": 2794, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(19) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 33, + "endColumn": 33 + } + }, + "message": { + "text": "(20) following ‘false’ branch (when the strings are non-equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(21) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3152, + "endLine": 3152, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(22) returning to ‘find_mountpoint_for’ from ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3153, + "endLine": 3153, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(23) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(25) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3159, + "endLine": 3159, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(26) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 8, + "endColumn": 8 + } + }, + "message": { + "text": "in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(27) following ‘true’ branch (when the strings are equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1244, + "endLine": 1244, + "startColumn": 43, + "endColumn": 43 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtestutils.h" + }, + "region": { + "startLine": 276, + "endLine": 276, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "in expansion of macro ‘G_LIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 44, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3160, + "endLine": 3160, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "in expansion of macro ‘g_assert’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 45, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3162, + "endLine": 3162, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(28) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 46, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3162, + "endLine": 3162, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(29) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 47, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(30) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 48, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3165, + "endLine": 3165, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 49, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 314, + "endLine": 314, + "startColumn": 48, + "endColumn": 48 + } + }, + "message": { + "text": "(31) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 50, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 51, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(32) inlined call to ‘g_strdup_inline’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 52, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3166, + "endLine": 3166, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 53, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(33) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 54, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(34) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 55, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3171, + "endLine": 3171, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(35) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 56, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3173, + "endLine": 3173, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(36) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 57, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3174, + "endLine": 3174, + "startColumn": 41, + "endColumn": 41 + } + }, + "message": { + "text": "(37) ‘last’ is NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 58, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3175, + "endLine": 3175, + "startColumn": 56, + "endColumn": 56 + } + }, + "message": { + "text": "(38) inlined call to ‘get_extra_prefix_for_mount’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 59, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3123, + "endLine": 3123, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(39) calling ‘find_mountinfo_root_for_mountpoint’ from ‘find_mountpoint_for’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 60, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 61, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3088, + "endLine": 3088, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(40) entry to ‘find_mountinfo_root_for_mountpoint’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 62, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3099, + "endLine": 3099, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(41) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 63, + "physicalLocation": { + "artifactLocation": { + "uri": "cc1" + } + }, + "message": { + "text": "(42) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 64, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3101, + "endLine": 3101, + "startColumn": 49, + "endColumn": 49 + } + }, + "message": { + "text": "(43) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 65, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3103, + "endLine": 3103, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(44) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 66, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3103, + "endLine": 3103, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(45) argument 2 (‘mountpoint’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 67, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/string.h" + }, + "region": { + "startLine": 156, + "endLine": 156, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "argument 2 of ‘strcmp’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 68, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3101| for (i = 0; mountinfo_roots[i].mountpoint != NULL; i++)" + } + }, + { + "id": 69, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3102| \t{" + } + }, + { + "id": 70, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3103|-> \t if (strcmp (mountinfo_roots[i].mountpoint, mountpoint) == 0)" + } + }, + { + "id": 71, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3104| \t {" + } + }, + { + "id": 72, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3105| \t res = g_strdup (mountinfo_roots[i].root);" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3265, + "endLine": 3265, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 3263| prefix_len = strlen (prefix);\n 3264| \n 3265|-> if (strncmp (path, prefix, prefix_len) == 0 &&\n 3266| (prefix_len == 0 || /* empty prefix always matches */\n 3267| prefix[prefix_len - 1] == '/' || /* last char in prefix was a /, so it must be in path too */" + } + } + } + } + ], + "message": { + "text": "use of NULL ‘path’ where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘path_has_prefix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3265, + "endLine": 3265, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "use of NULL ‘path’ where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3324, + "endLine": 3324, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(2) calling ‘expand_parents’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3281, + "endLine": 3281, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3290, + "endLine": 3290, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(4) calling ‘canonicalize_filename’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2663, + "endLine": 2663, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(5) entry to ‘canonicalize_filename’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2669, + "endLine": 2669, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(6) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 324, + "endLine": 324, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(7) inlined call to ‘g_strdup_inline’ from ‘canonicalize_filename’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2676, + "endLine": 2676, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "in expansion of macro ‘g_strdup’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(8) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 311, + "endLine": 311, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(9) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + } + }, + "message": { + "text": "In function ‘path_has_prefix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2678, + "endLine": 2678, + "startColumn": 19, + "endColumn": 19 + } + }, + "message": { + "text": "(10) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2680, + "endLine": 2680, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(11) following ‘false’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2695, + "endLine": 2695, + "startColumn": 10, + "endColumn": 10 + } + }, + "message": { + "text": "(12) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3290, + "endLine": 3290, + "startColumn": 15, + "endColumn": 15 + } + }, + "message": { + "text": "(13) returning to ‘expand_parents’ from ‘canonicalize_filename’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3291, + "endLine": 3291, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(14) calling ‘get_dirname’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2788, + "endLine": 2788, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(15) entry to ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2793, + "endLine": 2793, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(16) following ‘true’ branch (when the strings are equal)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 2796, + "endLine": 2796, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(17) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3291, + "endLine": 3291, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "(18) returning to ‘expand_parents’ from ‘get_dirname’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3292, + "endLine": 3292, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(19) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3294, + "endLine": 3294, + "startColumn": 23, + "endColumn": 23 + } + }, + "message": { + "text": "(20) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3355, + "endLine": 3355, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(21) returning to ‘meta_lookup_cache_lookup_path’ from ‘expand_parents’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3360, + "endLine": 3360, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(22) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3361, + "endLine": 3361, + "startColumn": 46, + "endColumn": 46 + } + }, + "message": { + "text": "(23) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3361, + "endLine": 3361, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(24) calling ‘path_has_prefix’ from ‘meta_lookup_cache_lookup_path’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3255, + "endLine": 3255, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(25) entry to ‘path_has_prefix’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3260, + "endLine": 3260, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(26) following ‘false’ branch (when ‘prefix’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3263, + "endLine": 3263, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(27) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3265, + "endLine": 3265, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(28) argument 1 (‘path’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/string.h" + }, + "region": { + "startLine": 159, + "endLine": 159, + "startColumn": 12, + "endColumn": 12 + } + }, + "message": { + "text": "argument 1 of ‘strncmp’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3263| prefix_len = strlen (prefix);" + } + }, + { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3264| " + } + }, + { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3265|-> if (strncmp (path, prefix, prefix_len) == 0 &&" + } + }, + { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3266| (prefix_len == 0 || /* empty prefix always matches */" + } + }, + { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3267| prefix[prefix_len - 1] == '/' || /* last char in prefix was a /, so it must be in path too */" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3345, + "endLine": 3345, + "startColumn": 7, + "endColumn": 7, + "snippet": { + "text": "Problem detected in this context:\n 3343| struct stat statbuf;\n 3344| \n 3345|-> g_stat (g_get_home_dir(), &statbuf);\n 3346| homedir_data_storage.device = statbuf.st_dev;\n 3347| e = canonicalize_filename (g_get_home_dir());" + } + } + } + } + ], + "message": { + "text": "Calling \"stat(g_get_home_dir(), &statbuf)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3340, + "endLine": 3340, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"0\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3340, + "endLine": 3340, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"!({...; gapg_temp_newval;})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3340, + "endLine": 3340, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"g_once_init_enter(&homedir_datap)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3340, + "endLine": 3340, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"({...; !({...; gapg_temp_newval;}) && g_once_init_enter(&homedir_datap);})\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/metadata/metatree.c" + }, + "region": { + "startLine": 3345, + "endLine": 3345, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Calling \"stat(g_get_home_dir(), &statbuf)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3343| struct stat statbuf;" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3344| " + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3345|-> g_stat (g_get_home_dir(), &statbuf);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3346| homedir_data_storage.device = statbuf.st_dev;" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 3347| e = canonicalize_filename (g_get_home_dir());" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[core.NullDereference]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 457, + "endLine": 457, + "startColumn": 50, + "endColumn": 50, + "snippet": { + "text": "Problem detected in this context:\n 455| if (self->client == NULL)\n 456| {\n 457|-> g_warning (\"Failed to connect to GOA: %s\", error->message);\n 458| g_error_free (error);\n 459| return;" + } + } + } + } + ], + "message": { + "text": "Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 457, + "endLine": 457, + "startColumn": 50, + "endColumn": 50 + } + }, + "message": { + "text": "Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[core.NullDereference]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 453, + "endLine": 453, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Null pointer value stored to 'error'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 454, + "endLine": 454, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "Calling 'get_goa_client_sync'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 331, + "endLine": 331, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "'?' condition is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gthread.h" + }, + "region": { + "startLine": 271, + "endLine": 271, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "expanded from macro 'g_once_init_enter'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 331, + "endLine": 331, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assuming the condition is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gthread.h" + }, + "region": { + "startLine": 272, + "endLine": 272, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "expanded from macro 'g_once_init_enter'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 331, + "endLine": 331, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Left side of '&&' is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gthread.h" + }, + "region": { + "startLine": 272, + "endLine": 272, + "startColumn": 39, + "endColumn": 39 + } + }, + "message": { + "text": "expanded from macro 'g_once_init_enter'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 331, + "endLine": 331, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking false branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 337, + "endLine": 337, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "'_error' is equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 337, + "endLine": 337, + "startColumn": 22, + "endColumn": 22 + } + }, + "message": { + "text": "Left side of '&&' is false" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 340, + "endLine": 340, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Returning without writing to '*error'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 454, + "endLine": 454, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "Returning from 'get_goa_client_sync'" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 455, + "endLine": 455, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "Field 'client' is equal to NULL" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 455, + "endLine": 455, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Taking true branch" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/goa/goavolumemonitor.c" + }, + "region": { + "startLine": 457, + "endLine": 457, + "startColumn": 50, + "endColumn": 50 + } + }, + "message": { + "text": "Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 455| if (self->client == NULL)" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 456| {" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 457|-> g_warning (\"Failed to connect to GOA: %s\", error->message);" + } + }, + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 458| g_error_free (error);" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 459| return;" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 662, + "endLine": 662, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 660| g_list_free_full (volumes, g_object_unref);\n 661| g_free (icon_data);\n 662|-> g_object_unref (icon);\n 663| g_free (symbolic_icon_data);\n 664| g_object_unref (symbolic_icon);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 570, + "endLine": 570, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"icon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 570, + "endLine": 570, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"icon\" to null implies that \"icon\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 575, + "endLine": 575, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"symbolic_icon\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 576, + "endLine": 576, + "startColumn": 58, + "endColumn": 58 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 592, + "endLine": 592, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"name == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 596, + "endLine": 596, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sort_key == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 600, + "endLine": 600, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 607, + "endLine": 607, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 600, + "endLine": 600, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 619, + "endLine": 619, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 634, + "endLine": 634, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 662, + "endLine": 662, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 660| g_list_free_full (volumes, g_object_unref);" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 661| g_free (icon_data);" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 662|-> g_object_unref (icon);" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 663| g_free (symbolic_icon_data);" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 664| g_object_unref (symbolic_icon);" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 664, + "endLine": 664, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 662| g_object_unref (icon);\n 663| g_free (symbolic_icon_data);\n 664|-> g_object_unref (symbolic_icon);\n 665| g_free (name);\n 666| g_free (id);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 570, + "endLine": 570, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"icon\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 571, + "endLine": 571, + "startColumn": 40, + "endColumn": 40 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 575, + "endLine": 575, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"symbolic_icon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 575, + "endLine": 575, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"symbolic_icon\" to null implies that \"symbolic_icon\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 592, + "endLine": 592, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"name == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 596, + "endLine": 596, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sort_key == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 600, + "endLine": 600, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 607, + "endLine": 607, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 600, + "endLine": 600, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 619, + "endLine": 619, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 610, + "endLine": 610, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 634, + "endLine": 634, + "startColumn": 5, + "endColumn": 5 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 625, + "endLine": 625, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 664, + "endLine": 664, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 662| g_object_unref (icon);" + } + }, + { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 663| g_free (symbolic_icon_data);" + } + }, + { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 664|-> g_object_unref (symbolic_icon);" + } + }, + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 665| g_free (name);" + } + }, + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 666| g_free (id);" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 805, + "endLine": 805, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 803| g_free (activation_uri);\n 804| g_free (icon_data);\n 805|-> g_object_unref (icon);\n 806| g_free (symbolic_icon_data);\n 807| g_object_unref (symbolic_icon);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 716, + "endLine": 716, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"icon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 716, + "endLine": 716, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"icon\" to null implies that \"icon\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 721, + "endLine": 721, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"symbolic_icon\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 722, + "endLine": 722, + "startColumn": 58, + "endColumn": 58 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 727, + "endLine": 727, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"activation_root == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 728, + "endLine": 728, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 734, + "endLine": 734, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"drive == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 739, + "endLine": 739, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"mount == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 740, + "endLine": 740, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"name == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 747, + "endLine": 747, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uuid == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 751, + "endLine": 751, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sort_key == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"id_value == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 760, + "endLine": 760, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Continuing loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 771, + "endLine": 771, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"always_call_mount\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 795, + "endLine": 795, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"mount != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 798, + "endLine": 798, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"drive != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 801, + "endLine": 801, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"activation_root != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 805, + "endLine": 805, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 803| g_free (activation_uri);" + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 804| g_free (icon_data);" + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 805|-> g_object_unref (icon);" + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 806| g_free (symbolic_icon_data);" + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 807| g_object_unref (symbolic_icon);" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 807, + "endLine": 807, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 805| g_object_unref (icon);\n 806| g_free (symbolic_icon_data);\n 807|-> g_object_unref (symbolic_icon);\n 808| g_free (name);\n 809| g_free (id);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 716, + "endLine": 716, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"icon\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 717, + "endLine": 717, + "startColumn": 40, + "endColumn": 40 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 721, + "endLine": 721, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"symbolic_icon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 721, + "endLine": 721, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"symbolic_icon\" to null implies that \"symbolic_icon\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 727, + "endLine": 727, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"activation_root == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 728, + "endLine": 728, + "startColumn": 35, + "endColumn": 35 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 734, + "endLine": 734, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"drive == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 735, + "endLine": 735, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 739, + "endLine": 739, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"mount == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 740, + "endLine": 740, + "startColumn": 29, + "endColumn": 29 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 745, + "endLine": 745, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"name == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 747, + "endLine": 747, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uuid == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 751, + "endLine": 751, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sort_key == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 759, + "endLine": 759, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"id_value == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 760, + "endLine": 760, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Continuing loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 755, + "endLine": 755, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"identifiers[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 771, + "endLine": 771, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"always_call_mount\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 795, + "endLine": 795, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"mount != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 798, + "endLine": 798, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"drive != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 801, + "endLine": 801, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"activation_root != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 807, + "endLine": 807, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 805| g_object_unref (icon);" + } + }, + { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 806| g_free (symbolic_icon_data);" + } + }, + { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 807|-> g_object_unref (symbolic_icon);" + } + }, + { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 808| g_free (name);" + } + }, + { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 809| g_free (id);" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 915, + "endLine": 915, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 913| g_free (uuid);\n 914| g_free (icon_data);\n 915|-> g_object_unref (icon);\n 916| g_free (symbolic_icon_data);\n 917| g_object_unref (symbolic_icon);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 853, + "endLine": 853, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"icon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 853, + "endLine": 853, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"icon\" to null implies that \"icon\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 858, + "endLine": 858, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"symbolic_icon\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 859, + "endLine": 859, + "startColumn": 58, + "endColumn": 58 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 867, + "endLine": 867, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"volume == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 868, + "endLine": 868, + "startColumn": 30, + "endColumn": 30 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 872, + "endLine": 872, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"name == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 874, + "endLine": 874, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uuid == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 878, + "endLine": 878, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sort_key == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 883, + "endLine": 883, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"x_content_types != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 885, + "endLine": 885, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"x_content_types[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 886, + "endLine": 886, + "startColumn": 87, + "endColumn": 87 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 885, + "endLine": 885, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"x_content_types[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 909, + "endLine": 909, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"volume != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 915, + "endLine": 915, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"icon\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 913| g_free (uuid);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 914| g_free (icon_data);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 915|-> g_object_unref (icon);" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 916| g_free (symbolic_icon_data);" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 917| g_object_unref (symbolic_icon);" + } + } + ] + }, + { + "ruleId": "FORWARD_NULL: var_deref_model", + "properties": { + "cwe": "CWE-476" + }, + "locations": [ + { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 917, + "endLine": 917, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 915| g_object_unref (icon);\n 916| g_free (symbolic_icon_data);\n 917|-> g_object_unref (symbolic_icon);\n 918| g_free (name);\n 919| g_free (id);" + } + } + } + } + ], + "message": { + "text": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 853, + "endLine": 853, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"icon\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 854, + "endLine": 854, + "startColumn": 40, + "endColumn": 40 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 858, + "endLine": 858, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"symbolic_icon\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 858, + "endLine": 858, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Comparing \"symbolic_icon\" to null implies that \"symbolic_icon\" might be null." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_compare_op" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 867, + "endLine": 867, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"volume == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 868, + "endLine": 868, + "startColumn": 30, + "endColumn": 30 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 872, + "endLine": 872, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"name == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 874, + "endLine": 874, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"uuid == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 878, + "endLine": 878, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"sort_key == NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 883, + "endLine": 883, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"x_content_types != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 885, + "endLine": 885, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"x_content_types[n] != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 886, + "endLine": 886, + "startColumn": 87, + "endColumn": 87 + } + }, + "message": { + "text": "Jumping back to the beginning of the loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 885, + "endLine": 885, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"x_content_types[n] != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 909, + "endLine": 909, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"volume != NULL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 917, + "endLine": 917, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Passing null pointer \"symbolic_icon\" to \"g_object_unref\", which dereferences it." + } + }, + "nestingLevel": 0, + "kinds": [ + "var_deref_model" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 915| g_object_unref (icon);" + } + }, + { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 916| g_free (symbolic_icon_data);" + } + }, + { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 917|-> g_object_unref (symbolic_icon);" + } + }, + { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 918| g_free (name);" + } + }, + { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 919| g_free (id);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1026, + "endLine": 1026, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 1024| mount_id = g_strdup_printf (\"%p\", mount);\n 1025| if (strcmp (mount_id, arg_id) == 0)\n 1026|-> break;\n 1027| \n 1028| g_free (mount_id);" + } + } + } + } + ], + "message": { + "text": "Variable \"mount_id\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1019, + "endLine": 1019, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1024, + "endLine": 1024, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_printf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1024, + "endLine": 1024, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"mount_id\" = storage returned from \"g_strdup_printf(\"%p\", mount)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1025, + "endLine": 1025, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"mount_id\" is not freed or pointed-to in \"strcmp\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1025, + "endLine": 1025, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(mount_id, arg_id) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1026, + "endLine": 1026, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1026, + "endLine": 1026, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Variable \"mount_id\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1024| mount_id = g_strdup_printf (\"%p\", mount);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1025| if (strcmp (mount_id, arg_id) == 0)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1026|-> break;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1027| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1028| g_free (mount_id);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1263, + "endLine": 1263, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 1261| volume_id = g_strdup_printf (\"%p\", volume);\n 1262| if (strcmp (volume_id, arg_id) == 0)\n 1263|-> break;\n 1264| \n 1265| g_free (volume_id);" + } + } + } + } + ], + "message": { + "text": "Variable \"volume_id\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1256, + "endLine": 1256, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1261, + "endLine": 1261, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_printf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1261, + "endLine": 1261, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"volume_id\" = storage returned from \"g_strdup_printf(\"%p\", volume)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1262, + "endLine": 1262, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"volume_id\" is not freed or pointed-to in \"strcmp\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1262, + "endLine": 1262, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(volume_id, arg_id) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1263, + "endLine": 1263, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1263, + "endLine": 1263, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Variable \"volume_id\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1261| volume_id = g_strdup_printf (\"%p\", volume);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1262| if (strcmp (volume_id, arg_id) == 0)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1263|-> break;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1264| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1265| g_free (volume_id);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1370, + "endLine": 1370, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 1368| drive_id = g_strdup_printf (\"%p\", drive);\n 1369| if (strcmp (drive_id, arg_id) == 0)\n 1370|-> break;\n 1371| \n 1372| g_free (drive_id);" + } + } + } + } + ], + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1363, + "endLine": 1363, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1368, + "endLine": 1368, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_printf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1368, + "endLine": 1368, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1369, + "endLine": 1369, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1369, + "endLine": 1369, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1370, + "endLine": 1370, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1370, + "endLine": 1370, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1368| drive_id = g_strdup_printf (\"%p\", drive);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1369| if (strcmp (drive_id, arg_id) == 0)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1370|-> break;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1371| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1372| g_free (drive_id);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1477, + "endLine": 1477, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 1475| drive_id = g_strdup_printf (\"%p\", drive);\n 1476| if (strcmp (drive_id, arg_id) == 0)\n 1477|-> break;\n 1478| \n 1479| g_free (drive_id);" + } + } + } + } + ], + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1470, + "endLine": 1470, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1475, + "endLine": 1475, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_printf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1475, + "endLine": 1475, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1476, + "endLine": 1476, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1476, + "endLine": 1476, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1477, + "endLine": 1477, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1477, + "endLine": 1477, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1475| drive_id = g_strdup_printf (\"%p\", drive);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1476| if (strcmp (drive_id, arg_id) == 0)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1477|-> break;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1478| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1479| g_free (drive_id);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1584, + "endLine": 1584, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 1582| drive_id = g_strdup_printf (\"%p\", drive);\n 1583| if (strcmp (drive_id, arg_id) == 0)\n 1584|-> break;\n 1585| \n 1586| g_free (drive_id);" + } + } + } + } + ], + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1577, + "endLine": 1577, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1582, + "endLine": 1582, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_printf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1582, + "endLine": 1582, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1583, + "endLine": 1583, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1583, + "endLine": 1583, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1584, + "endLine": 1584, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1584, + "endLine": 1584, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1582| drive_id = g_strdup_printf (\"%p\", drive);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1583| if (strcmp (drive_id, arg_id) == 0)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1584|-> break;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1585| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1586| g_free (drive_id);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1687, + "endLine": 1687, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 1685| drive_id = g_strdup_printf (\"%p\", drive);\n 1686| if (strcmp (drive_id, arg_id) == 0)\n 1687|-> break;\n 1688| \n 1689| g_free (drive_id);" + } + } + } + } + ], + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1680, + "endLine": 1680, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"l != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1685, + "endLine": 1685, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_printf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1685, + "endLine": 1685, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Assigning: \"drive_id\" = storage returned from \"g_strdup_printf(\"%p\", drive)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1686, + "endLine": 1686, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Resource \"drive_id\" is not freed or pointed-to in \"strcmp\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "noescape" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1686, + "endLine": 1686, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(drive_id, arg_id) == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1687, + "endLine": 1687, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Breaking from loop." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1687, + "endLine": 1687, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Variable \"drive_id\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1685| drive_id = g_strdup_printf (\"%p\", drive);" + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1686| if (strcmp (drive_id, arg_id) == 0)" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1687|-> break;" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1688| " + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1689| g_free (drive_id);" + } + } + ] + }, + { + "ruleId": "CHECKED_RETURN: check_return", + "properties": { + "cwe": "CWE-252" + }, + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1914, + "endLine": 1914, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 1912| * see remote-volume-monitor-module.c\n 1913| */\n 1914|-> g_setenv (\"GVFS_REMOTE_VOLUME_MONITOR_IGNORE\", \"1\", TRUE);\n 1915| \n 1916| setlocale (LC_ALL, \"\");" + } + } + } + } + ], + "message": { + "text": "Calling \"g_setenv(\"GVFS_REMOTE_VOLUME_MONITOR_IGNORE\", \"1\", 1)\" without checking return value. This library function may fail and return an error code." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 1914, + "endLine": 1914, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Calling \"g_setenv(\"GVFS_REMOTE_VOLUME_MONITOR_IGNORE\", \"1\", 1)\" without checking return value. This library function may fail and return an error code." + } + }, + "nestingLevel": 0, + "kinds": [ + "check_return" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1912| * see remote-volume-monitor-module.c" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1913| */" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1914|-> g_setenv (\"GVFS_REMOTE_VOLUME_MONITOR_IGNORE\", \"1\", TRUE);" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1915| " + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1916| setlocale (LC_ALL, \"\");" + } + } + ] + }, + { + "ruleId": "CLANG_WARNING: warning[deadcode.DeadStores]", + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 2047, + "endLine": 2047, + "startColumn": 3, + "endColumn": 3, + "snippet": { + "text": "Problem detected in this context:\n 2045| guint name_owner_id;\n 2046| \n 2047|-> name_owner_id = 0;\n 2048| \n 2049| loop = g_main_loop_new (NULL, FALSE);" + } + } + } + } + ], + "message": { + "text": "Value stored to 'name_owner_id' is never read" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 2047, + "endLine": 2047, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'name_owner_id' is never read" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[deadcode.DeadStores]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/proxy/gvfsproxyvolumemonitordaemon.c" + }, + "region": { + "startLine": 2047, + "endLine": 2047, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Value stored to 'name_owner_id' is never read" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2045| guint name_owner_id;" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2046| " + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2047|-> name_owner_id = 0;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2048| " + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 2049| loop = g_main_loop_new (NULL, FALSE);" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: leaked_storage", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c" + }, + "region": { + "startLine": 332, + "endLine": 332, + "startColumn": 1, + "endColumn": 1, + "snippet": { + "text": "Problem detected in this context:\n 330| g_task_return_boolean (task, TRUE);\n 331| g_object_unref (task);\n 332|-> }\n 333| \n 334| static gboolean" + } + } + } + } + ], + "message": { + "text": "Variable \"buf\" going out of scope leaks the storage it points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c" + }, + "region": { + "startLine": 312, + "endLine": 312, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_io_channel_read_to_end(data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c" + }, + "region": { + "startLine": 317, + "endLine": 317, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "\"g_io_channel_read_to_end\" allocates memory that is stored into \"buf\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_arg" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c" + }, + "region": { + "startLine": 317, + "endLine": 317, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"g_io_channel_read_to_end(data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL\", taking false branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2utils.c" + }, + "region": { + "startLine": 332, + "endLine": 332, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "Variable \"buf\" going out of scope leaks the storage it points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "leaked_storage" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 330| g_task_return_boolean (task, TRUE);" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 331| g_object_unref (task);" + } + }, + { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 332|-> }" + } + }, + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 333| " + } + }, + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 334| static gboolean" + } + } + ] + }, + { + "ruleId": "RESOURCE_LEAK: overwrite_var", + "properties": { + "cwe": "CWE-772" + }, + "level": "error", + "locations": [ + { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 9, + "endColumn": 9, + "snippet": { + "text": "Problem detected in this context:\n 911| {\n 912| if (gvfs_udisks2_volume_is_network_class (volume))\n 913|-> ret = g_strdup (\"network\");\n 914| else if (gvfs_udisks2_volume_is_loop_class (volume))\n 915| ret = g_strdup (\"loop\");" + } + } + } + } + ], + "message": { + "text": "Overwriting \"ret\" in \"ret = g_strdup_inline(\"network\")\" leaks the storage that \"ret\" points to." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 898, + "endLine": 898, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"volume->block != NULL\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 903, + "endLine": 903, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"strcmp(kind, \"unix-device\") == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 904, + "endLine": 904, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Storage is returned from allocation function \"g_strdup_inline\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "alloc_fn" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 904, + "endLine": 904, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Assigning: \"ret\" = storage returned from \"g_strdup_inline(volume->device_file)\"." + } + }, + "nestingLevel": 1, + "kinds": [ + "var_assign" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 904, + "endLine": 904, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "Falling through to end of if statement." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 910, + "endLine": 910, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "Condition \"strcmp(kind, \"class\") == 0\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 912, + "endLine": 912, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "Condition \"gvfs_udisks2_volume_is_network_class(volume)\", taking true branch." + } + }, + "nestingLevel": 2, + "kinds": [ + "path" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volume.c" + }, + "region": { + "startLine": 913, + "endLine": 913, + "startColumn": 9, + "endColumn": 9 + } + }, + "message": { + "text": "Overwriting \"ret\" in \"ret = g_strdup_inline(\"network\")\" leaks the storage that \"ret\" points to." + } + }, + "nestingLevel": 0, + "kinds": [ + "overwrite_var" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 911| {" + } + }, + { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 912| if (gvfs_udisks2_volume_is_network_class (volume))" + } + }, + { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 913|-> ret = g_strdup (\"network\");" + } + }, + { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 914| else if (gvfs_udisks2_volume_is_loop_class (volume))" + } + }, + { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 915| ret = g_strdup (\"loop\");" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1104, + "endLine": 1104, + "startColumn": 13, + "endColumn": 13, + "snippet": { + "text": "Problem detected in this context:\n 1102| \n 1103| if (g_str_has_suffix (mp_path, \"/\"))\n 1104|-> mp_path[strlen(mp_path) - 1] = '\\0';\n 1105| if (g_str_has_suffix (mp_entry, \"/\"))\n 1106| mp_entry[strlen(mp_entry) - 1] = '\\0';" + } + } + } + } + ], + "message": { + "text": "use of NULL where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + } + }, + "message": { + "text": "In function ‘mount_point_matches_mount_entry’" + } + }, + "nestingLevel": 1, + "kinds": [ + "scope_hint" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1104, + "endLine": 1104, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "use of NULL where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1662, + "endLine": 1662, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘update_mounts’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1702, + "endLine": 1702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(2) calling ‘diff_sorted_lists’ from ‘update_mounts’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 460, + "endLine": 460, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘diff_sorted_lists’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 470, + "endLine": 470, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘true’ branch (when ‘unchanged’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 471, + "endLine": 471, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 496, + "endLine": 496, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(6) following ‘true’ branch (when ‘list1’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 498, + "endLine": 498, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(7) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 501, + "endLine": 501, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘list2’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 503, + "endLine": 503, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 501, + "endLine": 501, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(10) following ‘false’ branch (when ‘list2’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 506, + "endLine": 506, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(11) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1702, + "endLine": 1702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(12) returning to ‘update_mounts’ from ‘diff_sorted_lists’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1719, + "endLine": 1719, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(13) following ‘true’ branch (when ‘l’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1721, + "endLine": 1721, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(14) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1732, + "endLine": 1732, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(15) calling ‘find_fstab_volume_for_mount_entry’ from ‘update_mounts’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1120, + "endLine": 1120, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(16) entry to ‘find_fstab_volume_for_mount_entry’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1126, + "endLine": 1126, + "startColumn": 38, + "endColumn": 38 + } + }, + "message": { + "text": "(17) following ‘true’ branch (when ‘l’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1128, + "endLine": 1128, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1129, + "endLine": 1129, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(19) calling ‘mount_point_matches_mount_entry’ from ‘find_fstab_volume_for_mount_entry’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1093, + "endLine": 1093, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘mount_point_matches_mount_entry’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/lib64/glib-2.0/include/glibconfig.h" + }, + "region": { + "startLine": 9, + "endLine": 9 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gtypes.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/galloca.h" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 32, + "endLine": 32 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 34, + "endLine": 34 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(21) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1245, + "endLine": 1245, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 190, + "endLine": 190, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "in expansion of macro ‘G_UNLIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1103, + "endLine": 1103, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘g_str_has_suffix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstring.h" + }, + "region": { + "startLine": 37, + "endLine": 37 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/giochannel.h" + }, + "region": { + "startLine": 36, + "endLine": 36 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib.h" + }, + "region": { + "startLine": 56, + "endLine": 56 + } + }, + "message": { + "text": "Included from here." + } + }, + "nestingLevel": 1, + "kinds": [ + "included_from" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 191, + "endLine": 191, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1103, + "endLine": 1103, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘g_str_has_suffix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1104, + "endLine": 1104, + "startColumn": 13, + "endColumn": 13 + } + }, + "message": { + "text": "(23) argument 1 (‘’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": "argument 1 of ‘__builtin_strlen’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1102| " + } + }, + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1103| if (g_str_has_suffix (mp_path, \"/\"))" + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1104|-> mp_path[strlen(mp_path) - 1] = '\\0';" + } + }, + { + "id": 42, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1105| if (g_str_has_suffix (mp_entry, \"/\"))" + } + }, + { + "id": 43, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1106| mp_entry[strlen(mp_entry) - 1] = '\\0';" + } + } + ] + }, + { + "ruleId": "GCC_ANALYZER_WARNING: warning[-Wanalyzer-null-argument]", + "properties": { + "cwe": "CWE-688" + }, + "level": "warning", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1106, + "endLine": 1106, + "startColumn": 14, + "endColumn": 14, + "snippet": { + "text": "Problem detected in this context:\n 1104| mp_path[strlen(mp_path) - 1] = '\\0';\n 1105| if (g_str_has_suffix (mp_entry, \"/\"))\n 1106|-> mp_entry[strlen(mp_entry) - 1] = '\\0';\n 1107| \n 1108| if (g_strcmp0 (mp_path, mp_entry) != 0)" + } + } + } + } + ], + "message": { + "text": "use of NULL where non-null expected" + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1106, + "endLine": 1106, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "use of NULL where non-null expected" + } + }, + "nestingLevel": 0, + "kinds": [ + "warning[-Wanalyzer-null-argument]" + ] + }, + { + "location": { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1662, + "endLine": 1662, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(1) entry to ‘update_mounts’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1702, + "endLine": 1702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(2) calling ‘diff_sorted_lists’ from ‘update_mounts’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 460, + "endLine": 460, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(3) entry to ‘diff_sorted_lists’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 470, + "endLine": 470, + "startColumn": 6, + "endColumn": 6 + } + }, + "message": { + "text": "(4) following ‘true’ branch (when ‘unchanged’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 471, + "endLine": 471, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(5) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 6, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 496, + "endLine": 496, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(6) following ‘true’ branch (when ‘list1’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 7, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 498, + "endLine": 498, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(7) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 8, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 501, + "endLine": 501, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(8) following ‘true’ branch (when ‘list2’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 9, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 503, + "endLine": 503, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(9) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 10, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 501, + "endLine": 501, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(10) following ‘false’ branch (when ‘list2’ is NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 11, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 506, + "endLine": 506, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(11) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 12, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1702, + "endLine": 1702, + "startColumn": 3, + "endColumn": 3 + } + }, + "message": { + "text": "(12) returning to ‘update_mounts’ from ‘diff_sorted_lists’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 13, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1719, + "endLine": 1719, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(13) following ‘true’ branch (when ‘l’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 14, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1721, + "endLine": 1721, + "startColumn": 24, + "endColumn": 24 + } + }, + "message": { + "text": "(14) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 15, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1732, + "endLine": 1732, + "startColumn": 18, + "endColumn": 18 + } + }, + "message": { + "text": "(15) calling ‘find_fstab_volume_for_mount_entry’ from ‘update_mounts’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 16, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1120, + "endLine": 1120, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(16) entry to ‘find_fstab_volume_for_mount_entry’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 17, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1126, + "endLine": 1126, + "startColumn": 38, + "endColumn": 38 + } + }, + "message": { + "text": "(17) following ‘true’ branch (when ‘l’ is non-NULL)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 18, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1128, + "endLine": 1128, + "startColumn": 26, + "endColumn": 26 + } + }, + "message": { + "text": "(18) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 19, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1129, + "endLine": 1129, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "(19) calling ‘mount_point_matches_mount_entry’ from ‘find_fstab_volume_for_mount_entry’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 20, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1093, + "endLine": 1093, + "startColumn": 1, + "endColumn": 1 + } + }, + "message": { + "text": "(20) entry to ‘mount_point_matches_mount_entry’" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 21, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 196, + "endLine": 196, + "startColumn": 16, + "endColumn": 16 + } + }, + "message": { + "text": "(21) following ‘false’ branch (when ‘__str_len == 0’)..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 22, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1103, + "endLine": 1103, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘g_str_has_suffix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 23, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(22) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 24, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 25, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1245, + "endLine": 1245, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 26, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 190, + "endLine": 190, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "in expansion of macro ‘G_UNLIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 27, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1105, + "endLine": 1105, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘g_str_has_suffix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 28, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1237, + "endLine": 1237, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "(23) following ‘true’ branch..." + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 29, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1243, + "endLine": 1243, + "startColumn": 31, + "endColumn": 31 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 30, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gmacros.h" + }, + "region": { + "startLine": 1245, + "endLine": 1245, + "startColumn": 45, + "endColumn": 45 + } + }, + "message": { + "text": "in expansion of macro ‘_G_BOOLEAN_EXPR’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 31, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 190, + "endLine": 190, + "startColumn": 11, + "endColumn": 11 + } + }, + "message": { + "text": "in expansion of macro ‘G_UNLIKELY’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 32, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1105, + "endLine": 1105, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘g_str_has_suffix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 33, + "physicalLocation": { + "artifactLocation": { + "uri": "/usr/include/glib-2.0/glib/gstrfuncs.h" + }, + "region": { + "startLine": 191, + "endLine": 191, + "startColumn": 21, + "endColumn": 21 + } + }, + "message": { + "text": "(24) ...to here" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 34, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1105, + "endLine": 1105, + "startColumn": 7, + "endColumn": 7 + } + }, + "message": { + "text": "in expansion of macro ‘g_str_has_suffix’" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 35, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/monitor/udisks2/gvfsudisks2volumemonitor.c" + }, + "region": { + "startLine": 1106, + "endLine": 1106, + "startColumn": 14, + "endColumn": 14 + } + }, + "message": { + "text": "(25) argument 1 (‘’) NULL where non-null expected" + } + }, + "nestingLevel": 2, + "kinds": [ + "note" + ] + }, + { + "location": { + "id": 36, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": "argument 1 of ‘__builtin_strlen’ must be non-null" + } + }, + "nestingLevel": 1, + "kinds": [ + "note" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 37, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1104| mp_path[strlen(mp_path) - 1] = '\\0';" + } + }, + { + "id": 38, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1105| if (g_str_has_suffix (mp_entry, \"/\"))" + } + }, + { + "id": 39, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1106|-> mp_entry[strlen(mp_entry) - 1] = '\\0';" + } + }, + { + "id": 40, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1107| " + } + }, + { + "id": 41, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 1108| if (g_strcmp0 (mp_path, mp_entry) != 0)" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: note[cpp/IntegerOverflow/test]", + "properties": { + "cwe": "CWE-190" + }, + "level": "note", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/test/benchmark-posix-big-files.c" + }, + "region": { + "startLine": 129, + "endLine": 129, + "startColumn": 34, + "endColumn": 34, + "snippet": { + "text": "Problem detected in this context:\n 127| if (errno == EINTR)\n 128| {\n 129|-> i -= BUFFER_SIZE - bytes_read;\n 130| continue;\n 131| }" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/test/benchmark-posix-big-files.c" + }, + "region": { + "startLine": 129, + "endLine": 129, + "startColumn": 34, + "endColumn": 34 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "note[cpp/IntegerOverflow/test]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 127| if (errno == EINTR)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 128| {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 129|-> i -= BUFFER_SIZE - bytes_read;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 130| continue;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 131| }" + } + } + ] + }, + { + "ruleId": "SNYK_CODE_WARNING: note[cpp/IntegerOverflow/test]", + "properties": { + "cwe": "CWE-190" + }, + "level": "note", + "locations": [ + { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/test/benchmark-posix-small-files.c" + }, + "region": { + "startLine": 129, + "endLine": 129, + "startColumn": 34, + "endColumn": 34, + "snippet": { + "text": "Problem detected in this context:\n 127| if (errno == EINTR)\n 128| {\n 129|-> i -= BUFFER_SIZE - bytes_read;\n 130| continue;\n 131| }" + } + } + } + } + ], + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + }, + "codeFlows": [ + { + "threadFlows": [ + { + "locations": [ + { + "location": { + "id": 0, + "physicalLocation": { + "artifactLocation": { + "uri": "gvfs-1.54.0/test/benchmark-posix-small-files.c" + }, + "region": { + "startLine": 129, + "endLine": 129, + "startColumn": 34, + "endColumn": 34 + } + }, + "message": { + "text": "Unsanitized input from a file flows into a subtraction operator (-), where it is used in integer arithmetic. This may result in an integer overflow vulnerability." + } + }, + "nestingLevel": 0, + "kinds": [ + "note[cpp/IntegerOverflow/test]" + ] + } + ] + } + ] + } + ], + "relatedLocations": [ + { + "id": 1, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 127| if (errno == EINTR)" + } + }, + { + "id": 2, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 128| {" + } + }, + { + "id": 3, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 129|-> i -= BUFFER_SIZE - bytes_read;" + } + }, + { + "id": 4, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 130| continue;" + } + }, + { + "id": 5, + "physicalLocation": { + "artifactLocation": { + "uri": "" + } + }, + "message": { + "text": " 131| }" + } + } + ] + } + ] + } + ] +} diff --git a/tests/csgrep/CMakeLists.txt b/tests/csgrep/CMakeLists.txt index 3d6fb815..38f1cff9 100644 --- a/tests/csgrep/CMakeLists.txt +++ b/tests/csgrep/CMakeLists.txt @@ -166,3 +166,4 @@ test_csgrep("0119-cov-parser-sigma" ) test_csgrep("0120-sarif-parser-semgrep" ) test_csgrep("0121-cov-parser-lock-evasion" ) test_csgrep("0122-json-parser-cov-v10-column" ) +test_csgrep("0124-sarif-writer-imp" )