]> sourceware.org Git - dwz.git/commit
Fix dynamic-stack-buffer-overflow (write_dso, distance)
authorTom de Vries <tdevries@suse.de>
Thu, 27 Jun 2019 14:53:13 +0000 (16:53 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 27 Jun 2019 15:56:35 +0000 (17:56 +0200)
commit2ff12c875baeadc85e96b25e7267ff57d40be969
tree4d4053da400f627446e11823ef7a21712466f532
parent62142c0aea241616f8f2b09c98efa89cb5bb5bf0
Fix dynamic-stack-buffer-overflow (write_dso, distance)

When compiling with gcc 8 and -fsanitize=address -lasan, we run into a
dynamic-stack-buffer-overflow related to the distance variable in write_dso.

The variable is allocated with dimension dso->ehdr.e_shnum, but we use
dso->ehdr.e_shnum elements while not using element 0.

Fix this by increasing the size of the distance variable.

This fixes the dwz-fedora-s390x buildbot failure.

2019-06-27  Tom de Vries  <tdevries@suse.de>

PR dwz/24734
* dwz.c (write_dso): Increase size of distance.
dwz.c
This page took 0.024037 seconds and 5 git commands to generate.