Re: freeze break request: fix pyatspi.getState().getStates()

On 04/04/2011 05:58 AM, Frederic Peters wrote:
Mike Gorse wrote:

AT-SPI has a method to return the list of states contained in a
state set as an array, but this sometimes fails with pyatspi on
64-bit architectures because of what I think is a bug in pygi.  In
any case, pygi is copying an argument from an array (an int in this
case) and later assuming that it has a valid long value, so it might
read eight bytes where only four were initialized.  I've filed the
issue as BGO#646581.  I would like to apply the attached patch to
pyatspi for the time being; it works around the issue by not making
the problematic C call.

Mmmm, I'd certainly prefer to have the pygobject patch applied; adding
Tomeu for comment.


I certainly would like to see that fix in at least PyGObject's stable branch.

Mike, could you come up with a test case? I don't have a 64bit machine around, so I'm CC'ing the python-hackers mailing list in case someone can give a hand. The test would go in the code linked below, you can run "make check.valgrind" to make sure the out-of-bounds access is not there any more:

J5 is rewriting that part of PyGObject and it will land soon in master, so having a test case will assure that we won't regress there.

It's great to hear that pyatspi is moving to introspection, btw.



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