summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-21 21:30:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-21 21:30:51 +0000
commit2a9850026ed517e2f6e0475eac5318a7108139e1 (patch)
treead17c783e0e6491cf7ace19e27cc8537963984f9 /sys/lib
parent0f8e78ae634c15f0ddb1c78f6832a6a92f804987 (diff)
mask off high bits from 'c', before operation, otherwise the packing
logic writes balony. Hunting with tedu, mlarkin, and final bit spotted by naddy in freebsd's version.
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libkern/arch/amd64/memset.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/lib/libkern/arch/amd64/memset.S b/sys/lib/libkern/arch/amd64/memset.S
index 0f6ae1064d0..670d9426b13 100644
--- a/sys/lib/libkern/arch/amd64/memset.S
+++ b/sys/lib/libkern/arch/amd64/memset.S
@@ -8,6 +8,7 @@
ENTRY(memset)
movq %rsi,%rax
+ andq $0xff,%rax
movq %rdx,%rcx
movq %rdi,%r11