Re: [XFree86] Re: XGetWindowProperty returning null prop_return but nonzero nitems_return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2003-10-10 at 20:01, Greg Stark wrote:
> Owen Taylor <otaylor@xxxxxxxxxx> writes:
> 
> >  a\0b\0
> > 
> > The second will crash that loop. I forget if the termiminating NUL is
> > required for WM_CLASS or not, but in any case you have to be robust 
> > about it not being there.
> 
> So, uh, I confess I'm a bit at a loss. This isn't my code and I've never seen
> this function before. 
> 
> The interface seems, uh, strange to me at this distance. What format is the
> return data supposed to be in? What relationship does prop_return,
> num_prop_return, and nitems_return have to each other?

It's all described in the man page ... it may take a few reads to figure
it out (it took me a few *years* to figure it out, actually ...)

But I don't really think the problem you are running into has much to
do with XGetWindowProperty, but rather what the function is doing with
the data it gets back. The code to split the WM_CLASS return is buggy.

You can find the details of how WM_CLASS is defined in the ICCCM
(probably on your system in some place like
/usr/share/doc/XFree86-doc-4.3.0/ICCCM/)

However, the function needs to be robust against the data not matching 
what is defined to be in the ICCCM.

Regards,
						Owen


_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux