Geoffrey White
0b6096ebfe
C++: Define make_pair and declare std::forward in the test.
2020-10-02 10:51:34 +01:00
Geoffrey White
ad9f306352
C++: Model taint flow only when the second component of a pair would be tainted.
2020-10-01 17:38:09 +01:00
Geoffrey White
952cc89c2a
C++: Improve make_pair in stl.h (using remove_reference).
2020-09-30 16:17:06 +01:00
Geoffrey White
7ecd229ce7
C++: Improve make_pair in stl.h (jbj solution).
2020-09-30 16:16:53 +01:00
Geoffrey White
6de29a6dd3
C++: Provide std::pair constructor initializers.
2020-09-28 17:52:33 +01:00
Geoffrey White
8059230bbc
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdPair.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-28 16:59:28 +01:00
Geoffrey White
773bc48a91
C++: Use a more modern make_pair.
2020-09-28 16:54:41 +01:00
Geoffrey White
759324ca1b
Update cpp/ql/src/semmle/code/cpp/models/implementations/StdPair.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-28 16:51:21 +01:00
Geoffrey White
11587c930b
C++: Autoformat.
2020-09-28 09:19:35 +01:00
Geoffrey White
09b5fb6753
C++: Fix comments.
2020-09-25 10:41:25 +01:00
Geoffrey White
ec3c1568d2
C++: Model erase.
2020-09-24 18:38:29 +01:00
Geoffrey White
8b91d5077d
C++: Model find.
2020-09-24 18:38:29 +01:00
Geoffrey White
d550741c0c
C++: Model insert_or_assign.
2020-09-24 18:38:28 +01:00
Geoffrey White
c51294e423
C++: Model operator[] and at.
2020-09-24 18:38:28 +01:00
Geoffrey White
13b15d9bcd
C++: Model swap.
2020-09-24 18:38:27 +01:00
Geoffrey White
6119bf3430
C++: Model begin and end.
2020-09-24 18:38:27 +01:00
Geoffrey White
25e0c680c6
C++: Model insert.
2020-09-24 18:38:27 +01:00
Geoffrey White
0dca7f81bc
C++: Model std::swap.
2020-09-24 15:49:33 +01:00
Geoffrey White
49f9a76c54
C++: Add tests for std::map and std::unordered_map.
2020-09-24 15:19:39 +01:00
Geoffrey White
71a605b7d9
C++: Add tests for std::pair.
2020-09-23 18:43:28 +01:00
Geoffrey White
e836bae20f
C++: Tidy up test stl.h a little.
2020-09-22 13:21:50 +01:00
Jonas Jensen
269b7101c0
Merge pull request #4273 from lcartey/cpp/custom-range-analysis-override
...
C++: Support overriding existing simple range analysis bounds
2020-09-22 13:15:05 +02:00
Jonas Jensen
e86bc0c6ac
C++: Autoformat fixup
2020-09-22 11:53:05 +02:00
Jonas Jensen
5cbf498a2d
Merge pull request #4302 from MathiasVP/fix-field-conflation-after-4230
...
C++: Fix field conflation after #4230
2020-09-22 10:23:17 +02:00
Robert Marsh
947ad02db9
C++: autoformat
2020-09-21 11:38:57 -07:00
Mathias Vorreiter Pedersen
873e871620
C++: Handle more cases in arrayReadStep.
2020-09-21 14:35:37 +02:00
Mathias Vorreiter Pedersen
73cd5ceb80
C++: Accept tests. Due to the removal of overlap between the reads steps there are fewer repeated edges in path explanations.
2020-09-21 14:17:49 +02:00
Mathias Vorreiter Pedersen
62d42f20d9
C++: use(x) is no longer an array read.
2020-09-21 12:46:03 +02:00
Mathias Vorreiter Pedersen
c560c7584c
C++: Add QLDoc for BufferMayWriteSideEffectFieldStoreQualifierNode
2020-09-21 11:08:06 +02:00
Mathias Vorreiter Pedersen
49dd576352
C++: Add more tests
2020-09-21 10:59:16 +02:00
Mathias Vorreiter Pedersen
6dd7675a97
Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
...
Co-authored-by: Jonas Jensen <jbj@github.com >
2020-09-21 09:31:30 +02:00
Robert Marsh
6b3557ec58
C++: cache localAdditionalTaintStep
2020-09-18 15:42:14 -07:00
Robert Marsh
bc3e74f7d6
Merge branch 'main' into rdmarsh2/cpp/ir-qualifier-flow
...
Fix test conflicts
2020-09-18 15:40:43 -07:00
Robert Marsh
12be90a6af
C++: remove unneeded cast
2020-09-18 15:00:01 -07:00
Robert Marsh
c179a07fc7
C++: fix constructor models
2020-09-18 14:43:39 -07:00
Mathias Vorreiter Pedersen
53da751b15
C++: Accept tests
2020-09-18 17:12:27 +02:00
Mathias Vorreiter Pedersen
b6b17fe95e
C++: Add a read and store step that replace ArrayContent with FieldContent when we realize that the target of a store is a field.
2020-09-18 17:12:09 +02:00
Mathias Vorreiter Pedersen
b4edbe4773
Merge pull request #4298 from MathiasVP/field-conflation-with-array-content
...
C++: Add test demonstrating field conflation after merging #4230
2020-09-18 15:16:33 +02:00
Jonas Jensen
6463a94258
Merge pull request #4297 from github/igfoo/compileTimeConstantInt
...
C++: Improve `compileTimeConstantInt`
2020-09-18 13:58:16 +02:00
Mathias Vorreiter Pedersen
b40941b89c
C++: Add test demonstrating field conflation after merging #4230
2020-09-18 13:23:23 +02:00
Jonas Jensen
c67605f15c
Merge pull request #4230 from MathiasVP/mathiasvp/array-field-flow
...
C++: Replace `field -> object` taint rule with `ArrayContent` dataflow
2020-09-18 10:56:51 +02:00
Mathias Vorreiter Pedersen
8c615ece8a
Merge pull request #4292 from MathiasVP/mathiasvp/cache-simpleLocalFlowStep
...
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-18 10:18:21 +02:00
Mathias Vorreiter Pedersen
3ef6e8a580
Merge pull request #4283 from geoffw0/stringstream4
...
C++: Model getline
2020-09-18 10:17:47 +02:00
Robert Marsh
3a83cc71fe
C++: use qualifier flow in more models
2020-09-17 18:03:02 -07:00
Robert Marsh
556ace004f
C++: use qualifiers in string constructor model
2020-09-17 17:39:50 -07:00
Robert Marsh
6b7b64d7be
C++: IR data and taint flow through qualifiers
2020-09-17 17:10:11 -07:00
Robert Marsh
f73ff988e0
C++: improve cast and ptr handling in taint test
2020-09-17 16:55:36 -07:00
Mathias Vorreiter Pedersen
c6ff805a07
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-17 21:13:02 +02:00
Mathias Vorreiter Pedersen
8e1d9e0996
C++: Fix bad join order introduced by #4270
2020-09-17 19:23:01 +02:00
Ian Lynagh
c7b6374e55
C++: Improve compileTimeConstantInt
...
It is possible for the frontend to make
(bool)e
where e has a constant value 0, but the (implicit) cast has no constant
value. This was causing us to not understand assume(0) correctly.
Now compileTimeConstantInt will handle casts itself if necessary.
2020-09-17 14:51:50 +01:00