Commit Graph

6803 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
8fb15666ee Merge pull request #6041 from geoffw0/uncontrolled-allocation-size
C++: Add CWE-789 tag to cpp/uncontrolled-allocation-size.
2021-06-08 17:44:02 +02:00
Geoffrey White
32545a1346 C++: Add CWE-789 tag to cpp/uncontrolled-allocation-size. 2021-06-08 10:59:03 +01:00
Mathias Vorreiter Pedersen
025043afca Merge pull request #6010 from geoffw0/charloc
C++: Test and fix maxCols / charLoc
2021-06-08 11:15:04 +02:00
Alex Denisov
a12954a403 C++: Remove outdated comment 2021-06-07 17:15:21 +02:00
AlexDenisov
d254524f3f Merge pull request #6027 from AlexDenisov/alexdenisov/fix-string-literal-expectation
C++: Fix string literal expectation
2021-06-07 17:13:12 +02:00
Geoffrey White
6f05fd4839 C++: Autoformat. 2021-06-07 11:01:00 +01:00
Mathias Vorreiter Pedersen
3923acb5e0 Merge pull request #6017 from github/dbartol/pack/extra-queries-xml
C++: Replace an odd `queries.xml` with `qlpack.yml`
2021-06-07 10:58:19 +02:00
Alex Denisov
17be6e1271 C++: Fix string literal expectation 2021-06-07 09:47:26 +02:00
Dave Bartolomeo
ac3ded7d5a Replace an odd queries.xml with qlpack.yml
This one C++ test has its own `queries.xml` to make "outside-of-source" path filtering work, as detailed in commit 2550788598. I've replaced the `queries.xml` with `qlpack.yml`, added a comment, and added that pack to the `.codeqlmanifest.json` at the root of the repo. This will allow the library dependencies of this pack to be resolved without the need for a `--search-path` option with the upcoming packaging changes.
2021-06-06 09:04:18 -04:00
Dave Bartolomeo
e276e2684e Merge pull request #5986 from MathiasVP/side-effects-for-nonconst-smart-pointers
C++: Fix `hasDefaultSideEffect` for non-const smart pointers
2021-06-04 13:57:44 -04:00
Mathias Vorreiter Pedersen
8e8c2e677a C++: Accept test changes. 2021-06-04 18:49:20 +02:00
Mathias Vorreiter Pedersen
27586d77f8 C++: Copy isDeeplyConst{Below} into SideEffects and modify it so that it works for smart pointers. 2021-06-04 18:46:52 +02:00
Mathias Vorreiter Pedersen
f2d7988d72 C++: Add tests involving various non-const and const smart pointers. 2021-06-04 18:46:05 +02:00
Geoffrey White
799e19bdc2 C++: Update the other version as well. 2021-06-04 16:21:04 +01:00
Geoffrey White
3c6a1f165b Update cpp/ql/src/semmle/code/cpp/Location.qll
Co-authored-by: Jonas Jensen <jbj@github.com>
2021-06-04 16:19:11 +01:00
Geoffrey White
b24dc810c9 C++: Combine results from cpp/weak-cryptographic-algorithm that are in the same file. 2021-06-04 14:04:02 +01:00
Geoffrey White
a93246d28b C++: Fix maxCols. 2021-06-04 13:05:13 +01:00
Geoffrey White
ea96826810 C++: Add a test of charLoc and subsumes. 2021-06-04 13:05:07 +01:00
Mathias Vorreiter Pedersen
d450aa2ce4 C++: Add some testcases that require path sensitivity. 2021-06-03 18:02:29 +02:00
Jonas Jensen
7282ad90d0 Merge pull request #5854 from dbartol/dbartol/smart-pointers/side-effects
C++: Generate side effect instructions for smart pointer indirections
2021-06-01 16:57:05 +02:00
Dave Bartolomeo
da14647e5a Merge pull request #5522 from github/rdmarsh2/cpp/ssa-reuse
C++: reuse unaliased SSA results when computing aliased SSA
2021-06-01 10:17:54 -04:00
Anders Schack-Mulligen
ce509eb7e1 Merge pull request #5927 from aschackmull/dataflow/flowthrough-dispatch-perf
Dataflow: Improve performance in flow-through pruning
2021-06-01 11:46:22 +02:00
Anders Schack-Mulligen
5d21c64247 Dataflow: qldoc fix. 2021-06-01 10:49:47 +02:00
Jonas Jensen
2261085cfe Merge pull request #5973 from MathiasVP/more-uncontrolled-arith-improvements
C++: More `cpp/uncontrolled-arithmetic` improvements
2021-06-01 10:44:29 +02:00
Anders Schack-Mulligen
4f9a6c151b Dataflow: Code review fixes. 2021-06-01 10:29:17 +02:00
Mathias Vorreiter Pedersen
8765c33847 C++: Also check the number of parameters to keep the tests happy. 2021-06-01 10:17:57 +02:00
Mathias Vorreiter Pedersen
615c805b2c C++: Only use std::rand as a source of randomness. 2021-06-01 09:28:06 +02:00
Mathias Vorreiter Pedersen
41c93d92d7 C++: Remove FPs from right shifts and explicitly bounded random functions. 2021-05-31 15:40:02 +02:00
Mathias Vorreiter Pedersen
10755ece88 C++: Add testcase with bounded randomness source. 2021-05-31 15:33:39 +02:00
Anders Schack-Mulligen
683f853fa5 Dataflow: Fix another bad join order. 2021-05-31 15:14:13 +02:00
Mathias Vorreiter Pedersen
6d7b95c15d Merge pull request #5966 from erik-krogh/overrideConsistency
CPP/C#: make some parameter names consistent with the names used in the super class
2021-05-31 11:57:10 +02:00
Jonas Jensen
4e502d10d6 Merge pull request #5951 from MathiasVP/optimize-switcCase-getAStmt
C++: Remove large antijoin in `SwitchCase.getAStmt`
2021-05-31 11:50:32 +02:00
Mathias Vorreiter Pedersen
b4e4c12d0f C++: Use a rank aggregate for a much better implementation. 2021-05-31 11:17:09 +02:00
Jonas Jensen
f97b8ad1d4 Merge pull request #5961 from MathiasVP/fix-FPs-in-incorrect-allocation-error-handling
C++: Exclude custom `operator new` from `cpp/incorrect-allocation-error-handling`
2021-05-31 10:54:59 +02:00
Mathias Vorreiter Pedersen
66d284ee59 Merge pull request #5766 from ihsinme/ihsinme-patch-267
CPP: Add query for CWE-415 Double Free
2021-05-31 10:51:32 +02:00
ihsinme
d808a5b131 Update cpp/ql/test/experimental/query-tests/Security/CWE/CWE-415/semmle/tests/test.c
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2021-05-31 11:16:38 +03:00
Mathias Vorreiter Pedersen
175fdbb105 C++: Replace exists(not ...) with not exists(...). 2021-05-31 09:54:24 +02:00
Mathias Vorreiter Pedersen
64975e5c1e Merge pull request #5842 from japroc/cpp-pqxx-sqli-sink
C++: SqlPqxxTainted query searches for sql injections via pqxx connector to postgres
2021-05-28 17:01:27 +02:00
Erik Krogh Kristensen
b947334eea CPP: make some parameter names consistent with the names used in the super class 2021-05-28 16:48:47 +02:00
Erik Krogh Kristensen
79989cc3f4 CPP/Java: Fix getAPrimaryQlClass implementations 2021-05-27 21:36:27 +02:00
Mathias Vorreiter Pedersen
4107e350cb C++: Add qldoc to NoThrowType. 2021-05-27 11:39:03 +02:00
Mathias Vorreiter Pedersen
71a860a356 C++: Exclude custom operator new allocators from the ThrowingAllocator class. 2021-05-27 11:23:11 +02:00
Evgenii Protsenko
efa657d47c C++: SqlPqxxTainted.ql Add namespace check 2021-05-27 00:13:54 +03:00
Ian Lynagh
f9ede97fcd C++: Update the ReturnValueIgnored.qhelp docs to match the code 2021-05-26 17:38:49 +01:00
ihsinme
9088475339 Update DoubleFree.qhelp 2021-05-26 09:44:03 +03:00
ihsinme
2909dde179 Update test.c 2021-05-26 09:31:15 +03:00
ihsinme
fbf95df537 Update DoubleFree.c 2021-05-26 09:27:20 +03:00
ihsinme
7c2100efd9 Apply suggestions from code review
thanks for your corrections.
and of course sorry for my text.

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2021-05-26 09:15:46 +03:00
Evgenii Protsenko
55045626df C++: SqlPqxxTainted.ql style fixes 2021-05-25 22:38:27 +03:00
Mathias Vorreiter Pedersen
b2bdf95a9d C++: Remove large antijoin in SwitchCase.getAStmt(). 2021-05-25 17:25:42 +02:00