mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
ubsan: libctf: applying zero offset to null pointer
* ctf-open.c (init_symtab): Avoid ubsan error.
This commit is contained in:
@ -238,7 +238,7 @@ init_symtab (ctf_dict_t *fp, const ctf_header_t *hp, const ctf_sect_t *sp)
|
|||||||
int skip_func_info = 0;
|
int skip_func_info = 0;
|
||||||
int i;
|
int i;
|
||||||
uint32_t *xp = fp->ctf_sxlate;
|
uint32_t *xp = fp->ctf_sxlate;
|
||||||
uint32_t *xend = xp + fp->ctf_nsyms;
|
uint32_t *xend = PTR_ADD (xp, fp->ctf_nsyms);
|
||||||
|
|
||||||
uint32_t objtoff = hp->cth_objtoff;
|
uint32_t objtoff = hp->cth_objtoff;
|
||||||
uint32_t funcoff = hp->cth_funcoff;
|
uint32_t funcoff = hp->cth_funcoff;
|
||||||
|
Reference in New Issue
Block a user