Commit b2e902b8 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

bcrypt/tests: Fix incorrect null termination.

parent ee77e178
......@@ -68,15 +68,15 @@ static void test_BCryptGetFipsAlgorithmMode(void)
ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got 0x%x\n", ret);
}
static const char *format_hash(const UCHAR *bytes, ULONG size, char *buf)
static void format_hash(const UCHAR *bytes, ULONG size, char *buf)
{
ULONG i;
buf[0] = '\0';
for (i = 0; i < size; i++)
{
buf += sprintf(buf, "%02x", bytes[i]);
sprintf(buf + i * 2, "%02x", bytes[i]);
}
buf[i * 2] = 0;
return buf;
return;
}
static void test_sha1(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment