Commit a7efc770 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

bcrypt: Use SecureZeroMemory() to zero magic values before free.

The compiler may optimize out the assignment before free and then second free on the bcrypt handle finds magic values in the freed memory.
parent 30398d6f
......@@ -397,7 +397,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, const WC
static void destroy_object( struct object *obj )
{
obj->magic = 0;
SecureZeroMemory( &obj->magic, sizeof(obj->magic) );
free( obj );
}
......
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