Pierre Schweitzer pierre@reactos.org writes:
+static DWORD _enumeratorRememberedW(PWNetEnumerator enumerator, DWORD* user_count,
void* user_buffer, DWORD* user_size)
+{
- HKEY registry, connection;
- WCHAR buffer[255];
- DWORD index, ret, type, len, size, provider_size, remote_size, full_size, total_count, size_left = *user_size;
- NETRESOURCEW * net_buffer = user_buffer;
- WCHAR * str;
- if (!enumerator)
return WN_BAD_POINTER;
- if (enumerator->enumType != WNET_ENUMERATOR_TYPE_REMEMBERED)
return WN_BAD_VALUE;
- if (!user_count || !user_buffer || !user_size)
return WN_BAD_POINTER;
- if (!providerTable)
return WN_NO_NETWORK;
Please don't add unnecessary checks. enumerator can't be null, the type has already been checked, and at least user_size has been dereferenced already. You should only add checks for things that a real app is triggering.