Skip to content

setupapi: Fix uninitialized len in is_device_instance_linked, use RegGetValueW, and check for refstr#309

Open
xzn wants to merge 2440 commits intoValveSoftware:bleeding-edgefrom
xzn:devinstlinked
Open

setupapi: Fix uninitialized len in is_device_instance_linked, use RegGetValueW, and check for refstr#309
xzn wants to merge 2440 commits intoValveSoftware:bleeding-edgefrom
xzn:devinstlinked

Conversation

@xzn
Copy link
Copy Markdown

@xzn xzn commented Jan 6, 2026

Upstream wine bug: N/A. is_device_instance_linked in devinst.c is Valve's wine only it seems.

This pr does three changes:

  1. Fix uninitialize len before the first RegGetValueW call (which was RegQueryValueExW before the change).
  2. Set len correctly for RegGetValueW/RegQueryValueExW, both of which expect len to be size in bytes instead of count in chars (the case for RegEnumKeyExW).
  3. Check for refstrs and return true if any of them is linked.

Paul Gofman and others added 30 commits November 19, 2025 16:04
(cherry picked from commit 1f4a3ff)

CW-Bug-Id: #24524
(cherry picked from commit 3c29dc1)

CW-Bug-Id: #24524
(cherry picked from commit 3290fc1)

CW-Bug-Id: #24524
(cherry picked from commit 0550f67)

CW-Bug-Id: #24524
(cherry picked from commit 5667e9f)

CW-Bug-Id: #24524
(cherry picked from commit f3b7b79)

CW-Bug-Id: #24524
…. (ASan).

(cherry picked from commit d6b5250)

CW-Bug-Id: #24524
(cherry picked from commit aa54ff4)

CW-Bug-Id: #24524
(cherry picked from commit 09bcbc1)

CW-Bug-Id: #24524
Changes by Paul Gofman to the original patch:
- check for too short device path;
- allocate strings dynamically;
- set last error accordingly.

(cherry picked from commit 888d5f1)

CW-Bug-Id: #24524
(cherry picked from commit d4f2921)

CW-Bug-Id: #24524
Followup of d4f2921.

(cherry picked from commit 16d50f7)

CW-Bug-Id: #24524
(cherry picked from commit 7cbc33f)

CW-Bug-Id: #24524
(cherry picked from commit 7fa6aea)

CW-Bug-Id: #24524
(cherry picked from commit 444b193)

CW-Bug-Id: #24524
(cherry picked from commit f51960c)

CW-Bug-Id: #24524
…eInterfacePropertyW.

(cherry picked from commit c047079)

CW-Bug-Id: #24524
…EVPKEY_{DeviceInterface_ClassGuid, Device_InstanceId}.

(cherry picked from commit bfb29c3)

CW-Bug-Id: #24524
…en the Properties subkey for the interface doesn't exist.

(cherry picked from commit 07d533a)

CW-Bug-Id: #24524
(cherry picked from commit d365d66)

CW-Bug-Id: #24524
(cherry picked from commit 350d13a)

CW-Bug-Id: #24524
…instances.

(cherry picked from commit 8a5b235)

CW-Bug-Id: #24524
…d CM_Get_DevNode_Property_ExW.

(cherry picked from commit 5692c45)

CW-Bug-Id: #24524
…device properties.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
(cherry picked from commit 5a884a8)
CW-Bug-Id: #24524
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
(cherry picked from commit 74bca42)
CW-Bug-Id: #24524
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
(cherry picked from commit 556500e)
CW-Bug-Id: #24524
Paul Gofman and others added 29 commits December 8, 2025 19:44
…rocess( ProcessCookie ).

CW-Bug-Id: #26318
…visibility of a child window changes.

needs_client_window_clipping() returns FALSE for a top-level window if its child windows are
invisible. After a child window becomes visible, we should update the gl_drawable of the top-level
window. Otherwise, the gl_drawable might still be rendering on-screen and causes black screen or
flickering effects because the child window is not composited on top.

CW-Bug-Id: #26177
Those crash even on 32 bit on current Win11.

CW-Bug-Id: #26343
Timeline:

1. cfc9021 removes SESSION_FLAG_PENDING_COMMAND=0x40 upstream.
2. 0627acf adds SESSION_FLAG_RESTARTING=0x40 upstream.
3. 0627acf is cherry-picked as 872f12e with SESSION_FLAG_RESTARTING=0x80, because 0x40 is still occupied by SESSION_FLAG_PENDING_COMMAND.
4. cfc9021 is cherry-picked as ba6e0c3 removing SESSION_FLAG_PENDING_COMMAND, but does not change SESSION_FLAG_RESTARTING back to 0x40.

This caused a desync between upstream and proton. Ideally the cherry-picks should be reordered according to upstream order.

CW-Bug-Id: #24703
Windows seems to wait until it receives the MENewStream event(s) before
subscribing to the sink event queues.

CW-Bug-Id: #24703
FFmpeg would provide 'hvc1' instead of 'HEVC'.

CW-Bug-Id: #26327
Some custom media stream implementation do not update their current
position after reading and need to be explicitly seeked.

CW-Bug-Id: #26349
…tegration.

CW-Bug-Id: #25865
CW-Bug-Id: #26303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.