diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-08-24 23:38:25 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-08-24 23:38:25 +0000 |
commit | 2261710fe0dffd60433e3362ac12adf4db570fe5 (patch) | |
tree | c9db983652bff347abc075a0c36cd6ff2e2df09f /hw | |
parent | 55c5c6953a3a661758a42b147f9542950a62fc4d (diff) |
Fix a bug where NULL could be dereferenced during the pixmap kick-out
process by referencing the correct offscreen area. Also drive-by the
comments related to these for clarity.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/exa/exa_offscreen.c | 6 | ||||
-rw-r--r-- | hw/xfree86/exa/exaoffscreen.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/hw/xfree86/exa/exa_offscreen.c b/hw/xfree86/exa/exa_offscreen.c index dbca172c4..e55e0ac43 100644 --- a/hw/xfree86/exa/exa_offscreen.c +++ b/hw/xfree86/exa/exa_offscreen.c @@ -127,7 +127,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, if (begin->state == ExaOffscreenLocked) continue; - /* adjust size to match alignment requirement */ + /* adjust size needed to account for alignment loss for this area */ real_size = size; tmp = begin->offset % align; if (tmp) @@ -164,9 +164,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, return NULL; } - /* adjust size to match alignment requirement */ + /* adjust size needed to account for alignment loss for this area */ real_size = size; - tmp = begin->offset % align; + tmp = area->offset % align; if (tmp) real_size += (align - tmp); diff --git a/hw/xfree86/exa/exaoffscreen.c b/hw/xfree86/exa/exaoffscreen.c index dbca172c4..e55e0ac43 100644 --- a/hw/xfree86/exa/exaoffscreen.c +++ b/hw/xfree86/exa/exaoffscreen.c @@ -127,7 +127,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, if (begin->state == ExaOffscreenLocked) continue; - /* adjust size to match alignment requirement */ + /* adjust size needed to account for alignment loss for this area */ real_size = size; tmp = begin->offset % align; if (tmp) @@ -164,9 +164,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, return NULL; } - /* adjust size to match alignment requirement */ + /* adjust size needed to account for alignment loss for this area */ real_size = size; - tmp = begin->offset % align; + tmp = area->offset % align; if (tmp) real_size += (align - tmp); |