diff options
author | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2017-12-30 22:14:41 +0300 |
---|---|---|
committer | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2017-12-31 11:55:19 +0300 |
commit | 47fea877452b84b94ac6ffb26f194f12845526fa (patch) | |
tree | 26d5c3d1db3a6b10c3be66998ead02a1f130a648 /gdb/proc-why.c | |
parent | cfa27c399ec9236a100ef794505d35f60da41a6d (diff) | |
download | gdb-47fea877452b84b94ac6ffb26f194f12845526fa.zip gdb-47fea877452b84b94ac6ffb26f194f12845526fa.tar.gz gdb-47fea877452b84b94ac6ffb26f194f12845526fa.tar.bz2 |
Avoid indexing std::vector past the end
The code here wants to find address of an element, and often this
element is one past the end of std::vector. Dereferencing that element
leads to undefined behavior, so it's better to simply use pointer
arithmetic instead of taking address of invalid dereference.
gdb/ChangeLog:
* psymtab.c (recursively_search_psymtabs): Use pointer arithmetic
instead of dereferencing std::vector past the end.
Diffstat (limited to 'gdb/proc-why.c')
0 files changed, 0 insertions, 0 deletions