summaryrefslogtreecommitdiff
path: root/crypto/x86_64cpuid.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2010-01-24 14:54:24 +0000
committerAndy Polyakov <appro@openssl.org>2010-01-24 14:54:24 +0000
commit7676eebf4297c8ccb27a6517eb8529cbd187f17a (patch)
tree8668e00dc37bdb3b027f34331e810578aaf7d02c /crypto/x86_64cpuid.pl
parent21a5c040e5398b7d4ec374168815f88c94a102d6 (diff)
downloadopenssl-new-7676eebf4297c8ccb27a6517eb8529cbd187f17a.tar.gz
OPENSSL_cleanse to accept zero length parameter [matching C implementation].
Diffstat (limited to 'crypto/x86_64cpuid.pl')
-rw-r--r--crypto/x86_64cpuid.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/x86_64cpuid.pl b/crypto/x86_64cpuid.pl
index 862118f285..a7f98b3fd3 100644
--- a/crypto/x86_64cpuid.pl
+++ b/crypto/x86_64cpuid.pl
@@ -145,12 +145,14 @@ OPENSSL_cleanse:
xor %rax,%rax
cmp \$15,$arg2
jae .Lot
+ cmp \$0,$arg2
+ je .Lret
.Little:
mov %al,($arg1)
sub \$1,$arg2
lea 1($arg1),$arg1
jnz .Little
- ret
+.Lret: ret
.align 16
.Lot:
test \$7,$arg1