mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
CPP: Fix false positive.
This commit is contained in:
@@ -1,2 +1 @@
|
||||
| test.cpp:24:4:24:7 | arr3 | Array of size 3 passed to $@ which expects an array of size 4. | test.cpp:8:6:8:6 | g | g |
|
||||
| test.cpp:40:9:40:12 | data | Array of size 0 passed to $@ which expects an array of size 4. | test.cpp:9:6:9:6 | h | h |
|
||||
|
||||
@@ -37,7 +37,7 @@ void test(float f3[3], float f4[4], float f5[5], float *fp)
|
||||
ms = (myStruct *)malloc(sizeof(myStruct) + (4 * sizeof(float)));
|
||||
ms->num = 4;
|
||||
ms->data[0] = ms->data[1] = ms->data[2] = ms->data[3] = 0;
|
||||
h(ms->data); // GOOD [FALSE POSITIVE]
|
||||
h(ms->data); // GOOD
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user