← Rule catalog

rust-doctor · Security

temporary-cstring-pointer

Detect raw pointers borrowed from temporary CString values

Severity
warning
Confidence
high
Analyzer
syn-ast
Default policy
Opt-in

Tags

  • heuristic
  • security

Framework requirements

No framework requirement.

Limitations

  • Syntactic analysis does not have rustc name resolution or inferred type information.

Remediation

Bind the CString so its owner outlives every use of the raw pointer.

Fix capability: guidance