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

sp/src/game/shared/ragdoll_shared.cpp: PVS-Studio: NULL Pointer Dereference #416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SviatoslavRazmyslov
Copy link

We have found and fixed a bug using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warnings:

  • V595 The 'pRagdoll' pointer was utilized before it was verified against nullptr. Check lines: 883, 884. ragdoll_shared.cpp 883
  • V595 The 'pRagdoll' pointer was utilized before it was verified against nullptr. Check lines: 924, 925. ragdoll_shared.cpp 924

We suggests having a look at the emails, sent from @pvs-studio.com.

@SC1040-TS2
Copy link

SC1040-TS2 commented Apr 18, 2021

We have found and fixed a bug using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warnings:

  • V595 The 'pRagdoll' pointer was utilized before it was verified against nullptr. Check lines: 883, 884. ragdoll_shared.cpp 883
  • V595 The 'pRagdoll' pointer was utilized before it was verified against nullptr. Check lines: 924, 925. ragdoll_shared.cpp 924

We suggests having a look at the emails, sent from @pvs-studio.com.

Necroposter here. This also seems to be present in https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/game/shared/ragdoll_shared.cpp#L883 as well. It seems to be more widespread than previously thought.

If this fix is to be merged into the SDK repository, it must be duplicated for the Source SDK 2013 SP code branch as well as MP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants