filevercmp: handle simple~ and numbered.~3~ backup suffixes
[pspp] / lib / md5.c
index ce02a26211e6ca607de5da8433834cdfd791d8e5..2213dc1206581b936641647c1826cb8d6328bc59 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -230,9 +230,9 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
 
       if (ctx->buflen > 64)
        {
-         ctx->buflen &= 63;
-         md5_process_block (ctx->buffer, ctx->buflen, ctx);
+         md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
 
+         ctx->buflen &= 63;
          /* The regions in the following copy operation cannot overlap.  */
          memcpy (ctx->buffer,
                  &((char *) ctx->buffer)[(left_over + add) & ~63],