pcmanfm-1.4.0-1.fc43

List of Findings

Error: COMPILER_WARNING (CWE-704): [#def1]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1215:9: warning[-Wdiscarded-qualifiers]: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier
# 1213|       static volatile gsize type_id_volatile = 0;
# 1214|   
# 1215|->     if (g_once_init_enter(&type_id_volatile))
# 1216|       {
# 1217|           /*

Error: COMPILER_WARNING: [#def2]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1276:53: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1274|       item = hit_test(desktop, &it, x - x_pos, y - y_pos);
# 1275|       if (item)
# 1276|->         obj_l = fm_desktop_find_accessible_for_item(FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(component), item);
# 1277|       if (obj_l)
# 1278|           return g_object_ref(obj_l->data);

Error: COMPILER_WARNING: [#def3]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1298:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1296|   
# 1297|       desktop = FM_DESKTOP(widget);
# 1298|->     priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection);
# 1299|       item = g_list_nth_data(priv->items, i);
# 1300|       if (!item)

Error: COMPILER_WARNING: [#def4]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1329:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1327|           return NULL;
# 1328|   
# 1329|->     priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection);
# 1330|       for (items = priv->items; items; items = items->next)
# 1331|       {

Error: COMPILER_WARNING: [#def5]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1342:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1340|   static gint fm_desktop_accessible_get_selection_count(AtkSelection *selection)
# 1341|   {
# 1342|->     FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection);
# 1343|       FmDesktopItemAccessible *item;
# 1344|       GList *items;

Error: COMPILER_WARNING: [#def6]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1359:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1357|                                                           gint i)
# 1358|   {
# 1359|->     FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection);
# 1360|       FmDesktopItemAccessible *item = g_list_nth_data(priv->items, i);
# 1361|   

Error: COMPILER_WARNING: [#def7]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1382:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1380|       desktop = FM_DESKTOP(widget);
# 1381|   
# 1382|->     priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(selection);
# 1383|       for (items = priv->items; items; items = items->next)
# 1384|       {

Error: COMPILER_WARNING: [#def8]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1428:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1426|           return FALSE;
# 1427|   
# 1428|->     priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(data);
# 1429|       priv->action_idle_handler = 0;
# 1430|       widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(data));

Error: COMPILER_WARNING: [#def9]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1445:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1443|           return FALSE;
# 1444|   
# 1445|->     priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(action);
# 1446|       if (!priv->action_idle_handler)
# 1447|           priv->action_idle_handler = gdk_threads_add_idle(fm_desktop_accessible_idle_do_action, action);

Error: COMPILER_WARNING: [#def10]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1481:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1479|   static void fm_desktop_accessible_finalize(GObject *object)
# 1480|   {
# 1481|->     FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(object);
# 1482|       FmDesktopItemAccessible *item;
# 1483|   

Error: COMPILER_WARNING: [#def11]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1504:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1502|   static gint fm_desktop_accessible_get_n_children(AtkObject *accessible)
# 1503|   {
# 1504|->     FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(accessible);
# 1505|   
# 1506|       return g_list_length(priv->items);

Error: COMPILER_WARNING: [#def12]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1518:12: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1516|           return NULL;
# 1517|   
# 1518|->     priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(accessible);
# 1519|       item = g_list_nth_data(priv->items, index);
# 1520|       if (!item)

Error: COMPILER_WARNING: [#def13]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1536:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1534|   static void fm_desktop_accessible_init(FmDesktopAccessible *object)
# 1535|   {
# 1536|->     FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(object);
# 1537|   
# 1538|       priv->items = NULL;

Error: COMPILER_WARNING: [#def14]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1609:37: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1607|   {
# 1608|       AtkObject *desktop_atk = gtk_widget_get_accessible(desktop);
# 1609|->     FmDesktopAccessiblePriv *priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(desktop_atk);
# 1610|   
# 1611|       return g_list_index(priv->items, item);

Error: COMPILER_WARNING: [#def15]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1625:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1623|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1624|       {
# 1625|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1626|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1627|           g_return_if_fail(item_atk_l != NULL);

Error: COMPILER_WARNING: [#def16]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1648:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1646|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1647|       {
# 1648|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1649|           item_atk = fm_desktop_item_accessible_new(desktop, item);
# 1650|           g_warn_if_fail(index <= g_list_length(priv->items));

Error: COMPILER_WARNING: [#def17]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1668:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1666|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1667|       {
# 1668|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1669|           length = gtk_tree_model_iter_n_children(model, NULL);
# 1670|           g_return_if_fail(length == (gint)g_list_length(priv->items));

Error: COMPILER_WARNING: [#def18]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1691:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1689|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1690|       {
# 1691|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1692|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1693|           g_return_if_fail(item_atk_l != NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1694:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:5409:13: enter_function: entry to ‘_unselect_all’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:5415:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:5418:9: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:5418:7: branch_false: following ‘false’ branch...
 branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:5427:13: call_function: calling ‘fm_desktop_item_selected_changed’ from ‘_unselect_all’
# 1692|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1693|           g_return_if_fail(item_atk_l != NULL);
# 1694|->         atk_object_notify_state_change(item_atk_l->data, ATK_STATE_SELECTED,
# 1695|                                          item->is_selected);
# 1696|       }

Error: COMPILER_WARNING: [#def20]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1708:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1706|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1707|       {
# 1708|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1709|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1710|           g_return_if_fail(item_atk_l != NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1711:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:4456:17: enter_function: entry to ‘on_focus_in’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:4463:7: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:4463:8: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:4466:23: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:4467:9: call_function: calling ‘fm_desktop_accessible_focus_set’ from ‘on_focus_in’
# 1709|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1710|           g_return_if_fail(item_atk_l != NULL);
# 1711|->         atk_object_notify_state_change(item_atk_l->data, ATK_STATE_FOCUSED, TRUE);
# 1712|       }
# 1713|   }

Error: COMPILER_WARNING: [#def22]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1724:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1722|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1723|       {
# 1724|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1725|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1726|           g_return_if_fail(item_atk_l != NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1727:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:950:17: enter_function: entry to ‘fm_desktop_item_accessible_grab_focus’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:962:5: call_function: calling ‘set_focused_item’ from ‘fm_desktop_item_accessible_grab_focus’
# 1725|           item_atk_l = fm_desktop_find_accessible_for_item(priv, item);
# 1726|           g_return_if_fail(item_atk_l != NULL);
# 1727|->         atk_object_notify_state_change(item_atk_l->data, ATK_STATE_FOCUSED, FALSE);
# 1728|       }
# 1729|   }

Error: COMPILER_WARNING: [#def24]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:1740:16: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
# 1738|       if (obj != NULL && FM_IS_DESKTOP_ACCESSIBLE(obj))
# 1739|       {
# 1740|->         priv = FM_DESKTOP_ACCESSIBLE_GET_PRIVATE(obj);
# 1741|           while (priv->items)
# 1742|           {

Error: COMPILER_WARNING (CWE-252): [#def25]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:2710:21: warning[-Wunused-result]: ignoring return value of ‘g_list_remove’ declared with attribute ‘[warn_unused_result](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-warn_005funused_005fresult-function-attribute)’
# 2708|                       list_desktop->data = fm_desktop_new(screen, mon_init);
# 2709|                   } else {
# 2710|->                     g_list_remove(list_desktop_top, desktop);
# 2711|                   }
# 2712|               }

Error: COMPILER_WARNING (CWE-252): [#def26]
pcmanfm-1.4.0/pcmanfm/src/desktop.c: scope_hint: In function ‘on_screen_size_changed’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:2710:21: warning[-Wunused-result]: ignoring return value of ‘g_list_remove’ declared with attribute ‘warn_unused_result’
# 2710 |                     g_list_remove(list_desktop_top, desktop);
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2708|                       list_desktop->data = fm_desktop_new(screen, mon_init);
# 2709|                   } else {
# 2710|->                     g_list_remove(list_desktop_top, desktop);
# 2711|                   }
# 2712|               }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3678:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3671:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3674:14: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3675:8: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3677:9: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3678:9: danger: dereference of NULL ‘hit_test(user_data, & it,  x,  y)’
# 3676|       {
# 3677|           _unselect_all(FM_FOLDER_VIEW(self));
# 3678|->         item->is_selected = TRUE;
# 3679|       }
# 3680|       else if (state == GDK_CONTROL_MASK) /* invert selection on the item */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3682:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3671:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3674:14: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3675:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3680:13: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3680:13: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3682:29: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/desktop.c:3682:9: danger: dereference of NULL ‘hit_test(user_data, & it,  x,  y)’
# 3680|       else if (state == GDK_CONTROL_MASK) /* invert selection on the item */
# 3681|       {
# 3682|->         item->is_selected = ! item->is_selected;
# 3683|       }
# 3684|       else /* ignore other modifiers */

Error: COMPILER_WARNING (CWE-563): [#def29]
pcmanfm-1.4.0/pcmanfm/src/desktop.c: scope_hint: In function ‘fm_desktop_manager_init’
pcmanfm-1.4.0/pcmanfm/src/desktop.c:5993:9: warning[-Wunused-variable]: unused variable ‘i’
# 5993 |     int i, n_mon, scr, mon;
#      |         ^
# 5991|   {
# 5992|       GdkDisplay * gdpy;
# 5993|->     int i, n_mon, scr, mon;
# 5994|       const char* desktop_path;
# 5995|   #if FM_CHECK_VERSION(1, 2, 0)

Error: GCC_ANALYZER_WARNING (CWE-479): [#def30]
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:110:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:199:5: enter_function: entry to ‘main’
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:215:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:223:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:239:7: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:241:26: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:105:13: enter_function: entry to ‘unix_signal_handler’
pcmanfm-1.4.0/pcmanfm/src/pcmanfm.c:108:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
 call_function: calling ‘unix_signal_handler’ from ‘unix_signal_handler’
#  108|       if (write(signal_pipe[1], &sig_num, sizeof(sig_num)) != sizeof(sig_num)) {
#  109|           g_critical("cannot bounce the signal, stop");
#  110|->         exit(2);
#  111|       }
#  112|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def31]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:78:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f’ where non-null expected
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:72:15: acquire_memory: this call could return NULL
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:78:5: danger: argument 1 (‘f’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#   76|       char* cwd = g_get_current_dir();
#   77|       escaped = g_strescape(cwd, NULL);
#   78|->     fprintf(f, "%s\n", escaped);
#   79|       g_free(cwd);
#   80|       cwd = escaped;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:200:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:200:7: danger: ‘*data.sock’ leaks here
#  198|   
#  199|       /* try to connect to existing instance */
#  200|->     if(connect(data->sock, (struct sockaddr*)&addr, addr_len) == 0)
#  201|       {
#  202|           /* connected successfully, pass args in opt_entries to server process as argv and exit. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:200:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:208:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:7: branch_false: following ‘false’ branch (when ‘ret == 0’)...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:15: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:8: danger: ‘*data.sock’ leaks here
#  220|       reuse = 1;
#  221|       ret = setsockopt( data->sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse) );
#  222|->     if(ret || bind(data->sock, (struct sockaddr*)&addr, addr_len) == -1)
#  223|           return SINGLE_INST_ERROR;
#  224|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:232:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:200:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:208:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:7: branch_false: following ‘false’ branch (when ‘ret == 0’)...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:15: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:225:24: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:226:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:229:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:232:7: danger: ‘*data.sock’ leaks here
#  230|       g_io_channel_set_buffered(data->io_channel, FALSE);
#  231|   
#  232|->     if(listen(data->sock, 5) == -1)
#  233|           return SINGLE_INST_ERROR;
#  234|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:235:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:369:17: enter_function: entry to ‘on_server_socket_event’
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:395:7: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:397:9: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:398:9: call_function: calling ‘single_inst_init’ from ‘on_server_socket_event’
#  233|           return SINGLE_INST_ERROR;
#  234|   
#  235|->     data->io_watch = g_io_add_watch(data->io_channel,
#  236|                                       G_IO_IN|G_IO_ERR|G_IO_PRI|G_IO_HUP,
#  237|                                       (GIOFunc)on_server_socket_event, data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:235:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*data.sock’
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:187:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:191:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:200:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:208:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:7: branch_false: following ‘false’ branch (when ‘ret == 0’)...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:15: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:222:8: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:225:24: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:226:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:229:5: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:232:7: branch_false: following ‘false’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:235:22: branch_false: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:235:22: danger: ‘*data.sock’ leaks here
#  233|           return SINGLE_INST_ERROR;
#  234|   
#  235|->     data->io_watch = g_io_add_watch(data->io_channel,
#  236|                                       G_IO_IN|G_IO_ERR|G_IO_PRI|G_IO_HUP,
#  237|                                       (GIOFunc)on_server_socket_event, data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:376:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘g_io_channel_unix_get_fd(ioc)’
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:373:8: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:375:34: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/single-inst.c:376:11: danger: ‘g_io_channel_unix_get_fd(ioc)’ leaks here
#  374|       {
#  375|           int client_sock = accept(g_io_channel_unix_get_fd(ioc), NULL, 0);
#  376|->         if(client_sock != -1)
#  377|           {
#  378|               SingleInstClient* client = g_slice_new0(SingleInstClient);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def38]
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1111:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1013:13: enter_function: entry to ‘fm_tab_page_chdir_without_history’
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1098:8: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1100:22: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1104:21: branch_true: following ‘true’ branch...
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1106:26: branch_true: ...to here
pcmanfm-1.4.0/pcmanfm/src/tab-page.c:1111:21: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#argument 1 of ‘__builtin_strchr’ must be non-null
# 1109|               infos[i].width = 0;
# 1110|   #endif
# 1111|->             delim = strchr(name, ':');
# 1112|               if (delim)
# 1113|               {

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-190.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namepcmanfm-1.4.0-1.fc43
store-results-to/tmp/tmpytfxttic/pcmanfm-1.4.0-1.fc43.tar.xz
time-created2025-04-25 14:45:59
time-finished2025-04-25 14:47:40
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpytfxttic/pcmanfm-1.4.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpytfxttic/pcmanfm-1.4.0-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9