diff options
author | Jacob Navia <jacob@jacob.remcomp.fr> | 2023-09-18 12:03:58 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-09-18 12:03:58 +0100 |
commit | cf2ab5ef0b716dea512d85276c484fce758fa5d4 (patch) | |
tree | d3cce4d5fb36cfda770372a3b00ef01985e858c9 /gas/config/tc-riscv.c | |
parent | cb2775070260eae210df62ab57df95927a89536e (diff) | |
download | gdb-cf2ab5ef0b716dea512d85276c484fce758fa5d4.zip gdb-cf2ab5ef0b716dea512d85276c484fce758fa5d4.tar.gz gdb-cf2ab5ef0b716dea512d85276c484fce758fa5d4.tar.bz2 |
Fix: Use of uninitialized memory
* config/tc-riscv.c (riscv_ip_hardcode): Fully initialise the allocated riscv_opcode structure.
Diffstat (limited to 'gas/config/tc-riscv.c')
-rw-r--r-- | gas/config/tc-riscv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index cf6e0d8b..3b520ad 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -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); |