Commit e87dc9c5 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Simplify CRYPT_AsnDecodeDistPointName.

parent 26bfd028
...@@ -4931,15 +4931,10 @@ static BOOL CRYPT_AsnDecodeDistPointName(const BYTE *pbEncoded, ...@@ -4931,15 +4931,10 @@ static BOOL CRYPT_AsnDecodeDistPointName(const BYTE *pbEncoded,
if (dataLen) if (dataLen)
{ {
ret = CRYPT_AsnDecodeArray(&arrayDesc, ret = CRYPT_AsnDecodeArrayNoAlloc(&arrayDesc,
pbEncoded + 1 + lenBytes, cbEncoded - 1 - lenBytes, pbEncoded + 1 + lenBytes, cbEncoded - 1 - lenBytes,
0, NULL, NULL, &nameLen, NULL, NULL); NULL, NULL, &nameLen, NULL);
/* The CERT_ALT_NAME_INFO's size is included by CRYPT_AsnDecodeArray bytesNeeded = sizeof(CRL_DIST_POINT_NAME) + nameLen;
* as the sizeof(struct GenericArray), so don't include it in the
* total bytes needed.
*/
bytesNeeded = sizeof(CRL_DIST_POINT_NAME) + nameLen -
sizeof(CERT_ALT_NAME_INFO);
} }
else else
bytesNeeded = sizeof(CRL_DIST_POINT_NAME); bytesNeeded = sizeof(CRL_DIST_POINT_NAME);
...@@ -4961,10 +4956,10 @@ static BOOL CRYPT_AsnDecodeDistPointName(const BYTE *pbEncoded, ...@@ -4961,10 +4956,10 @@ static BOOL CRYPT_AsnDecodeDistPointName(const BYTE *pbEncoded,
if (dataLen) if (dataLen)
{ {
name->dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; name->dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME;
ret = CRYPT_AsnDecodeArray(&arrayDesc, ret = CRYPT_AsnDecodeArrayNoAlloc(&arrayDesc,
pbEncoded + 1 + lenBytes, cbEncoded - 1 - lenBytes, pbEncoded + 1 + lenBytes, cbEncoded - 1 - lenBytes,
0, NULL, &name->u.FullName, &nameLen, NULL, &name->u.FullName.cAltEntry, name->u.FullName.rgAltEntry,
name->u.FullName.rgAltEntry); &nameLen, NULL);
} }
else else
name->dwDistPointNameChoice = CRL_DIST_POINT_NO_NAME; name->dwDistPointNameChoice = CRL_DIST_POINT_NO_NAME;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment