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: possible crash related to unsafe "getTile" #1095

Merged
merged 4 commits into from
May 20, 2023
Merged

Conversation

dudantas
Copy link
Member

@dudantas dudantas commented May 15, 2023

Description

• Need tests

This change aims to validate some "getTile" functions to prevent rare crashes that may occur in specific scenarios. These crashes are more likely to happen in test environments than in production.

Although we could only reproduce one of the crashes, validating these functions is essential since they involve pointers that can occasionally return nullptr.

The most critical areas to focus on are the getTile function in creature.h and the Game::playerMoveItem function, as they pose a higher risk.

@dudantas dudantas force-pushed the fix-get-tile-crash branch from 3136008 to 4efa3e9 Compare May 15, 2023 05:42
@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarCloud.

@murilo09 murilo09 changed the title fix: possible crashs related to unsafe "getTile" fix: possible crash related to unsafe "getTile" May 16, 2023
@dudantas dudantas merged commit 633bd8c into main May 20, 2023
@dudantas dudantas deleted the fix-get-tile-crash branch May 20, 2023 17:55
enzerah pushed a commit to enzerah/canary that referenced this pull request May 21, 2023
This change aims to validate some "getTile" functions to prevent rare crashes that may occur in specific scenarios. These crashes are more likely to happen in test environments than in production.

Although we could only reproduce one of the crashes, validating these functions is essential since they involve pointers that can occasionally return nullptr.

The most critical areas to focus on are the getTile function in creature.h and the Game::playerMoveItem function, as they pose a higher risk.
enzerah pushed a commit to enzerah/canary that referenced this pull request May 21, 2023
This change aims to validate some "getTile" functions to prevent rare crashes that may occur in specific scenarios. These crashes are more likely to happen in test environments than in production.

Although we could only reproduce one of the crashes, validating these functions is essential since they involve pointers that can occasionally return nullptr.

The most critical areas to focus on are the getTile function in creature.h and the Game::playerMoveItem function, as they pose a higher risk.
libergod referenced this pull request in libergod/canary_baiak May 31, 2023
luan pushed a commit that referenced this pull request Jul 11, 2023
This change aims to validate some "getTile" functions to prevent rare crashes that may occur in specific scenarios. These crashes are more likely to happen in test environments than in production.

Although we could only reproduce one of the crashes, validating these functions is essential since they involve pointers that can occasionally return nullptr.

The most critical areas to focus on are the getTile function in creature.h and the Game::playerMoveItem function, as they pose a higher risk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants