]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Avoid ubsan complaint in BFD
authorTom Tromey <tom@tromey.com>
Mon, 16 Jul 2018 00:07:40 +0000 (18:07 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 23 Jul 2018 14:14:00 +0000 (08:14 -0600)
commit01bcaf636ad0b1d5fe44a21917ec900af86072a8
tree98ffe83dd19e92881ae4b0319e4cfa9604a46f59
parente2b7fbc46d08605bd2807678475e01be42e589e6
Avoid ubsan complaint in BFD

I built gdb with ubsan and ran the test suite.

One complaint was due to bfd_get_elf_phdrs passing NULL to memcpy.
This patch avoids the complaint.

bfd/ChangeLog
2018-07-23  Tom Tromey  <tom@tromey.com>

* elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
bfd/ChangeLog
bfd/elf.c