mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
C++: Add example of missing result.
This commit is contained in:
@@ -179,3 +179,13 @@ void test10_callee(array_t *arr) {
|
||||
void test10(int size) {
|
||||
test10_callee(mk_array_p(size));
|
||||
}
|
||||
|
||||
void deref_plus_one(char* q) {
|
||||
char a = *(q + 1); // BAD [NOT DETECTED]
|
||||
}
|
||||
|
||||
void test11(unsigned size) {
|
||||
char *p = malloc(size);
|
||||
char *q = p + size - 1;
|
||||
deref_plus_one(q);
|
||||
}
|
||||
Reference in New Issue
Block a user