[Cmake-commits] CMake branch, next, updated. v3.7.0-1382-gaafa5e7

Brad King brad.king at kitware.com
Tue Nov 29 08:31:13 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  aafa5e76c80c4850a7767d47fb8026d70b4b9a52 (commit)
       via  9e07ffa4e4211ca165f24c1f45744fbe7984a43f (commit)
      from  35edbdb02c0566eb56c3b649450caf68607b5216 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aafa5e76c80c4850a7767d47fb8026d70b4b9a52
commit aafa5e76c80c4850a7767d47fb8026d70b4b9a52
Merge: 35edbdb 9e07ffa
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 29 08:31:12 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 29 08:31:12 2016 -0500

    Merge topic 'librhash-left-shift-unsigned' into next
    
    9e07ffa4 librhash: Avoid signed left-shift overflow in sha256


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e07ffa4e4211ca165f24c1f45744fbe7984a43f
commit 9e07ffa4e4211ca165f24c1f45744fbe7984a43f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 29 08:28:31 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 29 08:30:25 2016 -0500

    librhash: Avoid signed left-shift overflow in sha256
    
    Fix `rhash_sha256_final` to use unsigned integers for left shifting to
    avoid the possibility of undefined overflow behavior.

diff --git a/Utilities/cmlibrhash/librhash/sha256.c b/Utilities/cmlibrhash/librhash/sha256.c
index 064dfe2..af5b0fe 100644
--- a/Utilities/cmlibrhash/librhash/sha256.c
+++ b/Utilities/cmlibrhash/librhash/sha256.c
@@ -218,8 +218,8 @@ void rhash_sha256_final(sha256_ctx *ctx, unsigned char* result)
 	/* pad message and run for last block */
 
 	/* append the byte 0x80 to the message */
-	ctx->message[index]   &= le2me_32(~(0xFFFFFFFF << shift));
-	ctx->message[index++] ^= le2me_32(0x80 << shift);
+	ctx->message[index]   &= le2me_32(~(0xFFFFFFFFu << shift));
+	ctx->message[index++] ^= le2me_32(0x80u << shift);
 
 	/* if no room left in the message to store 64-bit message length */
 	if (index > 14) {

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

Summary of changes:
 Utilities/cmlibrhash/librhash/sha256.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list