Don't dereference root in __parse_ctor_dtor_name unless it is known to not be null.

llvm-svn: 158556
This commit is contained in:
Howard Hinnant 2012-06-15 21:57:51 +00:00
parent 5586340b78
commit 7f53a5da57

View File

@ -6896,7 +6896,7 @@ __demangle_tree::__parse_unnamed_type_name(const char* first, const char* last)
const char*
__demangle_tree::__parse_ctor_dtor_name(const char* first, const char* last)
{
if (last-first >= 2)
if (last-first >= 2 && __root_)
{
switch (first[0])
{