Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mask index out of bounds segmentation fault #873

Merged
merged 1 commit into from Mar 4, 2019

Conversation

@charlesej
Copy link
Contributor

@charlesej charlesej commented Mar 2, 2019

This update fixes the segmentation fault caused by calling pygame.mask.Mask.connected_component with an index outside the mask's bounds.

Overview of changes:

  • IndexError raised when an index is outside of the mask's bounds
  • Fixed some memory leaks on the fail paths
  • Fixed an incorrect exception message
  • Removed @unittest.skip decorator from the related test method and fixed a variable name error

System details:

  • os: windows 10 (64bit)
  • python: 3.7.2 (64bit) and 2.7.10 (64bit)
  • pygame: 1.9.4 and 1.9.5.dev0 (SDL: 1.2.15) at 1a4c789
- IndexError raised when an index is outside of the mask's bounds
- Fixed some memory leaks on the fail paths
- Fixed an incorrect exception message
- Removed @unittest.skip decorator from the related test method and
  fixed a variable name error
@illume
Copy link
Member

@illume illume commented Mar 4, 2019

Nice one :) This closes: #841

@illume illume merged commit eb2051c into pygame:master Mar 4, 2019
2 checks passed
@charlesej charlesej deleted the fix-mask-cc-segfault branch Mar 4, 2019
@dlon dlon mentioned this pull request Mar 23, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants