Fix out of bounds write in vtables (#9571)

This commit is contained in:
Florian Märkl 2018-03-04 00:43:44 +01:00 committed by radare
parent 7f0bc8ee03
commit 067ae7030d

View File

@ -94,7 +94,7 @@ RList* search_virtual_tables(RCore *core){
int wordSize = bits / 8;
r_list_foreach (sections, iter, section) {
if (!strcmp (section->name, ".rodata")) {
ut8 *segBuff = calloc (1, section->size);
ut8 *segBuff = calloc (1, section->vsize);
r_io_read_at (core->io, section->vaddr, segBuff, section->vsize);
startAddress = section->vaddr;
endAddress = startAddress + (section->vsize) - (bits/8);