Re: [PATCH v6 0/4] MR6423: Implement NtQuerySystemEnvironmentValueEx, NtQuerySystemInformation SystemBootEnvironmentInformation, GetFirmwareType, GetFirmwareEnvironmentVariable*
5 Sep
2024
5 Sep
'24
5:54 p.m.
Alfred Agrell (@Alcaro) commented about dlls/kernel32/process.c:
+ { + SetLastError(RtlNtStatusToDosError(ERROR_NOT_ENOUGH_MEMORY)); + return 0; + } + + MultiByteToWideChar(CP_ACP, 0, name, -1, wname, nsize); + + RtlInitUnicodeString(&uname, wname); + + if (!set_ntstatus( + NtQuerySystemEnvironmentValueEx(&uname, &vendor, buffer, &ret_size, attributes))) + { + ret_size = 0; + } + + RtlFreeUnicodeString(&uname); RtlInitUnicodeString doesn't allocate, it just puts the pointer in the struct. Better just just drop that variable.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6423#note_81248
546
Age (days ago)
546
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alfred Agrell (@Alcaro)