cryptui: Use add_usage_to_oid correctly.
Spotted by Marcus Meissner and Coverity.
This commit is contained in:
parent
b8f072e910
commit
ba7eebfd62
|
@ -295,7 +295,7 @@ static CERT_ENHKEY_USAGE *convert_usages_str_to_usage(LPSTR usageStr)
|
||||||
{
|
{
|
||||||
if (comma)
|
if (comma)
|
||||||
*comma = 0;
|
*comma = 0;
|
||||||
add_oid_to_usage(usage, ptr);
|
usage = add_oid_to_usage(usage, ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return usage;
|
return usage;
|
||||||
|
@ -323,7 +323,7 @@ static CERT_ENHKEY_USAGE *create_advanced_filter(void)
|
||||||
{
|
{
|
||||||
PCCRYPT_OID_INFO *ptr;
|
PCCRYPT_OID_INFO *ptr;
|
||||||
|
|
||||||
for (ptr = usages; *ptr; ptr++)
|
for (ptr = usages; advancedUsage && *ptr; ptr++)
|
||||||
{
|
{
|
||||||
DWORD i;
|
DWORD i;
|
||||||
BOOL disabled = FALSE;
|
BOOL disabled = FALSE;
|
||||||
|
@ -334,7 +334,7 @@ static CERT_ENHKEY_USAGE *create_advanced_filter(void)
|
||||||
(*ptr)->pszOID))
|
(*ptr)->pszOID))
|
||||||
disabled = TRUE;
|
disabled = TRUE;
|
||||||
if (!disabled)
|
if (!disabled)
|
||||||
add_oid_to_usage(advancedUsage,
|
advancedUsage = add_oid_to_usage(advancedUsage,
|
||||||
(LPSTR)(*ptr)->pszOID);
|
(LPSTR)(*ptr)->pszOID);
|
||||||
}
|
}
|
||||||
/* The individual strings are pointers to disabledUsagesStr,
|
/* The individual strings are pointers to disabledUsagesStr,
|
||||||
|
|
Loading…
Reference in New Issue