Skip to content

Conversation

@ChrisThrasher
Copy link
Member

Description

Closes #3185

@ChrisThrasher
Copy link
Member Author

Retargeting 2.6.x since this crash does not apparently occur in v3.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 10184599476

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 55.755%

Totals Coverage Status
Change from base Build 10183097761: -0.03%
Covered Lines: 11668
Relevant Lines: 19685

💛 - Coveralls
@kimci86
Copy link
Contributor

kimci86 commented Jul 31, 2024

I think the fix could be as simple as replacing &contiguous[0] by length ? &contiguous[0] : NULL.

We use this pattern in other places like here:

return !m_data.empty() ? &m_data[0] : NULL;

The root of the problem is accessing the first element of an empty
array which reads out-of-bounds memory.
@ChrisThrasher
Copy link
Member Author

The author of #3185 confirmed that this PR fixes their problem and that their problem is not present in SFML 3 so this commit does not need to be backmerged into master.

@ChrisThrasher ChrisThrasher merged commit 2a4ca6e into 2.6.x Aug 1, 2024
@ChrisThrasher ChrisThrasher deleted the setUniformArray branch August 1, 2024 20:04
@eXpl0it3r eXpl0it3r modified the milestones: 3.0, 2.6.2 Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment