From 067ae7030d6c65810cb8d66e5d15c6f7926d00c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sun, 4 Mar 2018 00:43:44 +0100 Subject: [PATCH] Fix out of bounds write in vtables (#9571) --- libr/core/anal_vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/core/anal_vt.c b/libr/core/anal_vt.c index 5fae89aca0..f39f52da89 100644 --- a/libr/core/anal_vt.c +++ b/libr/core/anal_vt.c @@ -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);