From: Roland McGrath Date: Wed, 15 Aug 2012 20:59:59 +0000 (-0700) Subject: Fix last sha512.c change to avoid compiler warning. X-Git-Tag: upstream/2.30~10432 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd924cd7cc3ef8c9da103d883dd784815e388976;p=external%2Fglibc.git Fix last sha512.c change to avoid compiler warning. --- diff --git a/ChangeLog b/ChangeLog index 41aacc8..66a0b71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-08-15 Roland McGrath + + * crypt/sha512.c (sha512_process_block) [!USE_TOTAL128]: Avoid + shifting LEN more than 31 bits at once. + 2012-08-15 Liubov Dmitrieva [BZ #14195] diff --git a/crypt/sha512.c b/crypt/sha512.c index bec7bb3..0675c94 100644 --- a/crypt/sha512.c +++ b/crypt/sha512.c @@ -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