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>
This commit is contained in:
parent
d197fdbc3b
commit
a80172a476
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user