On Mon, Aug 24, 2009 at 11:30 PM, Carlos R. Mafra<[email protected]> wrote: > Martin Dietze wrote: >> The way XGetWindowProperty() is called according to your patch >> the code *looks* better, in particular since when looking at it >> you see that the arguments in question are supposed to be longs. > > Ok. > >> I can't see how passing 0L instead of 0 should make any >> difference. > > Ok, when I read that patch I thought that maybe some subtle > thing was going on when compiled in 32-bit or 64-bit. > At least it seemed to matter for the guy who made the patch. > >>> /* >>> * TODO >>> * ---- >>> * >>> * This file needs to be checked for all calls to XGetWindowProperty() and >>> * proper checks need to be made on the returned values. Only checking for >>> * return to be Success is not enough. -Dan >>> */ >>> >>> So they knew about the fishiness at that time. >> >> I saw this comment, too. Not quite sure what he meant, I had the >> impression that he was concerned about checking the results. Or >> maybe there's something we haven't seen yet? > > Yeah, it is about the return value. Reading the man page can tell you > why, there is a bunch of things to consider. >
I think the most sensible thing to do is to wrap the calls to XGetWindowProperty in some internal function. This would prolly make it more feasible to actually check that the actual_type_return is correct. As well as make sure that the whole amount of data was read. -- To unsubscribe, send mail to [email protected].
