[PATCH] Fix out-of-bounds read in tui_addr_is_displayed
Bogdan Harjoc
harjoc@gmail.com
Fri Aug 2 15:53:00 GMT 2019
In tui_addr_is_displayed(), if win_info->content.size() is less than 2, then
win_info->content.size () - threshold
will wrap to SIZE_MAX if threshold = SCROLL_THRESHOLD = 2.
The attached patch avoids calling win_info->content[i] below with i=0
which is past the end of the vector of size 0.
Bogdan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-tui_addr_is_displayed-underflow.patch
Type: text/x-patch
Size: 408 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20190802/3665b096/attachment.bin>
More information about the Gdb-patches
mailing list