0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.3.558

Problem:    Memory access error. (Gary Johnson)
Solution:   Allocate one more byte. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2012-06-20 12:40:08 +02:00
parent 9e931224db
commit dc7e85ee5d
2 changed files with 6 additions and 4 deletions

View File

@@ -460,7 +460,7 @@ get_number_indent(lnum)
* *
* I'm not sure if regmmatch_T (multi-match) is needed in this case. * I'm not sure if regmmatch_T (multi-match) is needed in this case.
* It may be true that this section would work properly using the * It may be true that this section would work properly using the
* regmatch_T code above, in which case, these two seperate sections * regmatch_T code above, in which case, these two separate sections
* should be consolidated w/ FEAT_COMMENTS making lead_len > 0... * should be consolidated w/ FEAT_COMMENTS making lead_len > 0...
*/ */
#endif #endif
@@ -1053,9 +1053,9 @@ open_line(dir, flags, second_line_indent)
} }
if (lead_len) if (lead_len)
{ {
/* allocate buffer (may concatenate p_exta later) */ /* allocate buffer (may concatenate p_extra later) */
leader = alloc(lead_len + lead_repl_len + extra_space + extra_len leader = alloc(lead_len + lead_repl_len + extra_space + extra_len
+ (second_line_indent > 0 ? second_line_indent : 0)); + (second_line_indent > 0 ? second_line_indent : 0) + 1);
allocated = leader; /* remember to free it later */ allocated = leader; /* remember to free it later */
if (leader == NULL) if (leader == NULL)
@@ -3342,7 +3342,7 @@ get_keystroke()
buf = alloc(buflen); buf = alloc(buflen);
else if (maxlen < 10) else if (maxlen < 10)
{ {
/* Need some more space. This migth happen when receiving a long /* Need some more space. This might happen when receiving a long
* escape sequence. */ * escape sequence. */
buflen += 100; buflen += 100;
buf = vim_realloc(buf, buflen); buf = vim_realloc(buf, buflen);

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
558,
/**/ /**/
557, 557,
/**/ /**/