[PATCH] Bug #22804: Reject out of bounds XGetImage requests
Aaron Plattner
aplattner at nvidia.com
Tue Jul 21 22:28:49 PDT 2009
On Tue, Jul 21, 2009 at 10:08:51PM -0700, Keith Packard wrote:
> On Fri, 2009-07-17 at 10:51 -0700, Aaron Plattner wrote:
> > The XGetImage man page states:
> >
> > If the drawable is a window, the window must be viewable, and it must be the
> > case that if there were no inferiors or overlapping windows, the specified
> > rectangle of the window would be fully visible on the screen and wholly
> > contained within the outside edges of the window, or a BadMatch error
> > results. Note that the borders of the window can be included and read with
> > this request.
>
> How about leaving the semantics as similar as we can; clip GetImage to
> the pixmap containing the window (GetWindowPixmap)? That means that in
> the absence of compositing, you get the same result as before.
>
> 'visible on the screen' could easily be interpreted to mean 'contained
> within the frame buffer holding the window' here, and clearly was in the
> existing implementation.
Thanks, Keith.
I did that first, but then changed my mind because then you get
BadMatch if the parent window is redirected and Success if it's not,
which seems weird and wrong. I'll resurrect that version of the patch
and send it out tomorrow.
Is it worth updating the man page too, to describe the interaction
with Composite, or is the language in the man page set in stone?
-- Aaron
More information about the xorg-devel
mailing list