Commit 97dd328
committed
linux: fix heap corruption in _wait_for_map XWindowAttributes buffer
The _XWA ctypes Structure declared only 18 of the 23 fields of
XWindowAttributes, giving ctypes.sizeof(_XWA) == 96. XGetWindowAttributes
writes the full 136-byte struct regardless, so all_event_masks (offset 96)
landed in the 8-byte tail guard of the adjacent Python debug allocation,
corrupting the heap.
Add the five missing fields (all_event_masks, your_event_mask,
do_not_propagate_mask, override_redirect, screen) so the buffer is
the correct 136 bytes on LP64.1 parent 9597b25 commit 97dd328
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
| |||
0 commit comments