Bug #4859: Don't segfault on bad DDC read. (Tony Houghton)
This commit is contained in:
parent
21f7d03dbc
commit
de95d8ee19
|
@ -216,11 +216,14 @@ xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
ErrorF("Cannot interpret EDID block\n");
|
ErrorF("Cannot interpret EDID block\n");
|
||||||
ErrorF("Sections to follow: %i\n",tmp->no_sections);
|
else
|
||||||
|
ErrorF("Sections to follow: %i\n",tmp->no_sections);
|
||||||
#endif
|
#endif
|
||||||
VDIF_Block =
|
if (tmp) {
|
||||||
VDIFRead(scrnIndex, pBus, EDID1_LEN * (tmp->no_sections + 1));
|
VDIF_Block =
|
||||||
tmp->vdif = xf86InterpretVdif(VDIF_Block);
|
VDIFRead(scrnIndex, pBus, EDID1_LEN * (tmp->no_sections + 1));
|
||||||
|
tmp->vdif = xf86InterpretVdif(VDIF_Block);
|
||||||
|
}
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue