diff options
author | Nick Clifton <nickc@redhat.com> | 2005-07-14 15:34:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-07-14 15:34:16 +0000 |
commit | 6c5cf62cc910b5f946c67f987f21e150de88666a (patch) | |
tree | fef335b5e7e73b5f900b1625fd317ab10d294fe1 | |
parent | 1323e929aee695977a7599f27589e74c44f4c528 (diff) | |
download | gdb-6c5cf62cc910b5f946c67f987f21e150de88666a.zip gdb-6c5cf62cc910b5f946c67f987f21e150de88666a.tar.gz gdb-6c5cf62cc910b5f946c67f987f21e150de88666a.tar.bz2 |
(reset_vars): Use strncpy to prevent overflowing the ins_parse buffer.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-crx.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index c91a0fa..ae44dd9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2005-07-14 Nick Clifton <nickc@redhat.com> + + PR 1069 + * config/tc-crx.c (reset_vars): Use strncpy to prevent overflowing + the ins_parse buffer. + 2005-07-10 Ralf Corsepius <ralf.corsepius@rtems.org> * configure.tgt: Remove a29k-*-rtems*, hppa*-*-rtems*,i386-go32-rtems*, diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index 3f0c767..9b0b856 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -268,7 +268,8 @@ reset_vars (char *op) memset (& output_opcode, '\0', sizeof (output_opcode)); /* Save a copy of the original OP (used in error messages). */ - strcpy (ins_parse, op); + strncpy (ins_parse, op, sizeof ins_parse - 1); + ins_parse [sizeof ins_parse - 1] = 0; } /* This macro decides whether a particular reloc is an entry in a |