[gdb] Fix heap-buffer-overflow in cp_find_first_component_aux
[binutils-gdb.git] / gdb / dwarf2read.c
index 9d9bc9948aa3f948002ca2ef47f897a9172da581..06c319dac02349e1c72e3c7e84407994a9df2910 100644 (file)
@@ -212,7 +212,7 @@ struct mapped_index final : public mapped_index_base
   bool symbol_name_slot_invalid (offset_type idx) const override
   {
     const auto &bucket = this->symbol_table[idx];
-    return bucket.name == 0 && bucket.vec;
+    return bucket.name == 0 && bucket.vec == 0;
   }
 
   /* Convenience method to get at the name of the symbol at IDX in the