mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
PR29170, divide by zero displaying fuzzed .debug_names
PR 29170 * dwarf.c (display_debug_names): Don't attempt to display bucket clashes when bucket count is zero.
This commit is contained in:
parent
244e19c791
commit
5fbb38fcc5
@ -10149,6 +10149,8 @@ display_debug_names (struct dwarf_section *section, void *file)
|
||||
bucket_count),
|
||||
buckets_filled, (unsigned long) bucket_count);
|
||||
|
||||
if (bucket_count != 0)
|
||||
{
|
||||
uint32_t hash_prev = 0;
|
||||
size_t hash_clash_count = 0;
|
||||
size_t longest_clash = 0;
|
||||
@ -10175,6 +10177,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
||||
" (longest of %zu entries).\n"),
|
||||
(unsigned long) name_count, hash_clash_count, longest_clash);
|
||||
assert (name_count == buckets_filled + hash_clash_count);
|
||||
}
|
||||
|
||||
struct abbrev_lookup_entry
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user