(I think this is right? realLenBytes is skipped so what's left should be realDataLen bytes? and bytesNeeded also uses realDataLen, not dataLen).
From: Yuxuan Shui yshui@codeweavers.com
--- dlls/wintrust/asn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wintrust/asn.c b/dlls/wintrust/asn.c index f6c4086b508..152ff5a2fbf 100644 --- a/dlls/wintrust/asn.c +++ b/dlls/wintrust/asn.c @@ -1347,7 +1347,7 @@ static BOOL CRYPT_AsnDecodeSPCLinkInternal(DWORD dwCertEncodingType, const BYTE *ptr = pbEncoded + 2 + lenBytes + realLenBytes;
link->dwLinkChoice = SPC_FILE_LINK_CHOICE; - for (i = 0; i < dataLen / sizeof(WCHAR); i++) + for (i = 0; i < realDataLen / sizeof(WCHAR); i++) link->pwszFile[i] = hton16(*(const WORD *)(ptr + i * sizeof(WCHAR))); link->pwszFile[realDataLen / sizeof(WCHAR)] = '\0';