target-ppc: Fix overallocation of opcode tables

create_new_table() should allocate 0x20 opc_handler_t pointers, but
actually allocates 0x20 opc_handler_t structs.  Fix this.

Signed-off-by: Stuart Brady <sdb@zubnet.me.uk>
Reviewed-by: Tom Musta <tommusta@gmail.com>
Tested-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
master
Stuart Brady 2014-03-19 14:07:26 +00:00 committed by Andreas Färber
parent d197fdbc3b
commit a80172a476
1 changed files with 1 additions and 1 deletions

View File

@ -7434,7 +7434,7 @@ static int create_new_table (opc_handler_t **table, unsigned char idx)
{
opc_handler_t **tmp;
tmp = g_malloc(0x20 * sizeof(opc_handler_t));
tmp = g_new(opc_handler_t *, 0x20);
fill_new_table(tmp, 0x20);
table[idx] = (opc_handler_t *)((uintptr_t)tmp | PPC_INDIRECT);