[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Andy Polyakov appro at openssl.org
Fri Nov 25 16:24:35 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  f47201b3279b3fd16f90ba512e5b203e4944b30c (commit)
      from  c4c71650bb670ab09ea7cc2e68cd4be7a414c855 (commit)


- Log -----------------------------------------------------------------
commit f47201b3279b3fd16f90ba512e5b203e4944b30c
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun Nov 20 23:38:12 2016 +0100

    modes/ctr128.c: fix false carry in counter increment procedure.
    
    GH issue #1916 affects only big-endian platforms. TLS is not affected,
    because TLS fragment is never big enough.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (cherry picked from commit 76f572ed0469a277d92378848250b7a9705d3071)

-----------------------------------------------------------------------

Summary of changes:
 crypto/modes/ctr128.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/modes/ctr128.c b/crypto/modes/ctr128.c
index bcafd6b..d4b2272 100644
--- a/crypto/modes/ctr128.c
+++ b/crypto/modes/ctr128.c
@@ -100,7 +100,7 @@ static void ctr128_inc_aligned(unsigned char *counter)
         --n;
         d = data[n] += c;
         /* did addition carry? */
-        c = ((d - c) ^ d) >> (sizeof(size_t) * 8 - 1);
+        c = ((d - c) & ~d) >> (sizeof(size_t) * 8 - 1);
     } while (n);
 }
 #endif


More information about the openssl-commits mailing list