summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-06-20 12:40:08 +0200
committerBram Moolenaar <Bram@vim.org>2012-06-20 12:40:08 +0200
commitdc7e85ee5d29bd65681ff61b37d8e8cd38c22330 (patch)
tree22043a6b6d81ee8f7f86bcd5fa5bb6700c5b510d /src/misc1.c
parent9e931224db8f8843ddc778307984dbe37ebde47c (diff)
downloadvim-git-dc7e85ee5d29bd65681ff61b37d8e8cd38c22330.tar.gz
updated for version 7.3.558v7.3.558
Problem: Memory access error. (Gary Johnson) Solution: Allocate one more byte. (Dominique Pelle)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 1519e97b3..10a0fc065 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -460,7 +460,7 @@ get_number_indent(lnum)
*
* 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
- * 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...
*/
#endif
@@ -1053,9 +1053,9 @@ open_line(dir, flags, second_line_indent)
}
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
- + (second_line_indent > 0 ? second_line_indent : 0));
+ + (second_line_indent > 0 ? second_line_indent : 0) + 1);
allocated = leader; /* remember to free it later */
if (leader == NULL)
@@ -3342,7 +3342,7 @@ get_keystroke()
buf = alloc(buflen);
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. */
buflen += 100;
buf = vim_realloc(buf, buflen);