diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-12-09 18:25:02 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-12-09 18:25:02 +0000 |
commit | 328a2d74dabe32ce35e879799412666feedb0eef (patch) | |
tree | 16201028a7ad1a08d623f903f7f0c4a4ea45de4b /src/radeon_bios.c | |
parent | 03961a05438e916b6725f4e547f23a84ead13c5e (diff) |
Bug #3869: Don\'t walk off the end of an array in connector detection.MODULAR_COPY
(Eric Anholt)
Diffstat (limited to 'src/radeon_bios.c')
-rw-r--r-- | src/radeon_bios.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c index 787514d6..aec55b7d 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -165,12 +165,12 @@ Bool RADEONGetConnectorInfoFromBIOS (ScrnInfoPtr pScrn) pRADEONEnt->PortInfo[crtc].DDCType = DDC_CRT2; break; default: - pRADEONEnt->PortInfo[crtc].DDCType = DDC_NONE; + pRADEONEnt->PortInfo[crtc].DDCType = DDC_NONE_DETECTED; break; } } else { - pRADEONEnt->PortInfo[crtc].DDCType = DDC_NONE; + pRADEONEnt->PortInfo[crtc].DDCType = DDC_NONE_DETECTED; } crtc++; } else { @@ -273,6 +273,12 @@ Bool RADEONGetConnectorInfoFromBIOS (ScrnInfoPtr pScrn) if ((tmp0 = RADEON_BIOS16(tmp + 0x15))) { if ((tmp1 = RADEON_BIOS8(tmp0+2) & 0x07)) { pRADEONEnt->PortInfo[0].DDCType = tmp1; + if (pRADEONEnt->PortInfo[0].DDCType > DDC_CRT2) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Unknown DDCType %d found\n", + pRADEONEnt->PortInfo[0].DDCType); + pRADEONEnt->PortInfo[0].DDCType = DDC_NONE_DETECTED; + } xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "LCD DDC Info Table found!\n"); } } |