]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix last sha512.c change to avoid compiler warning.
authorRoland McGrath <roland@hack.frob.com>
Wed, 15 Aug 2012 20:59:59 +0000 (13:59 -0700)
committerRoland McGrath <roland@hack.frob.com>
Wed, 15 Aug 2012 20:59:59 +0000 (13:59 -0700)
ChangeLog
crypt/sha512.c

index 41aacc8edbe38db5dd3a15a34efad53c3e969738..66a0b7178f202c57a9169021914cf0b1f7bcc474 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-15  Roland McGrath  <roland@hack.frob.com>
+
+       * crypt/sha512.c (sha512_process_block) [!USE_TOTAL128]: Avoid
+       shifting LEN more than 31 bits at once.
+
 2012-08-15  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>
 
        [BZ #14195]
index bec7bb35155b0275ed8d89e6c4b9ede69a73a51e..0675c948c11d325b13f53dcaba458d6922bda1c6 100644 (file)
@@ -125,7 +125,7 @@ sha512_process_block (const void *buffer, size_t len, struct sha512_ctx *ctx)
 #else
   uint64_t lolen = len;
   ctx->total[TOTAL128_low] += lolen;
-  ctx->total[TOTAL128_high] += ((len >> 63 >> 1)
+  ctx->total[TOTAL128_high] += ((len >> 31 >> 31 >> 2)
                                + (ctx->total[TOTAL128_low] < lolen));
 #endif