cryptui: Use add_usage_to_oid correctly.

Spotted by Marcus Meissner and Coverity.
This commit is contained in:
Juan Lang 2013-02-11 12:51:04 -08:00 committed by Alexandre Julliard
parent b8f072e910
commit ba7eebfd62

View file

@ -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,