Bug#675407: xserver-xorg-video-openchrome: openchrome relink against new xserver results in null pointer dereference
Hi,
the proposed patch does not work since the dereference already happens a
few lines before the located position in ViaDoubleCheckCLE266Revision().
I moved the initialization before the call and can confirm it is working.
Best regards,
Leon Winter
--- a/src/via_driver.c 2011-12-09 19:02:43.000000000 +0100
+++ b/src/via_driver.c 2012-06-04 09:22:13.492691241 +0200
@@ -996,6 +996,11 @@
#endif
}
+ hwp = VGAHWPTR(pScrn);
+
+ /* Needed with X 1.12 */
+ vgaHWSetStdFuncs(hwp);
+
if (pVia->Chipset == VIA_CLE266)
ViaDoubleCheckCLE266Revision(pScrn);
@@ -1011,8 +1016,6 @@
struct pci_device *vgaDevice = viaPciDeviceVga();
#endif
- hwp = VGAHWPTR(pScrn);
-
switch (pVia->Chipset) {
case VIA_CLE266:
#ifdef XSERVER_LIBPCIACCESS
Reply to: