Raul Garcia
18bb6696e0
Fixing conditional only issue.
...
I changed to detect any logical operation usage (i.e. !, ==), but I kept usage in a conditional directly as a separate detection condition. I found no false positives on the projects you shared with me previously.
2019-01-07 10:44:11 -08:00
Raul Garcia
880306c621
Removing duplicated results
2019-01-04 10:45:43 -08:00
Raul Garcia
28932e85d9
Fixing the code based on PR feedback.
2019-01-02 16:23:19 -08:00
Raul Garcia
f8ab945b91
Merge branch 'master' into users/raulga/c6324
2018-12-14 15:46:38 -08:00
Raul Garcia
16f2bacf4d
cpp - Using the return value of a strcpy or related string copy function in an if statement
2018-12-14 15:42:49 -08:00
Geoffrey White
e443eb8889
CPP: Fix type logic.
2018-12-13 09:49:32 +00:00
Geoffrey White
c904a338f7
CPP: Add test cases.
2018-12-12 23:47:48 +00:00
Aditya Sharad
f92456fcad
Merge master into next.
...
Conflict in `cpp/ql/test/library-tests/sideEffects/functions/sideEffects.expected`,
resolved by accepting test output (combining changes).
2018-12-12 17:26:18 +00:00
Geoffrey White
2f3a874c7d
CPP: Fix false positives when a member variable is released via the target of a function pointer.
2018-12-12 11:38:44 +00:00
Geoffrey White
370387a9ca
CPP: Fix false positives when member variable is released via an ExprCall.
2018-12-12 11:38:44 +00:00
Geoffrey White
e408f18766
CPP: Fix false positives when member variable is released via capture inside lambda expression.
2018-12-12 11:38:44 +00:00
Geoffrey White
8e2459a6b7
CPP: Add similar test cases with function pointers.
2018-12-12 11:38:44 +00:00
Geoffrey White
77c1ad47f9
CPP: Add test cases with lambdas.
2018-12-12 11:38:44 +00:00
Robert Marsh
98005edd9d
Merge pull request #641 from geoffw0/exprnoeffect2
...
CPP: More tests of isSideEffectFree() / ExprHasNoEffect.ql
2018-12-11 12:17:30 -08:00
Geoffrey White
0f268cac40
CPP: Fix the issue.
2018-12-07 18:43:27 +00:00
Geoffrey White
02a060fbfa
CPP: Add a test.
2018-12-07 18:21:48 +00:00
Geoffrey White
e7390f3ea5
CPP: Add simple tests of CommaExpr.
2018-12-07 14:29:09 +00:00
Aditya Sharad
fcfab26267
Merge rc/1.19 into next.
2018-12-07 12:31:51 +00:00
Geoffrey White
d85f4b540c
CPP: Fix false positive.
2018-12-05 10:01:54 +00:00
Geoffrey White
e7f19e97cb
CPP: Add a test of UnusedStaticVariable.ql.
2018-12-05 10:01:54 +00:00
Jonas Jensen
6239455a91
C++: Remove extra type check in AV Rule 82
...
These type checks were overlapping with `assignOperatorWithWrongType` is
are no longer needed now that `assignOperatorWithWrongType` is improved.
They were causing FPs and misleading error messages on uninstantiated
templates.
2018-12-04 12:59:21 +01:00
Jonas Jensen
8ac427c387
C++: Add missing getUnspecifiedType in AV Rule 82
...
Adding this call to `getUnspecifiedType` makes the error message better
in the presence of typedefs and qualifiers on an assignment operator
return type. It's also needed to avoid losing valid results in the
commit that comes after this.
2018-12-04 11:13:11 +01:00
Jonas Jensen
a78ded7551
C++: Demonstrate FP in AV Rule 82
...
The added test is a reduced version of a FP observed in the wild.
2018-12-04 11:09:35 +01:00
Jonas Jensen
b80cf30cee
Merge pull request #562 from geoffw0/cpp-308
...
CPP: Fix FPs for 'Resource not released in destructor' involving virtual method calls
2018-12-03 15:57:11 +01:00
Geoffrey White
dfbccc4bcf
CPP: Additional test cases.
2018-12-03 13:11:52 +00:00
Jonas Jensen
60076cb734
Merge pull request #532 from geoffw0/query-tags-3
...
CPP: Query Tags 3 (JPL_C queries)
2018-11-30 15:45:01 +01:00
Jonas Jensen
9babb4366b
Merge remote-tracking branch 'upstream/master' into mergeback-20181130
2018-11-30 10:13:33 +01:00
Geoffrey White
0eb0bf988e
CPP: Fix for virtual method calls.
2018-11-28 14:19:24 +00:00
Geoffrey White
7107cec503
CPP: Add test cases.
2018-11-27 17:20:14 +00:00
Geoffrey White
f034abc275
CPP: Add the Semmle security tests.
2018-11-26 17:52:34 +00:00
Aditya Sharad
c20b688a3f
Merge master into next.
2018-11-23 16:36:31 +00:00
Geoffrey White
e6dddd90b7
CPP: Add a test of FunctionPointerConversions.ql.
2018-11-23 10:31:36 +00:00
Geoffrey White
0a27022dd4
Merge pull request #523 from jbj/placement-new-never-freed
...
C++: Detect non-allocating placement new in cpp/memory-never-freed
2018-11-23 09:40:11 +00:00
Geoffrey White
5d8e34a55f
CPP: Add a test of NonConstFunctionPointer.ql.
2018-11-22 17:48:40 +00:00
Geoffrey White
ea56a5d9ce
CPP: Add local dataflow to (one bit of) OverflowStatic.ql.
2018-11-22 15:49:13 +00:00
Geoffrey White
01ba635e1d
CPP: Add some test cases involving dataflow.
2018-11-22 15:49:13 +00:00
Jonas Jensen
75873bb4a6
C++: Detect non-allocating placement new
...
This adds a `NewOrNewArrayExpr.getPlacementPointer` predicate and uses
it in `Alloc.qll` to detect when a `new`-expression is not an
allocation.
User-defined replacements for `operator new` may not be allocations
either, but the code continues to assume that they are. It's possible
that we want to change this assumption in the future or leave it up to
individual queries to decide on which side to err. It's hard to
statically tell whether `operator new` has been overloaded in a
particular file because it can be overloaded by a definition that is not
in scope but is only linked together with that file.
2018-11-22 11:31:19 +01:00
Jonas Jensen
a17debac3e
C++: Placement-new tests for MemoryNeverFreed.ql
2018-11-22 10:48:18 +01:00
semmle-qlci
62db19bee7
Merge pull request #492 from geoffw0/offsetuse
...
Approved by dave-bartolomeo
2018-11-21 17:26:48 +00:00
Jonas Jensen
4e2d40aad8
Merge pull request #484 from geoffw0/limitedscopefile
...
CPP: Fix Limitedscopefile.ql
2018-11-21 14:30:48 +01:00
Geoffrey White
9922e36590
CPP: Add missing file.
2018-11-20 16:55:10 +00:00
Jonas Jensen
33111b6b27
Merge pull request #498 from geoffw0/test-cleanup
...
CPP: Clean up some test code.
2018-11-20 14:44:52 +01:00
Geoffrey White
342164ff71
CPP: Clean up / normalize some test code.
2018-11-20 09:50:59 +00:00
Jonas Jensen
6c0305cb80
Merge pull request #495 from geoffw0/returnvalue
...
CPP: Fix 'Missing return statement'
2018-11-20 10:16:30 +01:00
Jonas Jensen
cc28d04ba7
Merge pull request #405 from geoffw0/selfcompare
...
CPP: Fix false positives in PointlessSelfComparison.ql
2018-11-20 09:25:10 +01:00
Geoffrey White
5cae65295d
CPP: Fix FPs from AV Rule 114.ql.
2018-11-19 16:09:40 +00:00
Geoffrey White
d18a7012f5
CPP: Add a test case.
2018-11-19 16:08:32 +00:00
Geoffrey White
33130b9800
CPP: Apply recommended fix.
2018-11-19 14:39:28 +00:00
Geoffrey White
6a14748af8
CPP: Add recommended test.
2018-11-19 14:25:11 +00:00
Jonas Jensen
111df470c3
Merge pull request #485 from geoffw0/limitedscopefunction
...
CPP: Fix Limitedscopefunction.ql
2018-11-19 14:51:20 +01:00