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

cryptui: Use add_usage_to_oid correctly.

Spotted by Marcus Meissner and Coverity.
parent b8f072e9
......@@ -295,7 +295,7 @@ static CERT_ENHKEY_USAGE *convert_usages_str_to_usage(LPSTR usageStr)
{
if (comma)
*comma = 0;
add_oid_to_usage(usage, ptr);
usage = add_oid_to_usage(usage, ptr);
}
}
return usage;
......@@ -323,7 +323,7 @@ static CERT_ENHKEY_USAGE *create_advanced_filter(void)
{
PCCRYPT_OID_INFO *ptr;
for (ptr = usages; *ptr; ptr++)
for (ptr = usages; advancedUsage && *ptr; ptr++)
{
DWORD i;
BOOL disabled = FALSE;
......@@ -334,7 +334,7 @@ static CERT_ENHKEY_USAGE *create_advanced_filter(void)
(*ptr)->pszOID))
disabled = TRUE;
if (!disabled)
add_oid_to_usage(advancedUsage,
advancedUsage = add_oid_to_usage(advancedUsage,
(LPSTR)(*ptr)->pszOID);
}
/* The individual strings are pointers to disabledUsagesStr,
......
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