summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1022
blob: 7881d096b426cad36d79d2f13dc69a45deae11c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1022
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1022
Problem:    May use NULL pointer when out of memory. (Coverity)
Solution:   Check for blob_alloc() returning NULL.
Files:	    src/blob.c


*** ../vim-8.1.1021/src/blob.c	2019-01-24 12:31:40.752926550 +0100
--- src/blob.c	2019-03-19 22:52:20.432751553 +0100
***************
*** 232,237 ****
--- 232,239 ----
      blob_T  *blob = blob_alloc();
      char_u  *s = str;
  
+     if (blob == NULL)
+ 	return NULL;
      if (s[0] != '0' || (s[1] != 'z' && s[1] != 'Z'))
  	goto failed;
      s += 2;
*** ../vim-8.1.1021/src/version.c	2019-03-19 22:22:51.807819390 +0100
--- src/version.c	2019-03-19 22:52:59.520428452 +0100
***************
*** 781,782 ****
--- 781,784 ----
  {   /* Add new patch number below this line */
+ /**/
+     1022,
  /**/

-- 
From "know your smileys":
 :q	vi user saying, "How do I get out of this damn emacs editor?"

 /// Bram Moolenaar -- Bram@Moolenaar.net -- 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    ///