Skip to content

Commit

Permalink
Work around incorrect function declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Aldorasi-Imprivata committed Jan 2, 2020
1 parent fc5e43d commit d0b8742
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/md4.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ static void MD4_Init(MD4_CTX *ctx)

static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
{
CryptHashData(ctx->hHash, data, (unsigned int) size, 0);
/* Old versions of mingw incorrectly mark the second parameter as non-const,
* so explicitly cast away the const to make the compiler not complain
*/
CryptHashData(ctx->hHash, (BYTE *)data, (unsigned int) size, 0);
}

static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
Expand Down

0 comments on commit d0b8742

Please sign in to comment.