Mathias Vorreiter Pedersen
fd2f0257b6
C++: Accept query changes.
2023-04-28 10:25:12 +01:00
Jeroen Ketema
9e462866a0
C++: Update test annotations for use-use dataflow
2023-02-14 14:48:08 +01:00
Mathias Vorreiter Pedersen
45f69be94c
C++: Accept test changes
2022-12-16 14:14:58 +00:00
Jeroen Ketema
0d27d63984
Merge remote-tracking branch 'upstream/main' into mathiasvp/replace-ast-with-ir-use-usedataflow
2022-11-09 14:28:47 +01:00
Geoffrey White
d72ea52f68
C++: More accurate test tags.
2022-11-07 16:32:46 +00:00
Geoffrey White
55a7adff20
C++: Make the message clearer.
2022-11-07 16:32:45 +00:00
Geoffrey White
b911556896
C++: Add a test showing the motivation.
2022-11-07 16:17:32 +00:00
Jeroen Ketema
80ef3b39ff
Merge branch 'main' into mathiasvp/replace-ast-with-ir-use-usedataflow
2022-10-31 18:26:34 +01:00
Jeroen Ketema
b43cbf7f95
Update cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/test.cpp
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2022-10-31 17:03:29 +01:00
Jeroen Ketema
abe9258943
C++: Add strcpy test for cpp/non-constant-format
2022-10-31 15:29:17 +01:00
Jeroen Ketema
83afc2a0ad
C++: Add strcpy prototype to test
2022-10-31 15:25:35 +01:00
Mathias Vorreiter Pedersen
e7b0536896
C++: Repair 'cpp/non-constant-format' in preparation for IR-based use-use dataflow.
2022-10-14 15:26:25 +02:00
Mathias Vorreiter Pedersen
4c5953fce0
C++: Accept query-test changes.
2022-10-14 10:14:52 +02:00
erik-krogh
33165f4f55
CPP: update expected output
2022-09-23 14:45:59 +02:00
Geoffrey White
6e49891ed9
C++: Accept Microsoft/non-Microsoft format specifiers on the opposite platform.
2021-06-29 16:45:46 +01:00
Geoffrey White
708d3870ee
C++: Actually it's more appropriate to remove the implementation of vswprintf.
2021-02-02 13:42:27 +00:00
Geoffrey White
4e904dd87d
C++: Repair the test.
2021-02-02 13:08:46 +00:00
Geoffrey White
eed2aee17d
C++: Effect on tests.
2021-02-02 10:59:14 +00:00
Geoffrey White
93dfeac3c8
C++: Make specsAreKnown more accurate.
2020-12-15 17:43:28 +00:00
Geoffrey White
94dea9f71d
C++: Add a test of unknown format specifiers (with specsAreKnown check disabled).
2020-12-15 17:40:32 +00:00
Geoffrey White
99b01e7d36
C++: Additional test case for FormattingFunction.
2020-11-30 15:25:51 +00:00
Geoffrey White
8198b96eb2
C++: Add test cases.
2020-10-20 15:33:57 +01:00
Geoffrey White
540af7866c
C++: Test spacing.
2020-10-20 15:23:15 +01:00
Geoffrey White
dff21e02db
CPP: Fully support positional arguments.
2019-11-11 15:27:23 +00:00
Geoffrey White
760884051c
CPP: Add test cases using various combinations of width and precision specifiers, positional arguments, and flags.
2019-11-11 15:27:22 +00:00
Geoffrey White
b4fb98dc7c
CPP: Fix comments.
2019-11-08 15:10:13 +00:00
Geoffrey White
821d5061a7
CPP: Correct the tests.
2019-11-08 15:10:13 +00:00
Geoffrey White
cd3bccf73a
CPP: Fix FPs.
2019-11-08 15:09:46 +00:00
Geoffrey White
1cf4449314
CPP: Test for NonConstantFormat with multiple definitons.
2019-11-08 15:09:45 +00:00
Geoffrey White
144cda7dd9
CPP: Test for WrongTypeFormatArguments with multiple definitions.
2019-11-08 15:09:45 +00:00
Jonas Jensen
898976121b
Merge pull request #1987 from geoffw0/toomanyformat
...
CPP: WrongNumberOfFormatArguments.ql Fix
2019-09-23 16:05:11 +02:00
Geoffrey White
b3df289a80
CPP: Fix test.
2019-09-23 13:56:24 +01:00
Geoffrey White
2d8e4b3176
CPP: Additional cases resembling the ticket.
2019-09-23 13:04:14 +01:00
Geoffrey White
040bd89163
CPP: Correct expected results.
2019-09-23 11:02:36 +01:00
Geoffrey White
f7607313e7
CPP: Fix FPs.
2019-09-20 15:12:55 +01:00
Geoffrey White
9a407eb43c
CPP: Test format args with mismatching declarations.
2019-09-20 14:54:44 +01:00
Nick Rolfe
56f4f86921
C++: ignore uninstantiated templates in WrongTypeFormatArguments.ql
2019-09-19 21:18:47 +01:00
Jonas Jensen
4ef5c9af62
C++: Autoformat everything
...
Some files that will change in #1736 have been spared.
./build -j4 target/jars/qlformat
find ql/cpp/ql -name "*.ql" -print0 | xargs -0 target/jars/qlformat --input
find ql/cpp/ql -name "*.qll" -print0 | xargs -0 target/jars/qlformat --input
(cd ql && git checkout 'cpp/ql/src/semmle/code/cpp/ir/implementation/**/*SSA*.qll')
buildutils-internal/scripts/pr-checks/sync-identical-files.py --latest
2019-09-09 11:25:53 +02:00
Jonas Jensen
cace411974
C++: NonConstantFormat taint only for string types
...
To speed up the taint analysis in `NonConstantFormat.ql` and to remove
FPs that were due to taint spreading from `i` to `a[i]`, this commit
stops the taint tracking in `NonConstantFormat.ql` at every node that
could not possibly contain a string.
I tested performance on Wireshark, and it's fine. Pulling out the
`isSanitizerNode` prevented `isSanitizer` from turning into four
half-slow RA predicates due to both CPE and `#antijoin_rhs`
transformations happening.
2019-06-20 15:39:47 +02:00
Jonas Jensen
e99c68885c
C++: Demonstrate ArrayExpr FP
2019-06-20 14:00:42 +02:00
Ziemowit Laski
88a39d9454
[CPP-370] Fix up // GOOD and // BAD test annotations so that they're consistent.
2019-06-12 12:56:11 -07:00
Ziemowit Laski
0f5a4a7089
[CPP-370] Improve handling of _ macros by using taint sanitizers.
2019-06-10 15:50:53 -07:00
Ziemowit Laski
8f79cdb1fb
[CPP-370] Add an additional test case.
2019-06-04 16:19:01 -07:00
Ziemowit Laski
46b6eac955
[CPP-370] An .expected file is mismatched again. Not sure why
...
this is happening.
2019-05-22 09:08:44 -07:00
Ziemowit Laski
ae55b7b643
[CPP-370] Add new test file for testing procedurally nested format
...
argument violations.
2019-05-21 07:08:13 -07:00
Ziemowit Laski
92054e2481
[CPP-370] Reformat test cases so that the .expect files line up with what was
...
checked in initially. Check for DataFlow::DefinitionByReferenceNode
when computing isSource() for our taint analysis.
2019-05-21 06:54:41 -07:00
Ziemowit Laski
098b6543f5
[CPP-370] Rewrite of NonConstantFormat.ql using the taint tracking library.
2019-05-21 06:51:47 -07:00
Ziemowit Laski
d8b8dda439
[CPP-370] First attempt at isAdditionalFlowStep().
2019-05-21 06:45:52 -07:00
Ziemowit Laski
dbec17f85b
[CPP-370] Tentative implementation of NonConstantFormat.ql using the global
...
DataFlow library. This is intended solely for further discussion.
2019-05-21 06:23:51 -07:00
Ziemowit Laski
6025c03857
[CPP-370] Add nested.cpp test case, for nested calls to ...printf functions.
2019-05-21 06:21:12 -07:00