1. Changed fixed-size buffer to dynamic allocation for link_name to
prevent buffer overflow
2. Added proper memory cleanup with HeapFree in all error paths
3. Fixed potential null pointer dereference when device is NULL
4. Improved error handling by checking memory allocation success
The original code used a fixed-size buffer (15 chars) which could
overflow with long device names. The new version dynamically allocates
memory based on actual device name length, includes proper cleanup, and
handles edge cases better.
Signed-off-by: Wei Xie <xiewei(a)uniontech.com>
--
v2: fix: add missing DefineDosDeviceW test cases
kernelbase: fix memory allocation in DefineDosDeviceW
https://gitlab.winehq.org/wine/wine/-/merge_requests/8041
--
v2: win32u: Read window dpi_context from the shared memory.
win32u: Pass id and offset separately to find_shared_session_object.
server: Move window dpi_context to the shared memory.
server: Allocate shared memory objects for windows.
server: Fix shared object offset when additional blocks are allocated.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8061
This MR modifies winegstreamer to match Windows behaviour in that:
1. the video decoders will output the PTS and duration of the input sample (if provided); and
2. the WMV decoder will set any value not provided to zero
It also adds support for supplying a DTS value to the MFTs.
I've marked this as draft as it fixes the tests in MR !7563 (in addition to fixing some existing `test_wmv_decoder` tests). Also, as demonstrated in MR !7569, our demuxers output different timestamps to Windows. This change will result in those different timestamps being forwarded from the decoder. So we may also want to address that difference prior to accepting this MR.
--
v10: winegstreamer: Fixup negative input timestamps.
winegstreamer: Don't generate sample timestamps for the WMV decoder.
winegstreamer: Avoid rounding errors when generating timestamps.
winegstreamer: Use provided PTS and duration in video_decoder.
mf/tests: Add negative timestamp tests for h264.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7623
Windows uses a smaller alignment than gstreamer for some formats, for
example NV12. This means we cannot use MFCalculateImageSize() to get the
output sample size. Commit 7b79e3a87b1e switched to calling it instead of
GetOutputStreamInfo() to fix some game bugs.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8034
Failing gitlab CI examples are:
- [job #157583](https://gitlab.winehq.org/wine/wine/-/jobs/157583#L2282)
- [job #157314](https://gitlab.winehq.org/wine/wine/-/jobs/157314#L1957)
- [job #157131](https://gitlab.winehq.org/wine/wine/-/jobs/157131#L2052)
- [job #157068](https://gitlab.winehq.org/wine/wine/-/jobs/157068#L1955)
- [job #157032](https://gitlab.winehq.org/wine/wine/-/jobs/157032#L2150)
- [job #156785](https://gitlab.winehq.org/wine/wine/-/jobs/156785#L2112)
- [job #156713](https://gitlab.winehq.org/wine/wine/-/jobs/156713#L2048)
- [job 156677#](https://gitlab.winehq.org/wine/wine/-/jobs/156677#L2030)
So happens just a few times per day.
The value -1073741510 in `timeout.exe:timeout:06b4 done (-1073741510) in 5s 177B` equals to 0xC000013A, STATUS_CONTROL_C_EXIT. Therefore the assumption the ctrl-c from the test reaches sometimes the parent process.
--
v6: timeout/tests: Move the ctrl-c tests below an intermediate process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8051
First push with null patch, to get current gitlab runner result in [pipeline #42287](https://gitlab.winehq.org/bernhardu/wine/-/pipelines/42287).
Unfortunately, did not fail this time.
Older examples are:
- [job #157583](https://gitlab.winehq.org/wine/wine/-/jobs/157583#L2282)
- [job #157314](https://gitlab.winehq.org/wine/wine/-/jobs/157314#L1957)
- [job #157131](https://gitlab.winehq.org/wine/wine/-/jobs/157131#L2052)
- [job #157068](https://gitlab.winehq.org/wine/wine/-/jobs/157068#L1955)
- [job #157032](https://gitlab.winehq.org/wine/wine/-/jobs/157032#L2150)
- [job #156785](https://gitlab.winehq.org/wine/wine/-/jobs/156785#L2112)
- [job #156713](https://gitlab.winehq.org/wine/wine/-/jobs/156713#L2048)
- [job 156677#](https://gitlab.winehq.org/wine/wine/-/jobs/156677#L2030)
So happens just a few times per day.
The value -1073741510 in `timeout.exe:timeout:06b4 done (-1073741510) in 5s 177B` equals to 0xC000013A, STATUS_CONTROL_C_EXIT. Therefore the assumption the ctrl-c from the test reaches sometimes the parent process.
With the patch activated, this [pipeline #42291](https://gitlab.winehq.org/bernhardu/wine/-/pipelines/42291).
--
v5: timeout/tests: Move the ctrl-c tests below an intermediate process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8051