[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH] msasn1: Add stub for ASN1_Decode function
From: Vijay Kiran Kamuju <infyquest () gmail ! com>
Date: 2020-05-31 8:56:38
Message-ID: CACfa+KLsD9G9hU5CjEpWZ3qdTPSAmOuKcLMH_zxCGhSfDtMP9w () mail ! gmail ! com
[Download RAW message or body]
ASN1decoding_t and ASN1encoding_t are implemented as linked lists.
Current implementation does not properly emulate the linked list, as
we need to identify where the next link pointers are stored.
This patch adds a stub for ASN1_Decode function so that second crash
related to the bug #38020 can be avoided and close the bug.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38020
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
["0001-msasn1-Add-stub-for-ASN1_Decode-function.patch" (text/x-patch)]
From 38e39ca07269dda514b6a9cb01207c435d4ae33c Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Sun, 31 May 2020 10:44:23 +0200
Subject: [PATCH] msasn1: Add stub for ASN1_Decode function
ASN1decoding_t and ASN1encoding_t are implemented as linked lists.
Current implementation does not properly emulate the linked list, as
we need to identify where the next link pointers are stored.
This patch adds a stub for ASN1_Decode function so that second crash
related to the bug #38020 can be avoided and close the bug.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38020
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/msasn1/main.c | 18 ++++++++++++++++++
dlls/msasn1/msasn1.spec | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/msasn1/main.c b/dlls/msasn1/main.c
index c96be7d07d..d151362905 100644
--- a/dlls/msasn1/main.c
+++ b/dlls/msasn1/main.c
@@ -190,3 +190,21 @@ void WINAPI ASN1_CloseDecoder(ASN1decoding_t decoder)
{
FIXME("(%p): Stub!\n", decoder);
}
+
+ASN1error_e WINAPI ASN1_Decode(ASN1decoding_t decoder, void **outdata, ASN1uint32_t pdunum,
+ ASN1uint32_t flags, ASN1octet_t *buf, ASN1uint32_t bufsize)
+{
+ FIXME("(%p %p %u %08x %p %u): Stub!\n", decoder, outdata, pdunum, flags, buf, bufsize);
+
+ if (!decoder)
+ return ASN1_ERR_BADARGS;
+
+ if (!buf || !bufsize)
+ {
+ decoder->err = ASN1_ERR_BADARGS;
+ return ASN1_ERR_BADARGS;
+ }
+
+ decoder->err = ASN1_ERR_BADPDU;
+ return ASN1_ERR_BADPDU;
+}
diff --git a/dlls/msasn1/msasn1.spec b/dlls/msasn1/msasn1.spec
index f98a4a62d7..ab823b03c3 100644
--- a/dlls/msasn1/msasn1.spec
+++ b/dlls/msasn1/msasn1.spec
@@ -224,7 +224,7 @@
@ stub ASN1_CreateDecoderEx
@ stdcall ASN1_CreateEncoder(ptr ptr ptr long ptr)
@ stdcall ASN1_CreateModule(long long long long ptr ptr ptr ptr long)
-@ stub ASN1_Decode
+@ stdcall ASN1_Decode(ptr ptr long long ptr long)
@ stub ASN1_Encode
@ stub ASN1_FreeDecoded
@ stub ASN1_FreeEncoded
--
2.26.2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic