PR 18303, Tolerate malformed input for lookup_symbol-called functions
[deliverable/binutils-gdb.git] / gdb / cp-support.c
index df127c4e05f0d00e820ebf58722ad316add474cd..a71c6ad722743d982bd07869e08176e07388dda9 100644 (file)
@@ -1037,8 +1037,13 @@ cp_find_first_component_aux (const char *name, int permissive)
              return strlen (name);
            }
        case '\0':
-       case ':':
          return index;
+       case ':':
+         /* ':' marks a component iff the next character is also a ':'.
+            Otherwise it is probably malformed input.  */
+         if (name[index + 1] == ':')
+           return index;
+         break;
        case 'o':
          /* Operator names can screw up the recursion.  */
          if (operator_possible
This page took 0.031727 seconds and 4 git commands to generate.