Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
vim92/src/buffer.c:684:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘win’
vim92/src/buffer.c:6582:1: enter_function: entry to ‘wipe_buffer’
vim92/src/buffer.c:6592:5: call_function: calling ‘close_buffer’ from ‘wipe_buffer’
#  682|   
#  683|       // When the buffer is no longer in a window, trigger BufWinLeave
#  684|->     if ((win_valid || closed_popup) && win->w_buffer == buf
#  685|   	    && buf->b_nwindows == 1)
#  686|       {

Error: COMPILER_WARNING: [#def2]
vim92/src/cairo.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
vim92/src/clipboard.c:286:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cbd’
vim92/src/clipboard.c:2814:1: enter_function: entry to ‘vwl_data_source_listener_event_cancelled’
vim92/src/clipboard.c:2819:32: call_function: inlined call to ‘clip_wl_get_cbd_from_selection’ from ‘vwl_data_source_listener_event_cancelled’
vim92/src/clipboard.c:2821:5: call_function: calling ‘clip_lose_selection’ from ‘vwl_data_source_listener_event_cancelled’
#  284|   
#  285|       clip_free_selection(cbd);
#  286|->     cbd->owned = FALSE;
#  287|       if (visual_selection)
#  288|   	clip_clear_selection(cbd);

Error: COMPILER_WARNING: [#def4]
vim92/src/gui_gtk4.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING (CWE-457): [#def5]
vim92/src/gui_gtk4.c: scope_hint: In function ‘gui_mch_open’
vim92/src/gui_gtk4.c:720:21: warning[-Wmaybe-uninitialized]: ‘w’ may be used uninitialized
#  720 |             Columns = w;
#      |             ~~~~~~~~^~~
vim92/src/gui_gtk4.c:713:25: note: ‘w’ was declared here
#  713 |         unsigned int    w, h;
#      |                         ^
#  718|   
#  719|   	if (mask & WidthValue)
#  720|-> 	    Columns = w;
#  721|   	if (mask & HeightValue)
#  722|   	{

Error: COMPILER_WARNING (CWE-457): [#def6]
vim92/src/gui_gtk4.c:723:28: warning[-Wmaybe-uninitialized]: ‘h’ may be used uninitialized
#  723 |             if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
#      |                            ^~~~~~~
vim92/src/gui_gtk4.c:713:28: note: ‘h’ was declared here
#  713 |         unsigned int    w, h;
#      |                            ^
#  721|   	if (mask & HeightValue)
#  722|   	{
#  723|-> 	    if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
#  724|   		p_window = h - 1;
#  725|   	    Rows = h;

Error: COMPILER_WARNING (CWE-477): [#def7]
vim92/src/gui_gtk4.c: scope_hint: In function ‘gui_mch_drawsign’
vim92/src/gui_gtk4.c:3471:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 3471 |             gdk_cairo_set_source_pixbuf(cr, scaled,
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdk.h:30: included_from: Included from here.
/usr/include/gtk-4.0/gtk/svg/gtksvg.h:28: included_from: Included from here.
/usr/include/gtk-4.0/gtk/gtk.h:30: included_from: Included from here.
vim92/src/beval.h:15: included_from: Included from here.
vim92/src/vim.h:2062: included_from: Included from here.
vim92/src/gui_gtk4.c:24: included_from: Included from here.
/usr/include/gtk-4.0/gdk/gdkcairo.h:34:12: note: declared here
#   34 | void       gdk_cairo_set_source_pixbuf  (cairo_t              *cr,
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 3469|   	if (scaled != NULL)
# 3470|   	{
# 3471|-> 	    gdk_cairo_set_source_pixbuf(cr, scaled,
# 3472|   		    FILL_X(col), FILL_Y(row));
# 3473|   	    g_object_unref(scaled);

Error: COMPILER_WARNING (CWE-477): [#def8]
vim92/src/gui_gtk4.c:3471:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 3469|   	if (scaled != NULL)
# 3470|   	{
# 3471|-> 	    gdk_cairo_set_source_pixbuf(cr, scaled,
# 3472|   		    FILL_X(col), FILL_Y(row));
# 3473|   	    g_object_unref(scaled);

Error: COMPILER_WARNING (CWE-477): [#def9]
vim92/src/gui_gtk4.c:3476:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 3476 |             gdk_cairo_set_source_pixbuf(cr, sign,
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdkcairo.h:34:12: note: declared here
#   34 | void       gdk_cairo_set_source_pixbuf  (cairo_t              *cr,
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 3474|   	}
# 3475|   	else
# 3476|-> 	    gdk_cairo_set_source_pixbuf(cr, sign,
# 3477|   		    FILL_X(col), FILL_Y(row));
# 3478|       }

Error: COMPILER_WARNING (CWE-477): [#def10]
vim92/src/gui_gtk4.c:3476:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 3474|   	}
# 3475|   	else
# 3476|-> 	    gdk_cairo_set_source_pixbuf(cr, sign,
# 3477|   		    FILL_X(col), FILL_Y(row));
# 3478|       }

Error: COMPILER_WARNING (CWE-477): [#def11]
vim92/src/gui_gtk4.c:3480:9: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 3480 |         gdk_cairo_set_source_pixbuf(cr, sign,
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdkcairo.h:34:12: note: declared here
#   34 | void       gdk_cairo_set_source_pixbuf  (cairo_t              *cr,
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 3478|       }
# 3479|       else
# 3480|-> 	gdk_cairo_set_source_pixbuf(cr, sign,
# 3481|   		FILL_X(col), FILL_Y(row));
# 3482|   

Error: COMPILER_WARNING (CWE-477): [#def12]
vim92/src/gui_gtk4.c:3480:9: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 3478|       }
# 3479|       else
# 3480|-> 	gdk_cairo_set_source_pixbuf(cr, sign,
# 3481|   		FILL_X(col), FILL_Y(row));
# 3482|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
vim92/src/gui_gtk4.c:5250:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
vim92/src/gui_gtk4.c:5242:1: enter_function: entry to ‘split_button_string’
vim92/src/gui_gtk4.c:5250:29: danger: dereference of NULL ‘p’
# 5248|       button_string = (char_u *)g_strdup((const char *)button_string);
# 5249|   
# 5250|->     for (p = button_string; *p != NUL; ++p)
# 5251|   	if (*p == DLG_BUTTON_SEP)
# 5252|   	    ++count;

Error: COMPILER_WARNING: [#def14]
vim92/src/gui_gtk4_cb.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def15]
vim92/src/gui_gtk4_da.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def16]
vim92/src/gui_gtk4_f.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def17]
vim92/src/gui_gtk4_menu.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def18]
vim92/src/gui_gtk4_tb.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING (CWE-563): [#def19]
vim92/src/gui_xim.c:193:22: warning[-Wunused-variable]: ‘im_activatekey_keyval’ defined but not used
#  193 | static unsigned int  im_activatekey_keyval = GDK_KEY_VoidSymbol;
#      |                      ^~~~~~~~~~~~~~~~~~~~~
#  191|   static unsigned long im_commit_handler_id  = 0;
#  192|   #  ifdef USE_GTK4
#  193|-> static unsigned int  im_activatekey_keyval = GDK_KEY_VoidSymbol;
#  194|   #  else
#  195|   static unsigned int  im_activatekey_keyval = GDK_VoidSymbol;

Error: COMPILER_WARNING (CWE-563): [#def20]
vim92/src/gui_xim.c:197:22: warning[-Wunused-variable]: ‘im_activatekey_state’ defined but not used
#  197 | static unsigned int  im_activatekey_state  = 0;
#      |                      ^~~~~~~~~~~~~~~~~~~~
#  195|   static unsigned int  im_activatekey_keyval = GDK_VoidSymbol;
#  196|   #  endif
#  197|-> static unsigned int  im_activatekey_state  = 0;
#  198|   
#  199|   static GtkWidget *preedit_window = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
vim92/src/if_cscope.c:864:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘to_cs[1]’
vim92/src/if_cscope.c:2403:1: enter_function: entry to ‘cs_reset’
vim92/src/if_cscope.c:2409:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2413:14: branch_false: ...to here
vim92/src/if_cscope.c:2416:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2434:17: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2436:19: branch_true: ...to here
vim92/src/if_cscope.c:2436:12: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2438:55: branch_true: ...to here
vim92/src/if_cscope.c:2438:13: call_function: calling ‘cs_add_common’ from ‘cs_reset’
#  862|   	if (from_cs[1] != -1)
#  863|   	    (void)close(from_cs[1]);
#  864|-> 	return CSCOPE_FAILURE;
#  865|       }
#  866|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
vim92/src/if_cscope.c:864:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘to_cs[i]’
vim92/src/if_cscope.c:2403:1: enter_function: entry to ‘cs_reset’
vim92/src/if_cscope.c:2409:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2413:14: branch_false: ...to here
vim92/src/if_cscope.c:2416:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2434:17: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2436:19: branch_true: ...to here
vim92/src/if_cscope.c:2436:12: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2438:55: branch_true: ...to here
vim92/src/if_cscope.c:2438:13: call_function: calling ‘cs_add_common’ from ‘cs_reset’
#  862|   	if (from_cs[1] != -1)
#  863|   	    (void)close(from_cs[1]);
#  864|-> 	return CSCOPE_FAILURE;
#  865|       }
#  866|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
vim92/src/if_cscope.c:876:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(to_cs[0], 0)’
vim92/src/if_cscope.c:2403:1: enter_function: entry to ‘cs_reset’
vim92/src/if_cscope.c:2409:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2413:14: branch_false: ...to here
vim92/src/if_cscope.c:2416:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2434:17: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2436:19: branch_true: ...to here
vim92/src/if_cscope.c:2436:12: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2438:55: branch_true: ...to here
vim92/src/if_cscope.c:2438:13: call_function: calling ‘cs_add_common’ from ‘cs_reset’
#  874|   	char **argv = NULL;
#  875|   
#  876|-> 	if (dup2(to_cs[0], STDIN_FILENO) == -1)
#  877|   	    PERROR("cs_create_connection 1");
#  878|   	if (dup2(from_cs[1], STDOUT_FILENO) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
vim92/src/if_cscope.c:878:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(from_cs[1], 1)’
vim92/src/if_cscope.c:2403:1: enter_function: entry to ‘cs_reset’
vim92/src/if_cscope.c:2409:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2413:14: branch_false: ...to here
vim92/src/if_cscope.c:2416:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2434:17: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2436:19: branch_true: ...to here
vim92/src/if_cscope.c:2436:12: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2438:55: branch_true: ...to here
vim92/src/if_cscope.c:2438:13: call_function: calling ‘cs_add_common’ from ‘cs_reset’
#  876|   	if (dup2(to_cs[0], STDIN_FILENO) == -1)
#  877|   	    PERROR("cs_create_connection 1");
#  878|-> 	if (dup2(from_cs[1], STDOUT_FILENO) == -1)
#  879|   	    PERROR("cs_create_connection 2");
#  880|   	if (dup2(from_cs[1], STDERR_FILENO) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
vim92/src/if_cscope.c:880:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(from_cs[1], 2)’
vim92/src/if_cscope.c:2403:1: enter_function: entry to ‘cs_reset’
vim92/src/if_cscope.c:2409:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2413:14: branch_false: ...to here
vim92/src/if_cscope.c:2416:8: branch_false: following ‘false’ branch...
vim92/src/if_cscope.c:2434:17: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2436:19: branch_true: ...to here
vim92/src/if_cscope.c:2436:12: branch_true: following ‘true’ branch...
vim92/src/if_cscope.c:2438:55: branch_true: ...to here
vim92/src/if_cscope.c:2438:13: call_function: calling ‘cs_add_common’ from ‘cs_reset’
#  878|   	if (dup2(from_cs[1], STDOUT_FILENO) == -1)
#  879|   	    PERROR("cs_create_connection 2");
#  880|-> 	if (dup2(from_cs[1], STDERR_FILENO) == -1)
#  881|   	    PERROR("cs_create_connection 3");
#  882|   

Error: COMPILER_WARNING: [#def26]
vim92/src/kitty.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
vim92/src/main.c:2795:17: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
vim92/src/main.c:2122:12: branch_true: following ‘true’ branch (when ‘argc > 0’)...
vim92/src/main.c:2127:13: branch_true: ...to here
vim92/src/main.c:2788:16: branch_true: following ‘true’ branch...
vim92/src/main.c:2788:17: branch_true: following ‘true’ branch...
vim92/src/main.c:2794:44: branch_true: ...to here
vim92/src/main.c:2795:17: danger: argument 1 (‘p’) NULL where non-null expected
# 2793|   
# 2794|   		tail = gettail(alist_name(&GARGLIST[0]));
# 2795|-> 		concat_fnames(p, STRLEN(p), tail, STRLEN(tail), TRUE, &ret);
# 2796|   		if (ret.string != NULL)
# 2797|   		{

Error: GCC_ANALYZER_WARNING (CWE-457): [#def28]
vim92/src/os_unix.c:5177:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[0]’
vim92/src/os_unix.c:5076:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:5106:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5114:9: branch_false: ...to here
vim92/src/os_unix.c:5157:12: branch_true: following ‘true’ branch (when ‘pid == -1’)...
vim92/src/os_unix.c:5159:13: call_function: inlined call to ‘unblock_signals’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5162:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5169:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5177:21: branch_false: ...to here
vim92/src/os_unix.c:5177:21: danger: use of uninitialized value ‘fd_toshell[0]’ here
# 5175|   # endif
# 5176|   		{
# 5177|-> 		    close(fd_toshell[0]);
# 5178|   		    close(fd_toshell[1]);
# 5179|   		    close(fd_fromshell[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
vim92/src/os_unix.c:5285:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5076:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:5106:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5114:9: branch_false: ...to here
vim92/src/os_unix.c:5157:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5184:17: branch_false: ...to here
vim92/src/os_unix.c:5184:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5186:13: branch_true: ...to here
vim92/src/os_unix.c:5197:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5233:22: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5244:21: branch_true: ...to here
vim92/src/os_unix.c:5269:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5269:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5277:20: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5279:21: branch_true: ...to here
vim92/src/os_unix.c:5283:35: acquire_resource: opened here
vim92/src/os_unix.c:5285:21: danger: ‘vim_ignored’ leaks here; was opened at [(31)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/30)
# 5283|   		    vim_ignored = dup(pty_slave_fd);
# 5284|   		    close(1);
# 5285|-> 		    vim_ignored = dup(pty_slave_fd);
# 5286|   		    if (gui.in_use)
# 5287|   		    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
vim92/src/os_unix.c:5289:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5076:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:5106:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5114:9: branch_false: ...to here
vim92/src/os_unix.c:5157:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5184:17: branch_false: ...to here
vim92/src/os_unix.c:5184:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5186:13: branch_true: ...to here
vim92/src/os_unix.c:5197:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5233:22: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5244:21: branch_true: ...to here
vim92/src/os_unix.c:5269:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5269:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5277:20: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5279:21: branch_true: ...to here
vim92/src/os_unix.c:5285:35: acquire_resource: opened here
vim92/src/os_unix.c:5286:24: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5288:25: branch_true: ...to here
vim92/src/os_unix.c:5289:25: danger: ‘vim_ignored’ leaks here; was opened at [(31)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/30)
# 5287|   		    {
# 5288|   			close(2);
# 5289|-> 			vim_ignored = dup(pty_slave_fd);
# 5290|   		    }
# 5291|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def31]
vim92/src/os_unix.c:5298:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[1]’
vim92/src/os_unix.c:5907:1: enter_function: entry to ‘mch_call_shell’
vim92/src/os_unix.c:5922:12: call_function: calling ‘mch_call_shell_fork’ from ‘mch_call_shell’
# 5296|   		{
# 5297|   		    // set up stdin for the child
# 5298|-> 		    close(fd_toshell[1]);
# 5299|   		    close(0);
# 5300|   		    vim_ignored = dup(fd_toshell[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
vim92/src/os_unix.c:5314:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5076:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:5106:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5114:9: branch_false: ...to here
vim92/src/os_unix.c:5131:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5134:27: branch_true: ...to here
vim92/src/os_unix.c:5135:16: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5137:31: branch_true: ...to here
vim92/src/os_unix.c:5138:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5144:16: branch_false: ...to here
vim92/src/os_unix.c:5144:16: branch_false: following ‘false’ branch (when ‘pipe_error == 0’)...
vim92/src/os_unix.c:5155:9: branch_false: ...to here
vim92/src/os_unix.c:5157:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5184:17: branch_false: ...to here
vim92/src/os_unix.c:5184:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5186:13: branch_true: ...to here
vim92/src/os_unix.c:5197:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5269:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5269:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5277:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5298:21: branch_false: ...to here
vim92/src/os_unix.c:5306:35: acquire_resource: opened here
vim92/src/os_unix.c:5310:24: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5313:25: branch_true: ...to here
vim92/src/os_unix.c:5314:25: danger: ‘vim_ignored’ leaks here; was opened at [(39)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/38)
# 5312|   			// set up stderr for the child
# 5313|   			close(2);
# 5314|-> 			vim_ignored = dup(1);
# 5315|   		    }
# 5316|   # endif

Error: GCC_ANALYZER_WARNING (CWE-910): [#def33]
vim92/src/os_unix.c:5314:39: warning[-Wanalyzer-fd-use-after-close]: ‘dup’ on closed file descriptor ‘1’
vim92/src/os_unix.c:5076:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:5106:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5114:9: branch_false: ...to here
vim92/src/os_unix.c:5131:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5134:27: branch_true: ...to here
vim92/src/os_unix.c:5135:16: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5137:31: branch_true: ...to here
vim92/src/os_unix.c:5138:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5144:16: branch_false: ...to here
vim92/src/os_unix.c:5144:16: branch_false: following ‘false’ branch (when ‘pipe_error == 0’)...
vim92/src/os_unix.c:5155:9: branch_false: ...to here
vim92/src/os_unix.c:5157:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5184:17: branch_false: ...to here
vim92/src/os_unix.c:5184:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5186:13: branch_true: ...to here
vim92/src/os_unix.c:5197:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5269:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5269:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5277:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5298:21: branch_false: ...to here
vim92/src/os_unix.c:5305:21: release_resource: closed here
vim92/src/os_unix.c:5310:24: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5313:25: branch_true: ...to here
vim92/src/os_unix.c:5314:39: danger: ‘dup’ on closed file descriptor ‘1’; ‘close’ was at [(39)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/38)
# 5312|   			// set up stderr for the child
# 5313|   			close(2);
# 5314|-> 			vim_ignored = dup(1);
# 5315|   		    }
# 5316|   # endif

Error: GCC_ANALYZER_WARNING (CWE-457): [#def34]
vim92/src/os_unix.c:5379:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[0]’
vim92/src/os_unix.c:5076:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5106:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:5106:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5114:9: branch_false: ...to here
vim92/src/os_unix.c:5157:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5184:17: branch_false: ...to here
vim92/src/os_unix.c:5184:17: branch_false: following ‘false’ branch (when ‘pid != 0’)...
vim92/src/os_unix.c:5336:13: branch_false: ...to here
vim92/src/os_unix.c:5347:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5371:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5379:21: branch_false: ...to here
vim92/src/os_unix.c:5379:21: danger: use of uninitialized value ‘fd_toshell[0]’ here
# 5377|   # endif
# 5378|   		{
# 5379|-> 		    close(fd_toshell[0]);
# 5380|   		    close(fd_fromshell[1]);
# 5381|   		    toshell_fd = fd_toshell[1];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
vim92/src/os_unix.c:6012:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5937:1: enter_function: entry to ‘mch_get_cmd_output_direct’
vim92/src/os_unix.c:5954:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5960:5: branch_false: ...to here
vim92/src/os_unix.c:5966:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5975:8: branch_false: ...to here
vim92/src/os_unix.c:5975:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5978:9: branch_true: ...to here
vim92/src/os_unix.c:5988:12: branch_true: following ‘true’ branch (when ‘infile’ is non-NULL)...
vim92/src/os_unix.c:5990:25: call_function: inlined call to ‘open’ from ‘mch_get_cmd_output_direct’
vim92/src/os_unix.c:5991:16: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5993:17: branch_true: ...to here
vim92/src/os_unix.c:5994:31: acquire_resource: opened here
vim92/src/os_unix.c:6012:9: danger: ‘vim_ignored’ leaks here; was opened at [(14)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/13)
# 6010|   	close(fd_out[0]);
# 6011|   	close(1);
# 6012|-> 	vim_ignored = dup(fd_out[1]);
# 6013|   	// Also redirect stderr to the pipe.
# 6014|   	close(2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
vim92/src/os_unix.c:6015:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5954:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5960:5: branch_false: ...to here
vim92/src/os_unix.c:5966:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5975:8: branch_false: ...to here
vim92/src/os_unix.c:5975:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5978:9: branch_true: ...to here
vim92/src/os_unix.c:5991:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6010:9: branch_false: ...to here
vim92/src/os_unix.c:6012:23: acquire_resource: opened here
vim92/src/os_unix.c:6015:9: danger: ‘vim_ignored’ leaks here; was opened at [(10)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/9)
# 6013|   	// Also redirect stderr to the pipe.
# 6014|   	close(2);
# 6015|-> 	vim_ignored = dup(fd_out[1]);
# 6016|   	close(fd_out[1]);
# 6017|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
vim92/src/os_unix.c:6293:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6119:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6132:8: branch_false: ...to here
vim92/src/os_unix.c:6166:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:13: branch_true: ...to here
vim92/src/os_unix.c:6169:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6170:19: branch_true: ...to here
vim92/src/os_unix.c:6183:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6189:8: branch_false: ...to here
vim92/src/os_unix.c:6189:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6195:9: branch_true: ...to here
vim92/src/os_unix.c:6262:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6269:13: branch_false: ...to here
vim92/src/os_unix.c:6282:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6284:18: branch_false: ...to here
vim92/src/os_unix.c:6284:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6285:27: branch_true: ...to here
vim92/src/os_unix.c:6285:27: acquire_resource: opened here
vim92/src/os_unix.c:6291:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6293:27: branch_true: ...to here
vim92/src/os_unix.c:6293:13: danger: ‘vim_ignored’ leaks here; was opened at [(19)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/18)
# 6291|   	if (use_null_for_err && null_fd >= 0)
# 6292|   	{
# 6293|-> 	    vim_ignored = dup(null_fd);
# 6294|   	    stderr_works = FALSE;
# 6295|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
vim92/src/os_unix.c:6297:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6143:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6146:8: branch_false: ...to here
vim92/src/os_unix.c:6159:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6166:13: branch_true: ...to here
vim92/src/os_unix.c:6166:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:13: branch_true: ...to here
vim92/src/os_unix.c:6169:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6170:19: branch_true: ...to here
vim92/src/os_unix.c:6183:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6189:8: branch_false: ...to here
vim92/src/os_unix.c:6189:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6195:9: branch_true: ...to here
vim92/src/os_unix.c:6262:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6269:13: branch_false: ...to here
vim92/src/os_unix.c:6282:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6283:27: branch_true: ...to here
vim92/src/os_unix.c:6283:27: acquire_resource: opened here
vim92/src/os_unix.c:6291:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6296:17: branch_false: ...to here
vim92/src/os_unix.c:6296:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6297:27: branch_true: ...to here
vim92/src/os_unix.c:6297:13: danger: ‘vim_ignored’ leaks here; was opened at [(23)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/22)
# 6295|   	}
# 6296|   	else if (use_out_for_err)
# 6297|-> 	    vim_ignored = dup(fd_out[1]);
# 6298|   	else if (fd_err[1] < 0)
# 6299|   	    vim_ignored = dup(pty_slave_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
vim92/src/os_unix.c:6299:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6143:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6146:8: branch_false: ...to here
vim92/src/os_unix.c:6159:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6166:13: branch_true: ...to here
vim92/src/os_unix.c:6166:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:13: branch_true: ...to here
vim92/src/os_unix.c:6169:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6170:19: branch_true: ...to here
vim92/src/os_unix.c:6183:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6189:8: branch_false: ...to here
vim92/src/os_unix.c:6189:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6195:9: branch_true: ...to here
vim92/src/os_unix.c:6262:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6269:13: branch_false: ...to here
vim92/src/os_unix.c:6282:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6283:27: branch_true: ...to here
vim92/src/os_unix.c:6283:27: acquire_resource: opened here
vim92/src/os_unix.c:6291:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6296:17: branch_false: ...to here
vim92/src/os_unix.c:6296:17: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6298:18: branch_false: ...to here
vim92/src/os_unix.c:6298:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6299:27: branch_true: ...to here
vim92/src/os_unix.c:6299:13: danger: ‘vim_ignored’ leaks here; was opened at [(23)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/22)
# 6297|   	    vim_ignored = dup(fd_out[1]);
# 6298|   	else if (fd_err[1] < 0)
# 6299|-> 	    vim_ignored = dup(pty_slave_fd);
# 6300|   	else
# 6301|   	    vim_ignored = dup(fd_err[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
vim92/src/os_unix.c:6301:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6143:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6146:8: branch_false: ...to here
vim92/src/os_unix.c:6159:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6166:13: branch_true: ...to here
vim92/src/os_unix.c:6166:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:13: branch_true: ...to here
vim92/src/os_unix.c:6169:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6170:19: branch_true: ...to here
vim92/src/os_unix.c:6183:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6189:8: branch_false: ...to here
vim92/src/os_unix.c:6189:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6195:9: branch_true: ...to here
vim92/src/os_unix.c:6262:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6269:13: branch_false: ...to here
vim92/src/os_unix.c:6282:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6283:27: branch_true: ...to here
vim92/src/os_unix.c:6283:27: acquire_resource: opened here
vim92/src/os_unix.c:6291:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6296:17: branch_false: ...to here
vim92/src/os_unix.c:6296:17: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6298:18: branch_false: ...to here
vim92/src/os_unix.c:6298:17: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6301:27: branch_false: ...to here
vim92/src/os_unix.c:6301:13: danger: ‘vim_ignored’ leaks here; was opened at [(23)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/22)
# 6299|   	    vim_ignored = dup(pty_slave_fd);
# 6300|   	else
# 6301|-> 	    vim_ignored = dup(fd_err[1]);
# 6302|   
# 6303|   	// set up stdout for the child

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
vim92/src/os_unix.c:6306:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6143:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6146:8: branch_false: ...to here
vim92/src/os_unix.c:6159:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6164:9: branch_false: ...to here
vim92/src/os_unix.c:6164:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6166:13: branch_true: ...to here
vim92/src/os_unix.c:6166:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:13: branch_true: ...to here
vim92/src/os_unix.c:6169:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6170:19: branch_true: ...to here
vim92/src/os_unix.c:6183:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6189:8: branch_false: ...to here
vim92/src/os_unix.c:6189:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6195:9: branch_true: ...to here
vim92/src/os_unix.c:6262:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6269:13: branch_false: ...to here
vim92/src/os_unix.c:6291:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6296:17: branch_false: ...to here
vim92/src/os_unix.c:6296:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6297:27: branch_true: ...to here
vim92/src/os_unix.c:6297:27: acquire_resource: opened here
vim92/src/os_unix.c:6305:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6306:27: branch_true: ...to here
vim92/src/os_unix.c:6306:13: danger: ‘vim_ignored’ leaks here; was opened at [(25)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/24)
# 6304|   	close(1);
# 6305|   	if (use_null_for_out && null_fd >= 0)
# 6306|-> 	    vim_ignored = dup(null_fd);
# 6307|   	else if (fd_out[1] < 0)
# 6308|   	    vim_ignored = dup(pty_slave_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
vim92/src/os_unix.c:6422:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_in[0]’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6114:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6128:12: branch_false: ...to here
vim92/src/os_unix.c:6128:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6128:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6132:8: branch_false: ...to here
vim92/src/os_unix.c:6406:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6408:9: branch_false: ...to here
vim92/src/os_unix.c:6408:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6410:9: branch_false: ...to here
vim92/src/os_unix.c:6410:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6412:9: branch_false: ...to here
vim92/src/os_unix.c:6414:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6416:9: branch_false: ...to here
vim92/src/os_unix.c:6418:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6420:9: branch_false: ...to here
vim92/src/os_unix.c:6420:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6422:1: branch_false: ...to here
vim92/src/os_unix.c:6422:1: danger: ‘fd_in[0]’ leaks here
# 6420|       if (pty_slave_fd >= 0)
# 6421|   	close(pty_slave_fd);
# 6422|-> }
# 6423|   
# 6424|       static char_u *

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
vim92/src/os_unix.c:6422:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_in[1]’
vim92/src/os_unix.c:6099:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6103:5: branch_false: ...to here
vim92/src/os_unix.c:6114:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6128:12: branch_false: ...to here
vim92/src/os_unix.c:6128:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6128:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6132:8: branch_false: ...to here
vim92/src/os_unix.c:6406:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6408:9: branch_false: ...to here
vim92/src/os_unix.c:6408:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6410:9: branch_false: ...to here
vim92/src/os_unix.c:6410:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6412:9: branch_false: ...to here
vim92/src/os_unix.c:6414:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6416:9: branch_false: ...to here
vim92/src/os_unix.c:6418:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6420:9: branch_false: ...to here
vim92/src/os_unix.c:6420:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6422:1: branch_false: ...to here
vim92/src/os_unix.c:6422:1: danger: ‘fd_in[1]’ leaks here
# 6420|       if (pty_slave_fd >= 0)
# 6421|   	close(pty_slave_fd);
# 6422|-> }
# 6423|   
# 6424|       static char_u *

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
vim92/src/register.c:1227:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘reg’
vim92/src/register.c:1701:1: enter_function: entry to ‘do_put’
vim92/src/register.c:1752:8: branch_true: following ‘true’ branch...
vim92/src/register.c:1754:13: branch_true: ...to here
vim92/src/register.c:1769:12: branch_true: following ‘true’ branch...
vim92/src/register.c:1770:13: branch_true: ...to here
vim92/src/register.c:1770:13: call_function: calling ‘put_do_autocmd’ from ‘do_put’
# 1225|       else
# 1226|       {
# 1227|-> 	for (n = 0; n < reg->y_size; n++)
# 1228|   	    list_append_string(list, reg->y_array[n].string,
# 1229|   		    (int)reg->y_array[n].length);

Error: COMPILER_WARNING: [#def45]
vim92/src/sixel.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def46]
vim92/src/socketserver.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-457): [#def47]
vim92/src/socketserver.c:1064: warning[uninitvar]: Uninitialized variable: port
# 1062|   	channel = channel_open_unix((char *)address, NULL);
# 1063|       else
# 1064|-> 	channel =  channel_open("localhost", port, 1000, NULL);
# 1065|   
# 1066|       if (channel == NULL && !quiet)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def48]
vim92/src/textprop.c:3110:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘props’
vim92/src/textprop.c:3088:1: enter_function: entry to ‘adjust_props_for_split’
vim92/src/textprop.c:3101:8: branch_true: following ‘true’ branch...
vim92/src/textprop.c:3105:13: branch_true: ...to here
vim92/src/textprop.c:3105:13: call_function: calling ‘get_text_props’ from ‘adjust_props_for_split’
vim92/src/textprop.c:3105:13: return_function: returning to ‘adjust_props_for_split’ from ‘get_text_props’
vim92/src/textprop.c:3110:25: danger: use of uninitialized value ‘props’ here
# 3108|   
# 3109|       // count_ptr points to the prop_count field in the memline.
# 3110|->     char_u *count_ptr = props - PROP_COUNT_SIZE;
# 3111|   
# 3112|       // Keep the relevant ones in the first line, reducing the length if needed.

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-71.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namevim-9.2.240-1.fc44
diffbase-store-results-to/tmp/tmphc60ek_2/vim-9.2.240-1.fc44.tar.xz
diffbase-time-created2026-08-03 21:24:42
diffbase-time-finished2026-08-03 22:12:25
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmphc60ek_2/vim-9.2.240-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphc60ek_2/vim-9.2.240-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-71.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namevim-9.2.843-1.fc45
store-results-to/tmp/tmp15krrunk/vim-9.2.843-1.fc45.tar.xz
time-created2026-08-03 22:12:51
time-finished2026-08-03 23:04:44
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp15krrunk/vim-9.2.843-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp15krrunk/vim-9.2.843-1.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9