projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0652041
)
ubsan: libctf: applying zero offset to null pointer
author
Alan Modra
<amodra@gmail.com>
Thu, 2 Sep 2021 23:04:05 +0000
(08:34 +0930)
committer
Alan Modra
<amodra@gmail.com>
Fri, 3 Sep 2021 02:15:58 +0000
(11:45 +0930)
* ctf-open.c (init_symtab): Avoid ubsan error.
libctf/ctf-open.c
patch
|
blob
|
history
diff --git
a/libctf/ctf-open.c
b/libctf/ctf-open.c
index 1c69dc83102d95e8bb612efdc547b34a160084a2..9e2c57051aff79206f3962522d68dab631558a6c 100644
(file)
--- a/
libctf/ctf-open.c
+++ b/
libctf/ctf-open.c
@@
-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 i;
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 funcoff = hp->cth_funcoff;