Fix memcpy bug that reads past end of buffer.
* libc/machine/mips/memcpy.S (memcpy): Fix read past end of input.
This commit is contained in:
parent
a710c89dcb
commit
4792146a0f
@ -581,11 +581,11 @@ L(lastw):
|
|||||||
#ifdef USE_DOUBLE
|
#ifdef USE_DOUBLE
|
||||||
andi t8,a2,3 /* a2 is the remainder past 4 byte chunks. */
|
andi t8,a2,3 /* a2 is the remainder past 4 byte chunks. */
|
||||||
beq t8,a2,L(lastb)
|
beq t8,a2,L(lastb)
|
||||||
|
move a2,t8
|
||||||
lw REG3,0(a1)
|
lw REG3,0(a1)
|
||||||
sw REG3,0(a0)
|
sw REG3,0(a0)
|
||||||
PTR_ADDIU a0,a0,4
|
PTR_ADDIU a0,a0,4
|
||||||
PTR_ADDIU a1,a1,4
|
PTR_ADDIU a1,a1,4
|
||||||
move a2,t8
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Copy the last 8 (or 16) bytes */
|
/* Copy the last 8 (or 16) bytes */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user