Microsoft's documentation says:
> The `vsnprintf` function always writes a null terminator, even if it truncates the output. When you use `_vsnprintf` and `_vsnwprintf`, the buffer is null-terminated only if there's room at the end (that is, if the number of characters to write is less than count).
For `_UCRT` and `_MSVCR_VER >= 140`, `vsnprintf` calls `__stdio_common_vsprintf` with `_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR`, and everything works, a null byte is appended, everything is fine.
If not, `vsnprintf` calls `_vsnprintf` directly and no null byte will be added if the buffer is not big enough. This happens in, for example, kernel32. And this breaks `wine_dbg_vsprintf`, which passes result of `vsnprintf` to `strlen` and goes out-of-bound.
In msvcrt.spec, we also have `vsnprintf` as an alias of `_vsnprintf`, I didn't touch that since I don't know if that's deliberate. But this alias _is_ used (by e.g. winecrt0, i think?), if this one is also wrong then it might break other things.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8256
Used by Diablo IV's screen reader.
--
v4: sapi/xml: Add a stub implementation using libxml2.
sapi/tts: Support XML-related flags in ISpVoice::Speak.
sapi/tests: Add some SSML tests in tts.
sapi/tests: Introduce simulate_output option in tts.
sapi/tests: Copy SPVTEXTFRAG list into a contiguous array.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8390
structuredquery is required to support AQS filters in Windows.Devices.Enumeration's `FindAllAsync` methods, this adds a basic set of stubs to get the ball rolling.
--
v11: dlls/structuredquery: Add stubs for IQueryParserManager.
dlls/structuredquery/tests: Add conformance tests for IQueryParserManager.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6788
There seem to be a few special cases here, of which the main one is `DEVPKEY_DeviceInterface_Enabled`. This property key does not have an actual registry entry, but the value read by `SetupDiGetDeviceInterfacePropertyW` corresponds to whether the interface is enabled/linked or not. Likewise, the key cannot be written to either, with `SetupDiSetDeviceInterfacePropertyW` returning `ERROR_ACCESS DENIED`.
--
v7: ntoskrnl.exe/test: Add tests for SetupDiGetDeviceInterfacePropertyW with enabled interfaces.
setupapi: Implement SetupDiGetDeviceInterfacePropertyW.
setupapi: Implement SetupDiSetDeviceInterfacePropertyW.
setupapi/tests: Add tests for SetupDi{Set,Get}DeviceInterfacePropertyW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8379
check_json_ uses wcslen on the passed json string, which is no good for
non-null terminated ones. It should have a length parameter.
* * *
(made a draft since i am not sure what this test is meant to test, see comment.)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8345
On Mon Jun 23 10:22:32 2025 +0000, Conor McCarthy wrote:
> IIRC it was improved by handling MF_E_SHUTDOWN returned by
> BeginGetEvent(), but could still get stuck waiting for an event from the
> source which can't be received because having the event queue call
> Invoke() after shutdown is not Windows behaviour (but did fix the issue
> in testing).
Robustness against unexpected shutdown in Windows has something to do with the source, because when I tested it with a custom source, the Windows media session would hang.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8402#note_107612
On Mon Jun 23 10:20:43 2025 +0000, Nikolay Sivov wrote:
> @rbernon we don't need to remove it in this MR, but other comments apply regardless.
IIRC it was improved by handling MF_E_SHUTDOWN returned by BeginGetEvent(), but could still get stuck waiting for an event from the source which can't be received because having the event queue call Invoke() after shutdown is not Windows behaviour (but did fix the issue in testing).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8402#note_107611