Commit a80172a4 authored by Stuart Brady's avatar Stuart Brady Committed by Andreas Färber
Browse files

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: default avatarStuart Brady <sdb@zubnet.me.uk>
Reviewed-by: default avatarTom Musta <tommusta@gmail.com>
Tested-by: default avatarTom Musta <tommusta@gmail.com>
Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
parent d197fdbc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);