summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-01-31 20:26:44 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-01-31 21:44:58 (GMT)
commit7c82b7f51a7c7a02d060ca804e15049c0a745748 (patch)
treee5d3b198d6d79035685c66301e8ac51ba119b0eb
parent62b589b4cd73fa59b5902f8f0a5779a6a77947aa (diff)
downloadCMake-7c82b7f51a7c7a02d060ca804e15049c0a745748.zip
CMake-7c82b7f51a7c7a02d060ca804e15049c0a745748.tar.gz
CMake-7c82b7f51a7c7a02d060ca804e15049c0a745748.tar.bz2
Fix potential bad memory access, thanks to Eike
-rw-r--r--Source/cmDocumentation.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 8aa4721..80f74a6 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -512,7 +512,7 @@ bool cmDocumentation::CreateSingleModule(const char* fname,
if(line.size() && line[0] == '#')
{
/* line beginnings with ## are mark-up ignore them */
- if (line[1] == '#') continue;
+ if (line.size()>=2 && line[1] == '#') continue;
// blank line
if(line.size() <= 2)
{