Fixed stack overflow in CPPextension function. An arbitrary size buffer was being used for extension name. Changed it to use MAX_SYMBOL_NAME_LEN.
- Also formalized the values for MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN. They were being used as if there was a confusion whether it included the NULL terminator or not.
- Fixed some minor issues with code releated to the usage of MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN.
BUG=59625 (crbug.com)
Review URL: http://codereview.appspot.com/2585042

git-svn-id: https://angleproject.googlecode.com/svn/trunk@464 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/preprocessor/scanner.h b/src/compiler/preprocessor/scanner.h
index c12c97b..c8175ab 100644
--- a/src/compiler/preprocessor/scanner.h
+++ b/src/compiler/preprocessor/scanner.h
@@ -48,8 +48,9 @@
 #if !defined(__SCANNER_H)
 #define __SCANNER_H 1
 
-#define MAX_SYMBOL_NAME_LEN 128
-#define MAX_STRING_LEN 512
+// These lengths do not include the NULL terminator.
+#define MAX_SYMBOL_NAME_LEN 127
+#define MAX_STRING_LEN 511
 
 #include "compiler/preprocessor/parser.h"