]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
sha512_process_bytes: fix a bug in processing a buffer where length&64 != 0
authorJ. Scott Edwards <qrw.software@gmail.com>
Sat, 15 Mar 2008 11:25:08 +0000 (12:25 +0100)
committerJim Meyering <meyering@redhat.com>
Sun, 16 Mar 2008 18:04:24 +0000 (19:04 +0100)
* gl/lib/sha512.c (sha512_process_bytes): s/63/127/.

gl/lib/sha512.c

index e0109f80fafddeba6c237c658fa023a189582efb..4a41cb06131183720ec2799f36627515e4dbe907 100644 (file)
@@ -345,7 +345,7 @@ sha512_process_bytes (const void *buffer, size_t len, struct sha512_ctx *ctx)
 
       if (ctx->buflen > 128)
        {
-         sha512_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
+         sha512_process_block (ctx->buffer, ctx->buflen & ~127, ctx);
 
          ctx->buflen &= 127;
          /* The regions in the following copy operation cannot overlap.  */