summaryrefslogtreecommitdiff
path: root/tests/glibext/objhole.py
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-12-13 23:19:31 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-12-13 23:19:31 (GMT)
commitc9207edf32d966e67bccc1ed82cf0958de459817 (patch)
tree166d4dee8dbc689672da410cea9d7d271b4ac5c7 /tests/glibext/objhole.py
parent6433f2aa7552b43b3d0d753f0d525e2040a5b922 (diff)
Update the exploitation of the GObject memory hole.
Diffstat (limited to 'tests/glibext/objhole.py')
-rw-r--r--tests/glibext/objhole.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/glibext/objhole.py b/tests/glibext/objhole.py
new file mode 100644
index 0000000..09bd8f5
--- /dev/null
+++ b/tests/glibext/objhole.py
@@ -0,0 +1,22 @@
+
+from chrysacase import ChrysalideTestCase
+from pychrysalide.glibext import ThickObject
+
+
+class TestWorks(ChrysalideTestCase):
+ """TestCase for pychrysalide.glibext.BinaryPortion"""
+
+ def testExtraAccess(self):
+ """Access to various definitions of the extra data for ThickObject."""
+
+ obj = ThickObject()
+
+ self.assertEqual(obj.extra, 0)
+
+ obj.extra = 0xffffffe0
+
+ self.assertEqual(obj.extra, 0xffffffe0)
+
+ obj.extra = 0x00123000
+
+ self.assertEqual(obj.extra, 0x00123000)