mirror of
https://github.com/reactos/wine.git
synced 2025-02-27 00:08:18 +00:00
wintrust: Fix encoding OIDs with only two components.
This commit is contained in:
parent
84d9b2c07b
commit
ae133b808f
@ -532,7 +532,7 @@ static BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType,
|
||||
const char *ptr;
|
||||
int val1, val2;
|
||||
|
||||
if (sscanf(pszObjId, "%d.%d.%n", &val1, &val2, &firstPos) != 2)
|
||||
if (sscanf(pszObjId, "%d.%d%n", &val1, &val2, &firstPos) != 2)
|
||||
{
|
||||
SetLastError(CRYPT_E_ASN1_ERROR);
|
||||
return FALSE;
|
||||
@ -540,6 +540,11 @@ static BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType,
|
||||
bytesNeeded++;
|
||||
firstByte = val1 * 40 + val2;
|
||||
ptr = pszObjId + firstPos;
|
||||
if (*ptr == '.')
|
||||
{
|
||||
ptr++;
|
||||
firstPos++;
|
||||
}
|
||||
while (ret && *ptr)
|
||||
{
|
||||
int pos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user