summaryrefslogtreecommitdiff
path: root/src/dosinst.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-02-13 14:36:44 +0100
committerBram Moolenaar <Bram@vim.org>2013-02-13 14:36:44 +0100
commit181ace28ed41ba15078285194a9b9d6e52b46844 (patch)
treef409492fa74ff962884cca940307444d14d22127 /src/dosinst.c
parent76d711c3b5397b749a67d229150d3c1ff3f33add (diff)
downloadvim-git-181ace28ed41ba15078285194a9b9d6e52b46844.tar.gz
updated for version 7.3.809v7.3.809
Problem: The dosinst.c program has a buffer overflow. (Thomas Gwae) Solution: Ignore $VIMRUNTIME if it is too long.
Diffstat (limited to 'src/dosinst.c')
-rw-r--r--src/dosinst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dosinst.c b/src/dosinst.c
index 0ff8e69b6..6bc15fc7d 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -375,7 +375,7 @@ get_vim_env(void)
/* First get $VIMRUNTIME. If it's set, remove the tail. */
vim = getenv("VIMRUNTIME");
- if (vim != NULL && *vim != 0)
+ if (vim != NULL && *vim != 0 && strlen(vim) < BUFSIZE)
{
strcpy(buf, vim);
remove_tail(buf);