aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorFelix Lee <flee@cygnus>1997-09-10 04:46:37 +0000
committerFelix Lee <flee@cygnus>1997-09-10 04:46:37 +0000
commit31dda65afff3731d51fa249f2118e267d561dd70 (patch)
treefb2b540d7fef5610769b6fca3ee08e801235ee27 /sim
parenta1efa0d8804cf5b897321370dcf0ef7b1aa646a5 (diff)
downloadgdb-31dda65afff3731d51fa249f2118e267d561dd70.zip
gdb-31dda65afff3731d51fa249f2118e267d561dd70.tar.gz
gdb-31dda65afff3731d51fa249f2118e267d561dd70.tar.bz2
* sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
illegal zero-sized array. * sim-core.c (sim_core_xor_read_buffer): same.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog6
-rw-r--r--sim/common/sim-core.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 93476e7..8c2db64 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,9 @@
+Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
+
+ * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
+ illegal zero-sized array.
+ * sim-core.c (sim_core_xor_read_buffer): same.
+
Tue Sep 9 11:20:35 1997 Doug Evans <dje@canuck.cygnus.com>
* nltvals.def: Regenerate.
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c
index 9c49fed..079c964 100644
--- a/sim/common/sim-core.c
+++ b/sim/common/sim-core.c
@@ -660,7 +660,7 @@ sim_core_xor_read_buffer (SIM_DESC sd,
else
/* only break up transfers when xor-endian is both selected and enabled */
{
- unsigned_1 x[WITH_XOR_ENDIAN];
+ unsigned_1 x[WITH_XOR_ENDIAN + 1]; /* +1 to avoid zero-sized array */
unsigned nr_transfered = 0;
address_word start = addr;
unsigned nr_this_transfer = (WITH_XOR_ENDIAN - (addr & ~(WITH_XOR_ENDIAN - 1)));