summaryrefslogtreecommitdiff
path: root/opcodes/tic4x-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-30 09:19:25 +1030
committerAlan Modra <amodra@gmail.com>2019-12-30 09:35:29 +1030
commit2c5b6e1a1c406cbe06e2d6f77861764ebd01b9ce (patch)
tree649ff07aa2a5c4b8b69dbf8184eb4d5dad6d98a3 /opcodes/tic4x-dis.c
parentc296cbe681815593eb57033368ac1b20b7a67252 (diff)
downloadbinutils-gdb-2c5b6e1a1c406cbe06e2d6f77861764ebd01b9ce.tar.gz
Re: Usage of unitialized heap in tic4x_print_cond
PR 25319 * tic4x-dis.c (tic4x_print_cond): Correct order of xcalloc args.
Diffstat (limited to 'opcodes/tic4x-dis.c')
-rw-r--r--opcodes/tic4x-dis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/tic4x-dis.c b/opcodes/tic4x-dis.c
index 01cfa1e060f..e058fdc9f8a 100644
--- a/opcodes/tic4x-dis.c
+++ b/opcodes/tic4x-dis.c
@@ -277,7 +277,7 @@ tic4x_print_cond (struct disassemble_info *info, unsigned int cond)
if (condtable == NULL)
{
- condtable = xcalloc (sizeof (tic4x_cond_t *), 32);
+ condtable = xcalloc (32, sizeof (tic4x_cond_t *));
for (i = 0; i < tic4x_num_conds; i++)
condtable[tic4x_conds[i].cond] = (tic4x_cond_t *)(tic4x_conds + i);
}