avoid accessing off the end of identifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42841 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Basic/IdentifierTable.cpp b/Basic/IdentifierTable.cpp
index 51abcd2..7c26816 100644
--- a/Basic/IdentifierTable.cpp
+++ b/Basic/IdentifierTable.cpp
@@ -157,6 +157,7 @@
return memcmp(Name, #NAME, LEN) ? tok::pp_not_keyword : tok::pp_ ## NAME
unsigned Len = getLength();
+ if (Len < 2) return tok::pp_not_keyword;
const char *Name = getName();
switch (HASH(Len, Name[0], Name[2])) {
default: return tok::pp_not_keyword;