aboutsummaryrefslogtreecommitdiff
path: root/crypto/x86cpuid.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/x86cpuid.pl
parent21a5c040e5398b7d4ec374168815f88c94a102d6 (diff)
downloadopenssl-7676eebf4297c8ccb27a6517eb8529cbd187f17a.zip
openssl-7676eebf4297c8ccb27a6517eb8529cbd187f17a.tar.gz
openssl-7676eebf4297c8ccb27a6517eb8529cbd187f17a.tar.bz2
OPENSSL_cleanse to accept zero length parameter [matching C implementation].
Diffstat (limited to 'crypto/x86cpuid.pl')
-rw-r--r--crypto/x86cpuid.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl
index e5dcc58..a7464af 100644
--- a/crypto/x86cpuid.pl
+++ b/crypto/x86cpuid.pl
@@ -279,11 +279,14 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
&xor ("eax","eax");
&cmp ("ecx",7);
&jae (&label("lot"));
+ &cmp ("ecx",0);
+ &je (&label("ret"));
&set_label("little");
&mov (&BP(0,"edx"),"al");
&sub ("ecx",1);
&lea ("edx",&DWP(1,"edx"));
&jnz (&label("little"));
+&set_label("ret");
&ret ();
&set_label("lot",16);