mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
C++: Switch the source of use-after-free and double-free to be post-update nodes.
This commit is contained in:
@@ -275,12 +275,12 @@ struct MyStruct {
|
||||
|
||||
void test_free_struct(MyStruct* s) {
|
||||
free(s->buf);
|
||||
char c = s->buf[0]; // BAD [FALSE NEGATIVE]
|
||||
char c = s->buf[0]; // BAD
|
||||
}
|
||||
|
||||
void test_free_struct2(MyStruct s) {
|
||||
free(s.buf);
|
||||
char c = s.buf[0]; // BAD [FALSE NEGATIVE]
|
||||
char c = s.buf[0]; // BAD
|
||||
}
|
||||
|
||||
void test_free_struct3(MyStruct s) {
|
||||
|
||||
Reference in New Issue
Block a user