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

Rich Salz rsalz at openssl.org
Thu Jun 8 20:13:28 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  e1c6205c23297feb932727944ffba87be869d83a (commit)
      from  0c5c64115072a77dc257bf0bcb85d47f177fdca4 (commit)


- Log -----------------------------------------------------------------
commit e1c6205c23297feb932727944ffba87be869d83a
Author: Rich Salz <rsalz at openssl.org>
Date:   Thu Jun 8 16:05:52 2017 -0400

    Fix a read off the end of the input buffer
    
    when building with OPENSSL_SMALL_FOOTPRINT defined.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3533)
    
    (cherry picked from commit 0b20ad127ce86b05a854f31d51d91312c86ccc74)

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

Summary of changes:
 crypto/whrlpool/wp_dgst.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/whrlpool/wp_dgst.c b/crypto/whrlpool/wp_dgst.c
index 807d1c4..96d042f 100644
--- a/crypto/whrlpool/wp_dgst.c
+++ b/crypto/whrlpool/wp_dgst.c
@@ -166,7 +166,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
                 goto reconsider;
             } else
 #endif
-            if (bits >= 8) {
+            if (bits > 8) {
                 b = ((inp[0] << inpgap) | (inp[1] >> (8 - inpgap)));
                 b &= 0xff;
                 if (bitrem)
@@ -183,7 +183,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
                 }
                 if (bitrem)
                     c->data[byteoff] = b << (8 - bitrem);
-            } else {            /* remaining less than 8 bits */
+            } else {            /* remaining less than or equal to 8 bits */
 
                 b = (inp[0] << inpgap) & 0xff;
                 if (bitrem)


More information about the openssl-commits mailing list