Skip to content

SDKCall crashes on null char pointers #874

@nosoop

Description

@nosoop

Environment

  • Operating System version: Linux
  • Game/AppID (with version if applicable): Team Fortress 2
  • SourceMod version (tested): 1.9.0.6238

Description

SDKCalls that expect a char pointer but receive a null pointer instead seems to result in a segfault. This was observed when calling TF2's GetTFConditionName() function on non-existent conditions. The function itself has bounds checks and returns null on invalid conditions.

Problematic Code

Available as a gist here. Prints out addresses by default (breaking out of the loop after cond 127 as expected); uncomment and comment accordingly to get the string returned instead (crashing instead of exiting the loop).

Metadata

Metadata

Assignees

Labels

Buggeneral bugs; can be anything

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions