bpo-36253: Remove use after free reference in ctypes test suite (GH-1… · python/cpython@a9b6033 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit a9b6033
authored and
committed
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -70,8 +70,8 @@ def test_functions(self): | ||
70 | 70 | x = r[0], r[1], r[2], r[3], r[4] |
71 | 71 | self.assertEqual(x, (b"c", b"d", b"e", b"f", b"\000")) |
72 | 72 | del buf |
73 | -# x1 will NOT be the same as x, usually: | |
74 | -x1 = r[0], r[1], r[2], r[3], r[4] | |
73 | +# Because r is a pointer to memory that is freed after deleting buf, | |
74 | +# the pointer is hanging and using it would reference freed memory. | |
75 | 75 | |
76 | 76 | if __name__ == '__main__': |
77 | 77 | unittest.main() |