mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
CPP: Widen varMaybeStackAllocated.
This commit is contained in:
@@ -1 +1,4 @@
|
||||
| test.cpp:12:2:12:12 | return ... | May return stack-allocated memory. |
|
||||
| test.cpp:20:2:20:12 | return ... | May return stack-allocated memory. |
|
||||
| test.cpp:73:2:73:12 | return ... | May return stack-allocated memory. |
|
||||
| test.cpp:93:2:93:12 | return ... | May return stack-allocated memory. |
|
||||
|
||||
@@ -9,7 +9,7 @@ MyClass *test1()
|
||||
{
|
||||
MyClass mc;
|
||||
|
||||
return &mc; // BAD [NOT DETECTED]
|
||||
return &mc; // BAD
|
||||
}
|
||||
|
||||
MyClass *test2()
|
||||
@@ -17,7 +17,7 @@ MyClass *test2()
|
||||
MyClass mc;
|
||||
MyClass *ptr = &mc;
|
||||
|
||||
return ptr; // BAD [NOT DETECTED]
|
||||
return ptr; // BAD
|
||||
}
|
||||
|
||||
MyClass *test3()
|
||||
@@ -70,7 +70,7 @@ MyClass *test10()
|
||||
ptr = &mc;
|
||||
}
|
||||
|
||||
return ptr; // BAD [NOT DETECTED]
|
||||
return ptr; // BAD
|
||||
}
|
||||
|
||||
MyClass *test11(MyClass *param)
|
||||
|
||||
Reference in New Issue
Block a user