[VIDEOPRT] Workaround bug CORE-16695 (infinite loop when reading EDID on LiveCD in...
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 1 Mar 2020 09:06:18 +0000 (10:06 +0100)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 1 Mar 2020 09:12:13 +0000 (10:12 +0100)
For some reason, we don't get valid EDIDs when using LiveCD on QEMU.
We ignore them, and try to read the one of the next child.
This leads to a infinite loop and then, an out of memory error.

As it can also happen in other circonstances, stop enumeration as soon
as an invalid EDID is detected.

This breaks configurations with graphic cards with 2+ outputs, where
the first one is not plugged to a monitor, and the second one is plugged
to a monitor.

CORE-16695

win32ss/drivers/videoprt/videoprt.c

index 0c80c7f..d040652 100644 (file)
@@ -1225,6 +1225,10 @@ VideoPortEnumerateChildren(
                 {
                     /* Mark it invalid */
                     ChildExtension->EdidValid = FALSE;
+                    // FIXME: the following break workarounds CORE-16695
+                    // but prevents graphic cards to return an invalid
+                    // EDID as first child, and a valid one as second child.
+                    break;
                 }
             }
         }