Skip to content

Commit a68a3dd

Browse files
authored
Merge pull request #1936 from grumpycoders/memset-s-fix
Fixing uninitialized memory access in fast memcpy.
2 parents 15e839b + 8410616 commit a68a3dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mips/common/crt0/memory-s.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ __wrap_memcpy:
129129
bltu $a2, 32, .Lmemcpy_last32_unaligned
130130
andi $a2, 31
131131

132+
/* $a3 = end of source - 32 */
133+
addu $a3, $a1, $a2
134+
addiu $a3, -32
135+
132136
.Lmemcpy_loop32_unaligned:
133137
lw $t0, 0($a1)
134138
lw $t1, 4($a1)

0 commit comments

Comments
 (0)