Fix: Use of uninitialized memory
* config/tc-riscv.c (riscv_ip_hardcode): Fully initialise the allocated riscv_opcode structure.
This commit is contained in:
parent
cb27750702
commit
cf2ab5ef0b
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2023-09-18 Jacob Navia <jacob@jacob.remcomp.fr>
|
||||
|
||||
* config/tc-riscv.c (riscv_ip_hardcode): Fully initialise the
|
||||
allocated riscv_opcode structure.
|
||||
|
||||
2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||
|
||||
* config/tc-bpf.c (check_immediate_overflow): New function.
|
||||
|
|
|
@ -3718,7 +3718,7 @@ riscv_ip_hardcode (char *str,
|
|||
if (*input_line_pointer != '\0')
|
||||
return _("unrecognized values");
|
||||
|
||||
insn = XNEW (struct riscv_opcode);
|
||||
insn = XCNEW (struct riscv_opcode);
|
||||
insn->match = values[num - 1];
|
||||
create_insn (ip, insn);
|
||||
unsigned int bytes = riscv_insn_length (insn->match);
|
||||
|
|
Loading…
Add table
Reference in a new issue