[PATCH] appwiz.cpl: Use sha256 checksums to validate Mono/Gecko downloads.

Alexandre Julliard julliard at winehq.org
Wed May 17 11:46:38 CDT 2017


Alex Henrie <alexhenrie24 at gmail.com> writes:

> +    if(BCryptOpenAlgorithmProvider(&alg, BCRYPT_SHA256_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0))
> +        goto end;
> +    if(BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0))
> +        goto end;
> +    if(BCryptHashData(hash, (UCHAR *)file_map, size, 0))
> +        goto end;
> +    if(BCryptFinishHash(hash, sha, sizeof(sha), 0))
> +        goto end;
>  
>      UnmapViewOfFile(file_map);

You are leaking file_map on error.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list