On Thu Jul 13 16:37:28 2023 +0000, Jeffrey Smith wrote:
> Compilers can (and at least some do) treat an enumeration as a _signed_
> integer. For the comparison to work as desired you'll want to cast
> `InformationClass` to an unsigned type. I think `size_t` would be appropriate.
There's no need for a cast though. `ARRAY_SIZE` is already `size_t` (because it's implemented with `sizeof`), and a comparison between a signed integer and an unsigned integer with at least as many bits is always promoted to unsigned.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38928
Fall through in create_link and allow SHGetFolderPathAndSubDirW to
create an empty folder in place if the alternatives are not available.
Creating a link back to $HOME makes a recursive directory structure,
which results in crashes in programs that naively search %USERPROFILE%
(e.g. Quicken).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3325
Jeffrey Smith (@whydoubt) commented about dlls/advapi32/lsa.c:
> + "PolicyReplicaSourceInformation",
> + "PolicyDefaultQuotaInformation",
> + "PolicyModificationInformation",
> + "PolicyAuditFullSetInformation",
> + "PolicyAuditFullQueryInformation",
> + "PolicyDnsDomainInformation",
> + "PolicyDnsDomainInformationInt",
> + "PolicyLocalAccountDomainInformation",
> + "PolicyMachineAccountInformation",
> + "PolicyMachineAccountInformation2",
> + "PolicyLastEntry"
> +};
> +
> +static LPCSTR debugstr_InformationClass(IN POLICY_INFORMATION_CLASS InformationClass)
> +{
> + if (InformationClass >= ARRAY_SIZE(string_InformationClass))
Compilers can (and at least some do) treat an enumeration as a _signed_ integer. For the comparison to work as desired you'll want to cast `InformationClass` to an unsigned type. I think `size_t` would be appropriate.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38926
In HttpSendRequestW and HttpSendRequestExW, if the header pointer is not
null but the length parameter is 0, the header length should be derived
from the string length instead.
In HttpSendRequestA and HttpSendRequestExA, on the same scenario, the
function should fail instead.
--
v5: wininet: Handle http headers correctly when length is 0
https://gitlab.winehq.org/wine/wine/-/merge_requests/3269