Piotr Caban : msasn1: Fix buffer allocations.
Alexandre Julliard
julliard at winehq.org
Tue Nov 10 13:46:21 CST 2020
Module: wine
Branch: stable
Commit: cc8142f91a1c2bf315162648af6750df83f72857
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cc8142f91a1c2bf315162648af6750df83f72857
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Sep 18 14:30:23 2020 +0200
msasn1: Fix buffer allocations.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit d101fdb4499e174498c6378d1e47950113795009)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/msasn1/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msasn1/main.c b/dlls/msasn1/main.c
index d1513629057..fc867e7b815 100644
--- a/dlls/msasn1/main.c
+++ b/dlls/msasn1/main.c
@@ -56,7 +56,7 @@ ASN1module_t WINAPI ASN1_CreateModule(ASN1uint32_t ver, ASN1encodingrule_e rule,
if (!encoder || !decoder || !freemem || !size)
return module;
- module = heap_alloc(sizeof(module));
+ module = heap_alloc(sizeof(*module));
if (module)
{
module->nModuleName = magic;
@@ -103,7 +103,7 @@ ASN1error_e WINAPI ASN1_CreateEncoder(ASN1module_t module, ASN1encoding_t *encod
if (!module || !encoder)
return ASN1_ERR_BADARGS;
- enc = heap_alloc(sizeof(enc));
+ enc = heap_alloc(sizeof(*enc));
if (!enc)
{
return ASN1_ERR_MEMORY;
@@ -153,7 +153,7 @@ ASN1error_e WINAPI ASN1_CreateDecoder(ASN1module_t module, ASN1decoding_t *decod
if (!module || !decoder)
return ASN1_ERR_BADARGS;
- dec = heap_alloc(sizeof(dec));
+ dec = heap_alloc(sizeof(*dec));
if (!dec)
{
return ASN1_ERR_MEMORY;
More information about the wine-cvs
mailing list