Geoffrey White
7e7dfe2cc4
C++: Understand format arguments.
2021-09-24 19:25:43 +01:00
Geoffrey White
91a8b9fdd9
C++: Add suggested test (and a good variant).
2021-09-24 18:34:28 +01:00
Geoffrey White
4e60fd5fc7
C++:Add the ImproperNullTerminationTainted.ql query to the test.
2021-09-03 15:53:24 +01:00
Geoffrey White
ccf1a44a2b
C++: Extend tests for cpp/improper-null-termination.
2021-09-03 15:48:36 +01:00
Geoffrey White
ae35ae10e6
C++: Fix readlink FPs.
2021-07-28 17:45:18 +01:00
Geoffrey White
c2ef58d29d
C++: Support 'readlinkat'.
2021-07-28 16:15:28 +01:00
Geoffrey White
358d89f3ce
C++: Add tests.
2021-07-28 16:15:16 +01:00
Mathias Vorreiter Pedersen
e857ac1149
C++: Add more tests and remove redundant conjunct.
2021-05-25 09:17:42 +02:00
Mathias Vorreiter Pedersen
8d0cfb4e91
C++: Merge tests from 'cpp/access-memory-location-after-end-buffer-strncat' into the tests from 'cpp/unsafe-strncat'.
2021-05-21 10:34:59 +02:00
Mathias Vorreiter Pedersen
93e55e2631
C++: Fix FP in cpp/return-stack-allocated-memory.
2021-04-20 13:58:12 +02:00
Mathias Vorreiter Pedersen
1797b6c7f9
C++: Add FP test from the work on smart pointers in dataflow.
2021-04-20 13:54:57 +02:00
Dave Bartolomeo
bebf89fed5
C++: Accept test diffs
...
All changes look like real improvements.
2020-03-23 17:20:19 -04:00
Jonas Jensen
a59c0facee
C++: Accept test changes for IR libs
...
This is for the tests in the ql repo. There are also changed tests in
the internal repo.
2020-02-15 21:12:20 +01:00
Geoffrey White
f40a37cae2
C++: Move a test from library-tests to query-tests.
2020-01-23 11:05:47 +00:00
Geoffrey White
fcdb20d1fc
C++: Move the SuspiciousCallToStrncat test to the expected location.
2020-01-23 11:05:46 +00:00
Geoffrey White
f4f0f6d93e
C++: Merge the StrncpyFlippedArgs tests.
2020-01-23 11:05:46 +00:00
Geoffrey White
7408726f41
Merge pull request #2312 from jbj/pointer-wraparound-query
...
C++: New query: Pointer overflow check
2019-11-14 16:13:04 +00:00
Jonas Jensen
81d06e2ce6
C++: Update annotation in test file
2019-11-13 16:58:25 +01:00
Jonas Jensen
db33053422
C++: Add test for macro exclusions
2019-11-13 14:21:29 +01:00
Jonas Jensen
d2009c53dc
C++: Support GCC flags making ptr overflow defined
2019-11-13 14:07:33 +01:00
Jonas Jensen
463bf964a9
C++: Test showing FP with -fno-strict-overflow
2019-11-13 14:07:33 +01:00
Jonas Jensen
8ed991759c
C++: Rename PointerWrapAround to PointerOverflow
...
Overflow was the terminology I found for this in the C standard (C11
6.5.6-8).
2019-11-13 14:06:58 +01:00
Jonas Jensen
bd08c64933
C++: Apply my own review comments from #2218
2019-11-13 14:05:23 +01:00
Geoffrey White
806703b929
CPP: Relocate the test as well.
2019-11-12 09:54:55 +00:00
Geoffrey White
2b9428df32
CPP: Remove the 'Buffer Overflow' subdirectory (we have many buffer overflow queries, putting one in a special directory will only create confusion).
2019-11-12 09:54:46 +00:00
Geoffrey White
b917264770
CPP: Rename NtohlArrayNoBoundOpenSource.ql -> NtohlArrayNoBound.ql (I believe the 'OpenSource' part is a remnant from the way the contributor organizes their queries).
2019-11-12 09:53:59 +00:00
Jonas Jensen
18cc539c8d
Merge branch 'master' into pointer-wraparound-query
2019-11-12 10:22:46 +01:00
Ziemowit Laski
7a4c4b62f6
[zlaski/pointer-overflow-check] Rename PointerOverflowCheck -> PointerWrapAround.
2019-11-08 14:54:20 -08:00
Ziemowit Laski
f2105867a8
[zlaski/pointer-overflow-check] Enhance qhelp and test case.
2019-11-08 14:36:33 -08:00
Geoffrey White
f9feb05a72
CPP: Add a test of NtohlArrayNoBoundOpenSource.ql.
2019-11-06 13:36:31 +00:00
Ziemowit Laski
0df3d2ce60
[zlaski/pointer-overflow-check] Improve test case.
2019-11-05 13:00:55 -08:00
Ziemowit Laski
9228844604
[zlaski/pointer-overflow-check] Expand test case.
2019-11-04 17:00:06 -08:00
Ziemowit Laski
9407ba1a35
[zlaski/pointer-overflow-check] Initial version.
2019-11-04 17:00:06 -08: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
Matthew Gretton-Dann
0e50a143af
C++: Improve ReturnStackAllocatedMemory query
...
Update the ReturnStackAllocatedMmeory query to not give a false positive
for thread_local variables.
2019-08-06 11:22:32 +01:00
Geoffrey White
cf194219b9
CPP: Fix FPs.
2019-07-15 14:58:35 +01:00
Geoffrey White
5362fef81c
CPP: Additional AllocaInLoop test cases.
2019-07-15 14:50:02 +01:00
Geoffrey White
8ce6822d6f
CPP: Fix format literal.
2019-07-04 16:31:35 +01:00
Geoffrey White
95ab8cc706
CPP: Add a test of More64BitWaste.ql.
2019-06-27 17:14:46 +01:00
Geoffrey White
5e328908a0
CPP: Modify violation message of NonPortablePrintf.ql for consistency with WrongTypeFormatArguments.ql.
2019-06-27 17:11:37 +01:00
Geoffrey White
5cef0e21c6
CPP: Add a test of NonPortablePrintf.ql.
2019-06-27 16:51:07 +01:00
Robert Marsh
e899120270
C++: replace getType().getUnspecifiedType()
2019-05-20 15:08:28 +01:00
Jonas Jensen
40aea2f76d
C++: Shorten alert message
...
We don't write the reason for the alert in the alert message.
2019-05-01 08:33:36 +02:00
Jonas Jensen
e38ac9f88a
C++: suppress alerts in tightly bounded loops
2019-05-01 08:33:35 +02:00
zlaski-semmle
241994d1f8
Merge pull request #1107 from zlaski-semmle/cpp355
...
Updated query to look for Microsoft-specific '_alloca' and '_malloca'
Merge to Semmle/ql:master.
2019-03-19 13:40:27 -07:00
Ziemowit Laski
09e729ff59
Turns out that '__builtin_alloca' takes 'unsigned long', not 'unsigned long long'; rename some parameters to align with C11 standard.
2019-03-19 13:27:14 -07:00
Ziemowit Laski
11ed4f3312
Change __builtin_alloca declaration to use an unsigned long long parameter.
2019-03-19 13:12:29 -07:00
Ziemowit Laski
ff3430d8d0
Use '// GOOD' and '// BAD' annotations for query diagnostics.
2019-03-19 12:29:38 -07:00
Jonas Jensen
111a462d16
C++: Recover some of the good results we lost
...
My recent changes to suppress FPs in `ReturnStackAllocatedMemory.ql`
caused us to lose all results where there was a `Conversion` at the
initial address escape. We cannot handle conversions in general, but
this commit restores the good results for the trivial types of
conversion that we can handle.
2019-03-19 11:09:58 +01:00
Jonas Jensen
d864df5b7f
C++: Tests for new false negatives
2019-03-19 10:30:14 +01:00