[PATCH] gas/config/tc-score7.c: Use "%s" parameter instead of string parameter in sprintf().
Andreas Schwab
schwab@linux-m68k.org
Wed Jun 4 07:40:00 GMT 2014
Chen Gang <gang.chen.5i5j@gmail.com> writes:
> diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c
> index 0a0db2d..0bae545 100644
> --- a/gas/config/tc-score7.c
> +++ b/gas/config/tc-score7.c
> @@ -5337,7 +5337,7 @@ s7_parse_pce_inst (char *insnstr)
> || ((pec_part_1.size == s7_INSN16_SIZE) && (s7_inst.size == s7_INSN_SIZE)))
> {
> s7_inst.error = _("pce instruction error (16 bit || 16 bit)'");
> - sprintf (s7_inst.str, insnstr);
> + sprintf (s7_inst.str, "%s", insnstr);
Just use strcpy.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Binutils
mailing list