mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 22:03:57 +08:00
asan: null deref in coff_write_relocs
* coffcode.h (coff_write_relocs): Don't deref NULL howto.
This commit is contained in:
@ -2690,8 +2690,10 @@ coff_write_relocs (bfd * abfd, int first_undef)
|
|||||||
|
|
||||||
#ifdef SELECT_RELOC
|
#ifdef SELECT_RELOC
|
||||||
/* Work out reloc type from what is required. */
|
/* Work out reloc type from what is required. */
|
||||||
|
if (q->howto)
|
||||||
SELECT_RELOC (n, q->howto);
|
SELECT_RELOC (n, q->howto);
|
||||||
#else
|
#else
|
||||||
|
if (q->howto)
|
||||||
n.r_type = q->howto->type;
|
n.r_type = q->howto->type;
|
||||||
#endif
|
#endif
|
||||||
coff_swap_reloc_out (abfd, &n, &dst);
|
coff_swap_reloc_out (abfd, &n, &dst);
|
||||||
|
Reference in New Issue
Block a user