mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
pdb sanity check block_size
* pdb.c (pdb_get_elt_at_index): Only allow block_size to be 512, 1024, 2048, or 4096.
This commit is contained in:
@ -79,6 +79,13 @@ pdb_get_elt_at_index (bfd *abfd, symindex sym_index)
|
||||
}
|
||||
|
||||
block_size = bfd_getl32 (int_buf);
|
||||
if ((block_size & -block_size) != block_size
|
||||
|| block_size < 512
|
||||
|| block_size > 4096)
|
||||
{
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get block_map_addr. */
|
||||
|
||||
|
Reference in New Issue
Block a user