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 4bbd4ab5d6cdf145257b312dd4ba868531a3eedc..df4101cc2d4b6915046a82cb37e4cc022272852f 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:
 ___
 }