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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1409
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.1409
Problem: Coverity warns for using uninitialized memory.
Solution: Add a condition to clearing the growarray.
Files: src/json.c
*** ../vim-8.1.1408/src/json.c 2019-05-19 19:59:30.164255569 +0200
--- src/json.c 2019-05-27 20:00:06.682014049 +0200
***************
*** 455,461 ****
STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
if (len == 0)
{
! ga_clear(&ga);
return FAIL;
}
p += len + 2;
--- 455,462 ----
STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
if (len == 0)
{
! if (res != NULL)
! ga_clear(&ga);
return FAIL;
}
p += len + 2;
***************
*** 471,477 ****
STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
if (len == 0)
{
! ga_clear(&ga);
return FAIL;
}
if (0xdc00 <= nr2 && nr2 <= 0xdfff)
--- 472,479 ----
STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
if (len == 0)
{
! if (res != NULL)
! ga_clear(&ga);
return FAIL;
}
if (0xdc00 <= nr2 && nr2 <= 0xdfff)
***************
*** 484,489 ****
--- 486,492 ----
if (res != NULL)
{
char_u buf[NUMBUFLEN];
+
buf[utf_char2bytes((int)nr, buf)] = NUL;
ga_concat(&ga, buf);
}
*** ../vim-8.1.1408/src/version.c 2019-05-27 10:04:37.530426996 +0200
--- src/version.c 2019-05-27 20:01:01.001703887 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1409,
/**/
--
A day without sunshine is like, well, night.
/// 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 ///
|