Skip to content

Commit 2b8afe5

Browse files
authored
Merge pull request github#5747 from rdmarsh2/rdmarsh2/cpp/deprecate-return-stack-allocated-object
C++: deprecate cpp/return-stack-allocated-object
2 parents fea9f5f + cac1bef commit 2b8afe5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
codescanning
2+
* The 'Pointer to stack object used as return value' (cpp/return-stack-allocated-object) query has been deprecated, and any uses should be replaced with `Returning stack-allocated memory` (cpp/return-stack-allocated-memory).

cpp/ql/src/Critical/ReturnStackAllocatedObject.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @tags reliability
88
* security
99
* external/cwe/cwe-562
10+
* @deprecated This query is not suitable for production use and has been deprecated. Use
11+
* cpp/return-stack-allocated-memory instead.
1012
*/
1113

1214
import semmle.code.cpp.pointsto.PointsTo

0 commit comments

Comments
 (0)