crypt32: Initialize bytesNeeded (Coverity).
This commit is contained in:
parent
aba4619dfe
commit
9a51a9926a
|
@ -1912,7 +1912,7 @@ static BOOL WINAPI CRYPT_AsnDecodeName(DWORD dwCertEncodingType,
|
|||
sizeof(CERT_NAME_INFO),
|
||||
CRYPT_AsnDecodeRdn, sizeof(CERT_RDN), TRUE,
|
||||
offsetof(CERT_RDN, rgRDNAttr) };
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, NULL, &bytesNeeded,
|
||||
|
@ -2009,7 +2009,7 @@ static BOOL WINAPI CRYPT_AsnDecodeUnicodeName(DWORD dwCertEncodingType,
|
|||
sizeof(CERT_NAME_INFO),
|
||||
CRYPT_AsnDecodeUnicodeRdn, sizeof(CERT_RDN), TRUE,
|
||||
offsetof(CERT_RDN, rgRDNAttr) };
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, NULL, &bytesNeeded,
|
||||
|
@ -2455,7 +2455,7 @@ static BOOL CRYPT_AsnDecodeNoticeReference(const BYTE *pbEncoded,
|
|||
FALSE, TRUE, offsetof(CERT_POLICY_QUALIFIER_NOTICE_REFERENCE,
|
||||
rgNoticeNumbers), 0 },
|
||||
};
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, pvStructInfo ? *pcbStructInfo : 0);
|
||||
|
@ -2672,7 +2672,7 @@ static BOOL WINAPI CRYPT_AsnDecodePolicyQualifierUserNotice(
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
ret = CRYPT_AsnDecodePolicyQualifierUserNoticeInternal(pbEncoded,
|
||||
cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded,
|
||||
|
@ -2766,7 +2766,7 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttribute(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
ret = CRYPT_AsnDecodePKCSAttributeInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL);
|
||||
|
@ -2907,7 +2907,7 @@ static BOOL WINAPI CRYPT_AsnDecodePubKeyInfo(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if ((ret = CRYPT_AsnDecodePubKeyInfoInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL)))
|
||||
|
@ -3409,7 +3409,7 @@ static BOOL WINAPI CRYPT_AsnDecodeAltName(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if ((ret = CRYPT_AsnDecodeAltNameInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL)))
|
||||
|
@ -3997,7 +3997,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOctets(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if (!cbEncoded)
|
||||
{
|
||||
|
@ -4106,7 +4106,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBits(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if (!cbEncoded)
|
||||
{
|
||||
|
@ -4200,7 +4200,7 @@ static BOOL WINAPI CRYPT_AsnDecodeInt(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if (!cbEncoded)
|
||||
{
|
||||
|
@ -4293,7 +4293,7 @@ static BOOL WINAPI CRYPT_AsnDecodeInteger(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if (pbEncoded[0] != ASN_INTEGER)
|
||||
{
|
||||
|
@ -4401,7 +4401,7 @@ static BOOL WINAPI CRYPT_AsnDecodeUnsignedInteger(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
if ((ret = CRYPT_AsnDecodeUnsignedIntegerInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_ENCODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL)))
|
||||
|
@ -4657,7 +4657,7 @@ static BOOL WINAPI CRYPT_AsnDecodeUtcTime(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
ret = CRYPT_AsnDecodeUtcTimeInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL);
|
||||
|
@ -4788,7 +4788,7 @@ static BOOL WINAPI CRYPT_AsnDecodeChoiceOfTime(DWORD dwCertEncodingType,
|
|||
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded;
|
||||
DWORD bytesNeeded = 0;
|
||||
|
||||
ret = CRYPT_AsnDecodeChoiceOfTimeInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL);
|
||||
|
@ -4933,7 +4933,7 @@ static BOOL CRYPT_AsnDecodeDistPointName(const BYTE *pbEncoded,
|
|||
|
||||
if (pbEncoded[0] == (ASN_CONTEXT | ASN_CONSTRUCTOR | 0))
|
||||
{
|
||||
DWORD bytesNeeded, dataLen;
|
||||
DWORD bytesNeeded = 0, dataLen;
|
||||
|
||||
if ((ret = CRYPT_GetLen(pbEncoded, cbEncoded, &dataLen)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue