Fix heap-buffer-overflow in explicit_location_lex_one
[deliverable/binutils-gdb.git] / gdb / location.c
index 071d262d9f934a3a09f39f5c4e6cd465a538b8b0..65116c732f7071444986c4b582580b7cc4622f0b 100644 (file)
@@ -498,9 +498,8 @@ explicit_location_lex_one (const char **inp,
        {
          /* Special case: C++ operator,.  */
          if (language->la_language == language_cplus
-             && strncmp (*inp, "operator", 8)
-             && (*inp)[9] == ',')
-           (*inp) += 9;
+             && strncmp (*inp, "operator", 8) == 0)
+           (*inp) += 8;
          ++(*inp);
        }
     }
This page took 0.024691 seconds and 4 git commands to generate.