[cfe-commits] [libcxxabi] r158556 - /libcxxabi/trunk/src/cxa_demangle.cpp

Howard Hinnant hhinnant at apple.com
Fri Jun 15 14:57:51 PDT 2012


Author: hhinnant
Date: Fri Jun 15 16:57:51 2012
New Revision: 158556

URL: http://llvm.org/viewvc/llvm-project?rev=158556&view=rev
Log:
Don't dereference root in __parse_ctor_dtor_name unless it is known to not be null.

Modified:
    libcxxabi/trunk/src/cxa_demangle.cpp

Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=158556&r1=158555&r2=158556&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Fri Jun 15 16:57:51 2012
@@ -6896,7 +6896,7 @@
 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])
         {





More information about the cfe-commits mailing list