- amt = lst_header->hash_size * 4;
- hash_table = bfd_malloc (amt);
- if (hash_table == NULL && amt != 0)
+ /* Read in the hash table. The hash table is an array of 32-bit
+ file offsets which point to the hash chains. */
+ if (_bfd_mul_overflow (lst_header->hash_size, 4, &amt))
+ {
+ bfd_set_error (bfd_error_file_too_big);
+ return false;
+ }
+ hash_table = _bfd_malloc_and_read (abfd, amt, amt);
+ if (hash_table == NULL && lst_header->hash_size != 0)