mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
Re: loongarch readelf support
Another segfault. * readelf.c (target_specific_reloc_handling): Sanity check loongarch reloc r_offset.
This commit is contained in:
parent
c6e6e3ab2b
commit
89c70cd358
@ -14021,8 +14021,9 @@ target_specific_reloc_handling (Filedata *filedata,
|
||||
unsigned int reloc_size = 0;
|
||||
int leb_ret = 0;
|
||||
|
||||
value = read_leb128 (start + reloc->r_offset, end, false,
|
||||
&reloc_size, &leb_ret);
|
||||
if (reloc->r_offset < (size_t) (end - start))
|
||||
value = read_leb128 (start + reloc->r_offset, end, false,
|
||||
&reloc_size, &leb_ret);
|
||||
if (leb_ret != 0 || reloc_size == 0 || reloc_size > 8)
|
||||
error (_("LoongArch ULEB128 field at 0x%lx contains invalid "
|
||||
"ULEB128 value\n"),
|
||||
|
Loading…
Reference in New Issue
Block a user