mirror of
https://github.com/github/codeql.git
synced 2025-12-19 10:23:15 +01:00
20 lines
207 B
C
20 lines
207 B
C
// pointsto on structs
|
|
|
|
typedef struct
|
|
{
|
|
int *ptr;
|
|
} myStruct;
|
|
|
|
int *myFunction()
|
|
{
|
|
int x, y, z;
|
|
myStruct a, b;
|
|
int *zp;
|
|
|
|
a.ptr = &x;
|
|
b.ptr = &y;
|
|
zp = &z;
|
|
|
|
return a.ptr; // &x [FALSE POSITIVE: y]
|
|
}
|