From 7c82b7f51a7c7a02d060ca804e15049c0a745748 Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Tue, 31 Jan 2012 21:26:44 +0100 Subject: Fix potential bad memory access, thanks to Eike --- Source/cmDocumentation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v0.12