Browse Source

buffer overflow fix when compiling with vc8

Zachary Pavlov 18 years ago
parent
commit
5d6bbfa383
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ppremake/ppCommandFile.cxx

+ 1 - 1
ppremake/ppCommandFile.cxx

@@ -462,7 +462,7 @@ read_line(string line) {
         }
       }
 
-      if (!_in_for && !failed_if()) {
+      if (!_in_for && !failed_if() && line.length() > p+1) {
         if(line[p+1]==COMMAND_PREFIX) {
           // double prefix at start of line indicates echo single prefix, like '\\' in C
           line.erase(0,1);