aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexCrontab.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-07-23 17:51:53 +1000
committerNeil <nyamatongwe@gmail.com>2013-07-23 17:51:53 +1000
commit883e6b2de1a1f317d465f6876b5cf00346107910 (patch)
treedf6b2e81fd34c300a3595ecb8b0b86eb4ac8366d /lexers/LexCrontab.cxx
parent4b37400e43be42635cd9015566357793b7c607b2 (diff)
downloadscintilla-mirror-883e6b2de1a1f317d465f6876b5cf00346107910.tar.gz
Fix potential write beyond allocation found by Visual C++ analyzer.
Diffstat (limited to 'lexers/LexCrontab.cxx')
-rw-r--r--lexers/LexCrontab.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexers/LexCrontab.cxx b/lexers/LexCrontab.cxx
index 68f52e362..ad6668fa7 100644
--- a/lexers/LexCrontab.cxx
+++ b/lexers/LexCrontab.cxx
@@ -36,7 +36,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
char chNext = styler[startPos];
int lengthDoc = startPos + length;
// create a buffer large enough to take the largest chunk...
- char *buffer = new char[length];
+ char *buffer = new char[length+1];
int bufferCount = 0;
// used when highliting environment variables inside quoted string:
bool insideString = false;