xserver: Branch 'server-1.4-branch' - 2 commits
Daniel Stone
daniels at kemper.freedesktop.org
Wed Dec 12 14:01:48 PST 2007
hw/xfree86/modes/xf86EdidModes.c | 6 ++++++
hw/xfree86/xaa/xaaGC.c | 9 +++++----
2 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 41f735fbe02f59bc7bcca335c6e743c72c2fc44c
Author: Hong Liu <hong.liu at intel.com>
Date: Tue Sep 4 08:46:46 2007 +0100
bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff
This patch should fix bug 8080.
(cherry picked from commit 9adea807038b64292403ede982075fe1dcfd4c9a)
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c
index f3434c9..b3dc83a 100644
--- a/hw/xfree86/xaa/xaaGC.c
+++ b/hw/xfree86/xaa/xaaGC.c
@@ -80,10 +80,11 @@ XAAValidateGC(
}
if(pGC->depth != 32) {
- if(pGC->bgPixel == -1) /* -1 is reserved for transparency */
- pGC->bgPixel = 0x7fffffff;
- if(pGC->fgPixel == -1) /* -1 is reserved for transparency */
- pGC->fgPixel = 0x7fffffff;
+ /* 0xffffffff is reserved for transparency */
+ if(pGC->bgPixel == 0xffffffff)
+ pGC->bgPixel = 0x7fffffff;
+ if(pGC->fgPixel == 0xffffffff)
+ pGC->fgPixel = 0x7fffffff;
}
if((pDraw->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDraw)){
commit f4bcb53e86bb103b6bcf8a3a170a36137c34d272
Author: Hong Liu <hong.liu at intel.com>
Date: Wed Dec 5 17:48:28 2007 +0100
Bug 13308: Verify and reject obviously broken modes.
(cherry picked from commit c6cfcd408df3e44d0094946c0a7d2fa944b4d2d1)
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 8b5e69d..e2ae665 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -239,6 +239,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width;
Mode->VTotal = timing->v_active + timing->v_blanking;
+ /* perform basic check on the detail timing */
+ if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) {
+ xfree(Mode);
+ return NULL;
+ }
+
xf86SetModeDefaultName(Mode);
/* We ignore h/v_size and h/v_border for now. */
More information about the xorg-commit
mailing list