include::../description.adoc[] include::../ask-yourself.adoc[] include::../recommended.adoc[] == Sensitive Code Example ---- #include // ... void f() { FILE * fp = fopen("/tmp/temporary_file", "r"); // Sensitive } ---- ---- #include #include #include // ... void f() { std::stringstream ss; ss << getenv("TMPDIR") << "/temporary_file"; // Sensitive FILE * fp = fopen(ss.str().c_str(), "w"); } ---- == Compliant Solution [source,cpp] ---- #include #include // ... void f() { FILE * fp = tmpfile(); // Compliant } ---- include::../see.adoc[] ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] ''' == Comments And Links (visible only on this page) include::../comments-and-links.adoc[] endif::env-github,rspecator-view[]