mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Put ReturnStackAllocatedMemory.ql on LGTM
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
| Use of string copy function in a condition (`cpp/string-copy-return-value-as-boolean`) | correctness | This query identifies calls to string copy functions used in conditions, where it's likely that a different function was intended to be called. |
|
||||
| Lossy function result cast (`cpp/lossy-function-result-cast`) | correctness | Finds function calls whose result type is a floating point type, which are implicitly cast to an integral type. Newly available but not displayed by default on LGTM. |
|
||||
| Array argument size mismatch (`cpp/array-arg-size-mismatch`) | reliability | Finds function calls where the size of an array being passed is smaller than the array size of the declared parameter. Newly displayed on LGTM. |
|
||||
| Returning stack-allocated memory (`cpp/return-stack-allocated-memory`) | reliability, external/cwe/cwe-825 | Finds functions that may return a pointer or reference to stack-allocated memory. This query existed already but has been rewritten from scratch to make the error rate low enough for use on LGTM. Displayed by default. |
|
||||
|
||||
## Changes to existing queries
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
* @kind problem
|
||||
* @id cpp/return-stack-allocated-memory
|
||||
* @problem.severity warning
|
||||
* @precision high
|
||||
* @tags reliability
|
||||
* external/cwe/cwe-825
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
Reference in New Issue
Block a user