Usage of unitialized heap in tic4x_print_cond
PR 25319 * tic4x-dis.c (tic4x_print_cond): Init all of condtable.
This commit is contained in:
parent
401e101e02
commit
8c5e259235
@ -1,3 +1,8 @@
|
||||
2019-12-29 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 25319
|
||||
* tic4x-dis.c (tic4x_print_cond): Init all of condtable.
|
||||
|
||||
2019-12-27 Jan Beulich <jbeulich@suse.com>
|
||||
|
||||
* i386-dis.c (Jdqw): Define.
|
||||
|
@ -277,7 +277,7 @@ tic4x_print_cond (struct disassemble_info *info, unsigned int cond)
|
||||
|
||||
if (condtable == NULL)
|
||||
{
|
||||
condtable = xmalloc (sizeof (tic4x_cond_t *) * 32);
|
||||
condtable = xcalloc (sizeof (tic4x_cond_t *), 32);
|
||||
for (i = 0; i < tic4x_num_conds; i++)
|
||||
condtable[tic4x_conds[i].cond] = (tic4x_cond_t *)(tic4x_conds + i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user