diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-11-21 21:30:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-11-21 21:30:51 +0000 |
commit | 2a9850026ed517e2f6e0475eac5318a7108139e1 (patch) | |
tree | ad17c783e0e6491cf7ace19e27cc8537963984f9 /sys/lib | |
parent | 0f8e78ae634c15f0ddb1c78f6832a6a92f804987 (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.S | 1 |
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 |