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 crash when dynamic native is executed with the max number of params #291

Merged
merged 1 commit into from
Sep 5, 2015

Conversation

Arkshine
Copy link
Member

@Arkshine Arkshine commented Sep 5, 2015

This fixes a buffer overflow with g_Params, which has a size of 16 but params index starts to 1. As consequence when 16 params are passed, g_Params[16] is indexed and likely overwrites something important which leads to a crash at some point.

It doesn't happen in 1.8.2. Possible reasons why it happens in dev version is this uses newer compiler and compiling optimization are better , resulting crash is triggered now.

Reported here https://forums.alliedmods.net/showthread.php?t=271103.

This fixes a buffer overflow with `g_Params`, which has a size of 16 but params index starts to 1. As consequence when 16 params are passed, `g_Params[16]` is indexed and likely overwrites something important which leads to a crash at some point.

It doesn't happen in 1.8.2. Possible reasons why it happens in dev version is this uses newer compiler and compiling optimization are better , resulting crash is triggered now. 

Reported here https://forums.alliedmods.net/showthread.php?t=271103.
@Arkshine Arkshine added the bug label Sep 5, 2015
@Nextra
Copy link
Contributor

Nextra commented Sep 5, 2015

oops. 🐑

Arkshine added a commit that referenced this pull request Sep 5, 2015
Fix crash when dynamic native is executed with the max number of params
@Arkshine Arkshine merged commit eaa330d into master Sep 5, 2015
@Arkshine Arkshine deleted the fix/native-overflow branch September 5, 2015 16:24
@Arkshine Arkshine added the core label Jan 20, 2017
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.

None yet

2 participants