Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@imgtec.com>2016-01-29 01:08:35 +0300
committerSteve Ellcey <sellcey@imgtec.com>2016-01-29 01:08:35 +0300
commit4792146a0f20d23be523b5b57be6f037c0c9c00d (patch)
tree2a3bdb6a0ec7c50e66aec0f7df95fd6ca625e43b /newlib/libc
parenta710c89dcb160eef714a272cc7610ed697c17369 (diff)
Fix memcpy bug that reads past end of buffer.
* libc/machine/mips/memcpy.S (memcpy): Fix read past end of input.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/machine/mips/memcpy.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/machine/mips/memcpy.S b/newlib/libc/machine/mips/memcpy.S
index 3130f6e1a..21bd3b4f4 100644
--- a/newlib/libc/machine/mips/memcpy.S
+++ b/newlib/libc/machine/mips/memcpy.S
@@ -581,11 +581,11 @@ L(lastw):
#ifdef USE_DOUBLE
andi t8,a2,3 /* a2 is the remainder past 4 byte chunks. */
beq t8,a2,L(lastb)
+ move a2,t8
lw REG3,0(a1)
sw REG3,0(a0)
PTR_ADDIU a0,a0,4
PTR_ADDIU a1,a1,4
- move a2,t8
#endif
/* Copy the last 8 (or 16) bytes */