jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.451

073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.451
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.451
073263
Problem:    Calling system() with empty input gives an error for writing the
073263
	    temp file.
073263
Solution:   Do not try writing if the string length is zero. (Olaf Dabrunz)
073263
Files:	    src/eval.c
073263
073263
073263
*** ../vim-7.4.450/src/eval.c	2014-09-19 14:26:29.654405000 +0200
073263
--- src/eval.c	2014-09-19 20:23:57.354451850 +0200
073263
***************
073263
*** 18638,18650 ****
073263
  	}
073263
  	else
073263
  	{
073263
  	    p = get_tv_string_buf_chk(&argvars[1], buf);
073263
  	    if (p == NULL)
073263
  	    {
073263
  		fclose(fd);
073263
  		goto errret;		/* type error; errmsg already given */
073263
  	    }
073263
! 	    if (fwrite(p, STRLEN(p), 1, fd) != 1)
073263
  		err = TRUE;
073263
  	}
073263
  	if (fclose(fd) != 0)
073263
--- 18638,18653 ----
073263
  	}
073263
  	else
073263
  	{
073263
+ 	    size_t len;
073263
+ 
073263
  	    p = get_tv_string_buf_chk(&argvars[1], buf);
073263
  	    if (p == NULL)
073263
  	    {
073263
  		fclose(fd);
073263
  		goto errret;		/* type error; errmsg already given */
073263
  	    }
073263
! 	    len = STRLEN(p);
073263
! 	    if (len > 0 && fwrite(p, len, 1, fd) != 1)
073263
  		err = TRUE;
073263
  	}
073263
  	if (fclose(fd) != 0)
073263
*** ../vim-7.4.450/src/version.c	2014-09-19 20:07:22.550449677 +0200
073263
--- src/version.c	2014-09-19 20:19:22.390451249 +0200
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     451,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
167. You have more than 200 websites bookmarked.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///