Patch 7.4.1595
Problem:    Not checking for failed open(). (Coverity)
Solution:   Check file descriptor not being negative.
Files:      src/os_unix.c


*** ../vim-7.4.1594/src/os_unix.c       2016-03-19 14:11:14.247040239 +0100
--- src/os_unix.c       2016-03-19 14:05:21.646727700 +0100
***************
*** 5150,5156 ****
            null_fd = open("/dev/null", O_RDWR | O_EXTRA, 0);
  
        /* set up stdin for the child */
!       if (use_null_for_in)
        {
            close(0);
            ignored = dup(null_fd);
--- 5150,5156 ----
            null_fd = open("/dev/null", O_RDWR | O_EXTRA, 0);
  
        /* set up stdin for the child */
!       if (use_null_for_in && null_fd >= 0)
        {
            close(0);
            ignored = dup(null_fd);
***************
*** 5165,5171 ****
        }
  
        /* set up stderr for the child */
!       if (use_null_for_err)
        {
            close(2);
            ignored = dup(null_fd);
--- 5165,5171 ----
        }
  
        /* set up stderr for the child */
!       if (use_null_for_err && null_fd >= 0)
        {
            close(2);
            ignored = dup(null_fd);
***************
*** 5185,5191 ****
        }
  
        /* set up stdout for the child */
!       if (use_null_for_out)
        {
            close(0);
            ignored = dup(null_fd);
--- 5185,5191 ----
        }
  
        /* set up stdout for the child */
!       if (use_null_for_out && null_fd >= 0)
        {
            close(0);
            ignored = dup(null_fd);
*** ../vim-7.4.1594/src/version.c       2016-03-19 14:11:14.247040239 +0100
--- src/version.c       2016-03-19 14:12:23.018321150 +0100
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1595,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
83. Batteries in the TV remote now last for months.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui