]> gcc.gnu.org Git - gcc.git/commitdiff
cp-demangle.c (cplus_demangle_type): Check for invalid type after "DF".
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 26 Jan 2010 04:05:32 +0000 (04:05 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 26 Jan 2010 04:05:32 +0000 (04:05 +0000)
* cp-demangle.c (cplus_demangle_type): Check for invalid type
after "DF".
* testsuite/demangle-expected: Add test.

From-SVN: r156226

libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected

index 1e2fbffdf74c11ffa46c95dfdf3a15e9c7f2a3f0..fcbef269c8777426a8de1fe94b98b20ca5e21dd4 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-25  Ian Lance Taylor  <iant@google.com>
+
+       * cp-demangle.c (cplus_demangle_type): Check for invalid type
+       after "DF".
+       * testsuite/demangle-expected: Add test.
+
 2010-01-20  Jason Merrill  <jason@redhat.com>
 
        PR c++/42338
        with other than 1 operand.
        (d_print_comp): Handle function parameters.  Fix bug with
        function used in type of function.
-       * testsuite/demangle-expected: Upate tests.
+       * testsuite/demangle-expected: Update tests.
 
 2009-02-21  Mark Mitchell  <mark@codesourcery.com>
 
index f28e1636921a2c3f7a3b46b8f2cd3a76ce3dd7a0..2f4d0cc9a30ff253d1c4a21f3c02cdc214bec11b 100644 (file)
@@ -1,5 +1,5 @@
 /* Demangler for g++ V3 ABI.
-   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@wasabisystems.com>.
 
@@ -2193,6 +2193,8 @@ cplus_demangle_type (struct d_info *di)
            /* For demangling we don't care about the bits.  */
            d_number (di);
          ret->u.s_fixed.length = cplus_demangle_type (di);
+         if (ret->u.s_fixed.length == NULL)
+           return NULL;
          d_number (di);
          peek = d_next_char (di);
          ret->u.s_fixed.sat = (peek == 's');
index c201a9832711cfe021486c79cba935fc34a584a6..eaa7ca9c9e581723796056af4777972f92d5dee8 100644 (file)
@@ -4019,5 +4019,8 @@ prot.lock.update
 --format=gnat
 prot__lock__update_E6s
 prot.lock.update
-
-
+#
+# Used to crash the demangler.
+--format=gnu-v3
+DFA
+DFA
This page took 0.08201 seconds and 5 git commands to generate.