ghash-x86_64.pl: fix length handling bug.
authorAndy Polyakov <appro@openssl.org>
Wed, 6 Mar 2013 09:42:21 +0000 (10:42 +0100)
committerAndy Polyakov <appro@openssl.org>
Wed, 6 Mar 2013 09:42:21 +0000 (10:42 +0100)
Thanks to Shay Gueron & Vlad Krasnov for report.

crypto/modes/asm/ghash-x86_64.pl

index 4bbd4ab..df4101c 100644 (file)
@@ -754,8 +754,9 @@ ___
 $code.=<<___;
        add     \$0x40,$len
        jz      .Ldone
-       sub     \$0x10,$len
        movdqu  0x20($Htbl),$HK
+       sub     \$0x10,$len
+       jz      .Lodd_tail
 .Lskip4x:
 ___
 }